def test_the_header_layout(self, mozwebqa): feedback_pg = FeedbackPage(mozwebqa) feedback_pg.go_to_feedback_page() Assert.true(feedback_pg.is_feed_visible) Assert.false(feedback_pg.is_statistics_visible) Assert.false(feedback_pg.is_settings_visible) feedback_pg.click_settings_tab() Assert.false(feedback_pg.is_feed_visible) Assert.false(feedback_pg.is_statistics_visible) Assert.true(feedback_pg.is_settings_visible) feedback_pg.click_statistics_tab() Assert.false(feedback_pg.is_feed_visible) Assert.true(feedback_pg.is_statistics_visible) Assert.false(feedback_pg.is_settings_visible) feedback_pg.click_feed_tab() Assert.true(feedback_pg.is_feed_visible) Assert.false(feedback_pg.is_statistics_visible) Assert.false(feedback_pg.is_settings_visible)
def test_that_empty_search_of_feedback_returns_some_data(self, mozwebqa): """Litmus 13847""" feedback_pg = FeedbackPage(mozwebqa) feedback_pg.go_to_feedback_page() feedback_pg.search_for("") Assert.greater(len(feedback_pg.messages), 0)
def test_that_search_returns_results(self, mozwebqa): feedback_pg = FeedbackPage(mozwebqa) feedback_pg.go_to_feedback_page() feedback_pg.search_for(self.positive_search_term) Assert.equal(self.positive_search_term, feedback_pg.search_term_from_url) Assert.greater(len(feedback_pg.messages), 0)
def test_that_search_results_contain_search_text(self, mozwebqa): feedback_pg = FeedbackPage(mozwebqa) feedback_pg.go_to_feedback_page() feedback_pg.search_for(self.positive_search_term) Assert.greater(len(feedback_pg.messages), 0) for message in feedback_pg.messages: Assert.contains(self.positive_search_term, message.body.lower())
def test_that_checks_pagination(self, mozwebqa): feedback_pg = FeedbackPage(mozwebqa) feedback_pg.go_to_feedback_page() Assert.false(feedback_pg.pagination.is_older_button_disabled) Assert.true(feedback_pg.pagination.is_newer_button_disabled) feedback_pg.pagination.click_older_button() Assert.false(feedback_pg.pagination.is_newer_button_disabled) # return to first page feedback_pg.pagination.click_newer_button() Assert.false(feedback_pg.pagination.is_older_button_disabled) Assert.true(feedback_pg.pagination.is_newer_button_disabled)
def test_that_empty_search_of_feedback_returns_some_data(self, mozwebqa): """Litmus 13847""" feedback_pg = FeedbackPage(mozwebqa) feedback_pg.go_to_feedback_page() feedback_pg.search_for('') Assert.greater(len(feedback_pg.messages), 0)
def test_search_box_placeholder(self, mozwebqa): """Litmus 13845""" feedback_pg = FeedbackPage(mozwebqa) feedback_pg.go_to_feedback_page() Assert.equal(feedback_pg.search_box_placeholder, "Search by keyword")