コード例 #1
0
    def test_duplicate_comment_return_save_with_number(self):
        # enter number
        number = ExpectedResults.duplicate_button_with_number[0]
        enter_number(self.browser, number)

        # save comment and return
        click_save_and_return(self.browser)

        # check that comment was created
        comments = find_all_comments(self.browser)
        self.assertIn(ExpectedResults.duplicate_button_with_number, comments)
コード例 #2
0
    def test_duplicate_comment_return_save_without_number(self):
        # clear field number
        comment_number = self.browser.find_element_by_id('Number')
        comment_number.clear()

        # save comment and return
        click_save_and_return(self.browser)

        # check that comment was created
        comments = find_all_comments(self.browser)
        self.assertIn(ExpectedResults.duplicate_button_without_number, comments)
コード例 #3
0
    def test_edit_comment_return_save_without_number(self):
        comment_name = ExpectedResults.edit_button_without_number[1]
        # enter comment's name
        comment_text_write(self.browser, comment_name)

        # save comment and return
        click_save_and_return(self.browser)

        # check that comment was created
        comments = find_all_comments(self.browser)
        self.assertIn(ExpectedResults.edit_button_without_number, comments)
コード例 #4
0
    def test_new_comment_length_50_text(self):
        comment_name = ExpectedResults.new_button_length_50[1]
        # enter comment's name
        comment_text_write(self.browser, comment_name)

        # chose all category
        click_all_category(self.browser)

        # save comment and return
        click_save_and_return(self.browser)

        # check that comment was created
        comments = find_all_comments(self.browser)
        self.assertIn(ExpectedResults.new_button_length_50, comments)
コード例 #5
0
    def test_edit_comment_return_save_with_number(self):
        comment_name = ExpectedResults.edit_button_with_number[1]
        number = ExpectedResults.edit_button_with_number[0]
        # enter comment's name
        comment_text_write(self.browser, comment_name)
        # enter number
        comment_number = self.browser.find_element_by_id('Number')
        comment_number.send_keys(number)

        # save comment and return
        click_save_and_return(self.browser)

        # check that comment was created
        comments = find_all_comments(self.browser)
        self.assertIn(ExpectedResults.edit_button_with_number, comments)
コード例 #6
0
    def test_new_comment_number_999(self):
        comment_name = ExpectedResults.new_button_number_999[1]
        number = ExpectedResults.new_button_number_999[0]
        # enter comment's name
        comment_text_write(self.browser, comment_name)
        # enter number
        comment_number = self.browser.find_element_by_id('Number')
        comment_number.send_keys(number)

        # chose all category
        click_all_category(self.browser)

        # save comment and return
        click_save_and_return(self.browser)

        # check that comment was created
        comments = find_all_comments(self.browser)
        self.assertIn(ExpectedResults.new_button_number_999, comments)