<commit_before># Copyright (c) 2007-2010 gocept gmbh & co. kg
# See also LICENSE.txt

import zeit.cms.testing


class TestTree(zeit.cms.testing.SeleniumTestCase):

    def test_tree_keeps_state(self):
        s = self.selenium

        # Delete the tree state cookie to have a defined starting point
        s.deleteCookie('zeit.cms.repository.treeState', '/')
        self.open('/', auth='zmgr:mgrpw')
        s.verifyTextPresent('online')

        # Open `online`
        s.click('//li[@uniqueid="http://xml.zeit.de/online"]')
        s.waitForElementPresent(
            '//li[@uniqueid="http://xml.zeit.de/online/2007"]')

        # Tree is still open after reload."
        self.open('/', auth='zmgr:mgrpw')
        s.verifyElementPresent(
            '//li[@uniqueid="http://xml.zeit.de/online/2007"]')
<commit_msg>make test more stable by waiting<commit_after># Copyright (c) 2007-2010 gocept gmbh & co. kg
# See also LICENSE.txt

import zeit.cms.testing


class TestTree(zeit.cms.testing.SeleniumTestCase):

    def test_tree_keeps_state(self):
        s = self.selenium

        # Delete the tree state cookie to have a defined starting point
        s.deleteCookie('zeit.cms.repository.treeState', '/')
        self.open('/', auth='zmgr:mgrpw')
        s.verifyTextPresent('online')

        # Open `online`
        s.click('//li[@uniqueid="http://xml.zeit.de/online"]')
        s.waitForElementPresent(
            '//li[@uniqueid="http://xml.zeit.de/online/2007"]')

        # Tree is still open after reload."
        self.open('/', auth='zmgr:mgrpw')
        s.waitForElementPresent(
            '//li[@uniqueid="http://xml.zeit.de/online/2007"]')

{'fraction_non_alphanumeric': 0.1552346570397112, 'fraction_numerical': 0.019253910950661854, 'mean_word_length': 2.6469298245614037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6810019', 'n_tokens_mistral': 561, 'n_tokens_neox': 518, 'n_words': 103}