예제 #1
0
    def test_submit_sad_feedback(self, mozwebqa):
        timestamp = str(time.time())
        desc = 'input-tests testing sad fxos feedback ' + timestamp

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

        # 2. click on happy
        feedback_pg.click_sad_feedback()

        # 3. pick default country
        feedback_pg.click_country_next()

        # 4. pick default device
        feedback_pg.click_device_next()

        # 5. fill in description
        feedback_pg.set_description(desc)

        # 6. submit
        feedback_pg.submit(expect_success=True)
        self.take_a_breather()
        assert feedback_pg.current_card == 'thanks'

        # 7. 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)'
예제 #2
0
    def test_submit_happy_feedback(self, mozwebqa):
        timestamp = str(time.time())
        desc = 'input-tests testing happy fxos feedback ' + timestamp

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

        # 2. click on happy
        feedback_pg.click_happy_feedback()

        # 3. pick default country
        feedback_pg.click_country_next()

        # 4. pick default device
        feedback_pg.click_device_next()

        # 5. fill in description
        Assert.false(feedback_pg.is_moreinfo_next_enabled)
        feedback_pg.set_description(desc)
        Assert.true(feedback_pg.is_moreinfo_next_enabled)
        feedback_pg.click_moreinfo_next()

        self.take_a_breather()

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

        # 7. submit
        feedback_pg.submit(expect_success=True)
        self.take_a_breather()
        Assert.equal(feedback_pg.current_card, 'thanks')

        # 8. 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(), 'Happy')
        Assert.equal(resp.body.strip(), desc.strip())
        Assert.equal(resp.locale.strip(), 'English (US)')
예제 #3
0
    def test_submit_happy_feedback(self, mozwebqa):
        timestamp = str(time.time())
        desc = 'input-tests testing happy fxos feedback ' + timestamp

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

        # Verify there is a privacy link
        feedback_pg.has_privacy_link

        # 2. click on happy
        feedback_pg.click_happy_feedback()

        # 3. pick default country
        feedback_pg.click_country_next()

        # 4. pick default device
        feedback_pg.click_device_next()

        # 5. fill in description
        feedback_pg.has_privacy_link
        assert feedback_pg.is_submit_enabled is False
        feedback_pg.set_description(desc)
        assert feedback_pg.is_submit_enabled is True

        # 6. fill in url
        feedback_pg.set_url('http://example.com/foo')

        # 7. fill in email address
        # FIXME: check email input disabled
        feedback_pg.check_email_checkbox()
        # FIXME: check email input enabled
        feedback_pg.set_email('*****@*****.**')

        # 8. submit
        feedback_pg.submit(expect_success=True)
        self.take_a_breather()
        assert feedback_pg.current_card == 'thanks'

        # 9. 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() == 'Happy'
        assert resp.body.strip() == desc.strip()
        assert resp.locale.strip() == 'English (US)'
예제 #4
0
    def test_submit_happy_feedback(self, mozwebqa):
        timestamp = str(time.time())
        desc = 'input-tests testing happy fxos feedback ' + timestamp

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

        # 2. click on happy
        feedback_pg.click_happy_feedback()

        # 3. pick default country
        feedback_pg.click_country_next()

        # 4. pick default device
        feedback_pg.click_device_next()

        # 5. fill in description
        Assert.false(feedback_pg.is_moreinfo_next_enabled)
        feedback_pg.set_description(desc)
        Assert.true(feedback_pg.is_moreinfo_next_enabled)
        feedback_pg.click_moreinfo_next()

        self.take_a_breather()

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

        # 7. submit
        feedback_pg.submit(expect_success=True)
        self.take_a_breather()
        Assert.equal(feedback_pg.current_card, 'thanks')

        # 8. 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(), 'Happy')
        Assert.equal(resp.body.strip(), desc.strip())
        Assert.equal(resp.locale.strip(), 'English (US)')