Ejemplo n.º 1
0
    def test_submit_sad_feedback(self, mozwebqa):
        timestamp = str(time.time())
        desc = 'input-tests testing sad feedback ' + timestamp
        url = 'http://sad.example.com/' + timestamp

        # 1. go to the feedback form
        feedback_pg = GenericFeedbackFormPage(mozwebqa)
        feedback_pg.go_to_feedback_page()

        # 2. click on sad
        feedback_pg.click_sad_feedback()

        # 3. fill out description and url
        feedback_pg.set_description(desc)
        feedback_pg.set_url(url)
        feedback_pg.click_moreinfo_next()

        # 4. fill in email address
        feedback_pg.check_email_checkbox()
        feedback_pg.set_email('*****@*****.**')

        # 5. submit
        thanks_pg = feedback_pg.submit(expect_success=True)
        Assert.true(thanks_pg.is_the_current_page)

        # 6. verify
        dashboard_pg = DashboardPage(mozwebqa)
        dashboard_pg.go_to_dashboard_page()
        dashboard_pg.search_for(desc)
        resp = dashboard_pg.messages[0]
        Assert.equal(resp.type.strip(), 'Sad')
        Assert.equal(resp.body.strip(), desc.strip())
        Assert.equal(resp.locale.strip(), 'English (US)')
        Assert.equal(resp.site.strip(), 'example.com')
Ejemplo n.º 2
0
    def test_submit_sad_feedback(self, mozwebqa):
        timestamp = str(time.time())
        desc = 'input-tests testing sad feedback ' + timestamp
        url = 'http://sad.example.com/' + timestamp

        # 1. go to the feedback form
        feedback_pg = GenericFeedbackFormPage(mozwebqa)
        feedback_pg.go_to_feedback_page('firefox')

        # 2. click on sad
        feedback_pg.click_sad_feedback()

        # 3. fill out description, url, email checkbox and email
        # address
        feedback_pg.set_description(desc)
        feedback_pg.set_url(url)
        feedback_pg.check_email_checkbox()
        feedback_pg.set_email('*****@*****.**')

        # 4. submit
        thanks_pg = feedback_pg.submit(expect_success=True)
        Assert.true(thanks_pg.is_the_current_page)

        # 5. verify
        dashboard_pg = DashboardPage(mozwebqa)
        dashboard_pg.go_to_dashboard_page()
        dashboard_pg.search_for(desc)
        resp = dashboard_pg.messages[0]
        Assert.equal(resp.type.strip(), 'Sad')
        Assert.equal(resp.body.strip(), desc.strip())
        Assert.equal(resp.locale.strip(), 'English (US)')
        Assert.equal(resp.site.strip(), 'example.com')
Ejemplo n.º 3
0
    def test_submit_sad_feedback(self, mozwebqa):
        timestamp = str(time.time())
        desc = "input-tests testing sad feedback " + timestamp
        url = "http://sad.example.com/" + timestamp

        # 1. go to the feedback form
        feedback_pg = GenericFeedbackFormPage(mozwebqa)
        feedback_pg.go_to_feedback_page("firefox")

        # 2. click on sad
        feedback_pg.click_sad_feedback()

        # 3. fill out description, url, email checkbox and email
        # address
        feedback_pg.set_description(desc)
        feedback_pg.set_url(url)
        feedback_pg.check_email_checkbox()
        feedback_pg.set_email("*****@*****.**")

        # 4. submit
        thanks_pg = feedback_pg.submit(expect_success=True)
        assert thanks_pg.is_the_current_page

        # 5. verify
        dashboard_pg = DashboardPage(mozwebqa)
        dashboard_pg.go_to_dashboard_page()
        dashboard_pg.search_for(desc)
        resp = dashboard_pg.messages[0]
        assert resp.type.strip() == "Sad"
        assert resp.body.strip() == desc.strip()
        assert resp.locale.strip() == "English (US)"
        assert resp.site.strip() == "example.com"
Ejemplo n.º 4
0
    def test_back_and_forth(self, mozwebqa):
        """Test back buttons"""
        desc = 'input-tests testing'

        # 1. go to the feedback form
        feedback_pg = GenericFeedbackFormPage(mozwebqa)
        feedback_pg.go_to_feedback_page('firefox')

        # 2. click on happy
        feedback_pg.click_happy_feedback()

        # 3. click back and click sad
        feedback_pg.click_back()
        feedback_pg.click_sad_feedback()

        # 4. verify submit button is disabled
        assert feedback_pg.is_submit_enabled is False

        # 5. fill out description, check submit button enabled
        feedback_pg.set_description(desc)
        assert feedback_pg.is_submit_enabled