Exemplo n.º 1
0
class TestBrowserCellData(GaiaMtbfTestCase):

    _page_title_locator = (By.ID, 'page-title')

    def setUp(self):
        GaiaMtbfTestCase.setUp(self)
        self.data_layer = GaiaData(self.marionette)
        self.data_layer.connect_to_cell_data()

        self.browser = Browser(self.marionette)
        self.browser.launch()

    def test_browser_cell_data(self):
        """https://moztrap.mozilla.org/manage/case/1328/"""
        self.wait_for_element_displayed(*self.browser._awesome_bar_locator)
        self.marionette.find_element(
            *self.browser._awesome_bar_locator).clear()

        self.browser.go_to_url(
            'http://mozqa.com/data/firefox/layout/mozilla.html', timeout=120)
        self.browser.switch_to_content()

        self.wait_for_element_present(*self._page_title_locator, timeout=120)
        heading = self.marionette.find_element(*self._page_title_locator)
        self.assertEqual(
            heading.text,
            'We believe that the internet should be public, open and accessible.'
        )

    def tearDown(self):
        self.data_layer.disable_cell_data()
        GaiaMtbfTestCase.tearDown(self)
class TestBrowserCellData(GaiaMtbfTestCase):

    _page_title_locator = (By.ID, 'page-title')

    def setUp(self):
        GaiaMtbfTestCase.setUp(self)
        self.data_layer = GaiaData(self.marionette)
        self.data_layer.connect_to_cell_data()

        self.browser = Browser(self.marionette)
        self.browser.launch()

    def test_browser_cell_data(self):
        """https://moztrap.mozilla.org/manage/case/1328/"""
        self.wait_for_element_displayed(*self.browser._awesome_bar_locator)
        self.marionette.find_element(*self.browser._awesome_bar_locator).clear()

        self.browser.go_to_url('http://mozqa.com/data/firefox/layout/mozilla.html', timeout=120)
        self.browser.switch_to_content()

        self.wait_for_element_present(*self._page_title_locator, timeout=120)
        heading = self.marionette.find_element(*self._page_title_locator)
        self.assertEqual(heading.text, 'We believe that the internet should be public, open and accessible.')

    def tearDown(self):
        self.data_layer.disable_cell_data()
        GaiaMtbfTestCase.tearDown(self)
Exemplo n.º 3
0
class TestBrowserCellData(GaiaMtbfTestCase):

    _page_title_locator = (By.ID, 'page-title')

    def setUp(self):
        GaiaMtbfTestCase.setUp(self)
        self.data_layer.disable_wifi()
        self.data_layer.disable_cell_data()

        self.data_layer = GaiaData(self.marionette)
        self.data_layer.connect_to_cell_data()

        self.search = Search(self.marionette)
        self.search.launch()

    def test_browser_cell_data(self):
        """https://moztrap.mozilla.org/manage/case/1328/"""

        self.browser = self.search.go_to_url(
            'http://mozqa.com/data/firefox/layout/mozilla.html')
        self.browser.wait_for_page_to_load(120)

        self.browser.switch_to_content()

        heading = Wait(self.marionette, timeout=120).until(
            expected.element_present(*self._page_title_locator))
        self.assertEqual(
            heading.text,
            'We believe that the internet should be public, open and accessible.'
        )

    def tearDown(self):
        self.marionette.switch_to_frame()
        self.data_layer.disable_cell_data()
        GaiaMtbfTestCase.tearDown(self)
class TestBrowserCellData(GaiaMtbfTestCase):

    _page_title_locator = (By.ID, 'page-title')

    def setUp(self):
        GaiaMtbfTestCase.setUp(self)
        self.data_layer.disable_wifi()
        self.data_layer.disable_cell_data()

        self.data_layer = GaiaData(self.marionette)
        self.data_layer.connect_to_cell_data()

        self.search = Search(self.marionette)
        self.search.launch()

    def test_browser_cell_data(self):
        """https://moztrap.mozilla.org/manage/case/1328/"""

        self.browser = self.search.go_to_url('http://mozqa.com/data/firefox/layout/mozilla.html')
        self.browser.wait_for_page_to_load(120)

        self.browser.switch_to_content()

        heading = Wait(self.marionette, timeout=120).until(expected.element_present(*self._page_title_locator))
        self.assertEqual(heading.text, 'We believe that the internet should be public, open and accessible.')

    def tearDown(self):
        self.marionette.switch_to_frame()
        self.data_layer.disable_cell_data()
        GaiaMtbfTestCase.tearDown(self)