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

import zeit.cms.selenium


class Editor(zeit.cms.selenium.Test):

    def setUp(self):
        super(Editor, self).setUp()
        self.open('/repository')
        s = self.selenium
        s.selectAndWait('id=add_menu', 'label=Infobox')
        s.type('id=form.supertitle', 'Super')
        s.type('id=form.__name__', 'infobox')
        s.clickAndWait('id=form.actions.add')
        s.clickAndWait('name=form.contents.add')

    def test_(self):
        s = self.selenium
        s.selectFrame('id=form.contents.0..combination_01___Frame')
        s.selectFrame('index=0')
        s.fireEvent('//body', 'focus')
        s.typeKeys('//body', 'Hiya')
        s.keyPress('//body', '\\13')
        s.typeKeys('//body', 'Holla')
        s.keyPress('//body', '\\13')
        s.typeKeys('//body', 'Foobar')
        s.keyPress('//body', '\\13')

        s.selectFrame('relative=top')<commit_msg>use a meaningful method name<commit_after># coding: utf8
# Copyright (c) 2009 gocept gmbh & co. kg
# See also LICENSE.txt

import zeit.cms.selenium


class Editor(zeit.cms.selenium.Test):

    def setUp(self):
        super(Editor, self).setUp()
        self.open('/repository')
        s = self.selenium
        s.selectAndWait('id=add_menu', 'label=Infobox')
        s.type('id=form.supertitle', 'Super')
        s.type('id=form.__name__', 'infobox')
        s.clickAndWait('id=form.actions.add')
        s.clickAndWait('name=form.contents.add')

    def test_enter(self):
        s = self.selenium
        s.selectFrame('id=form.contents.0..combination_01___Frame')
        s.selectFrame('index=0')
        s.fireEvent('//body', 'focus')
        s.typeKeys('//body', 'Hiya')
        s.keyPress('//body', '\\13')
        s.typeKeys('//body', 'Holla')
        s.keyPress('//body', '\\13')
        s.typeKeys('//body', 'Foobar')
        s.keyPress('//body', '\\13')

        s.selectFrame('relative=top')
{'fraction_non_alphanumeric': 0.1875316776482514, 'fraction_numerical': 0.01469842878864673, 'mean_word_length': 2.512455516014235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2254665', 'n_tokens_mistral': 721, 'n_tokens_neox': 672, 'n_words': 107}