Skip to content
This repository
tree: 5c6336f2db
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 40 lines (33 sloc) 1.662 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import pytest
from pages.desktop.mission import Mission
from unittestzero import Assert


class TestMission:

    @pytest.mark.nondestructive
    def test_sidebar_links(self, mozwebqa):
        missionPage = Mission(mozwebqa)
        missionPage.go_to_page()
        Assert.true(missionPage.are_sidebar_links_visible)
        Assert.true(missionPage.are_breadcrumb_links_visible)
        Assert.true(missionPage.are_learn_more_links_visible)

    @pytest.mark.nondestructive
    @pytest.mark.xfail(reason="https://bugzilla.mozilla.org/show_bug.cgi?id=773787")
    def test_footer_section(self, mozwebqa):
        mission_page = Mission(mozwebqa)
        mission_page.go_to_page()
        Assert.contains(mission_page.footer.expected_footer_logo_destination,
            mission_page.footer.footer_logo_destination)
        Assert.contains(mission_page.footer.expected_footer_logo_img,
            mission_page.footer.footer_logo_img)
        for link in Mission.Footer.footer_links_list:
            Assert.contains(link.get('href'), mission_page.footer.footer_link_destination(link.get('text')))

    @pytest.mark.nondestructive
    def test_header_section(self, mozwebqa):
        mission_page = Mission(mozwebqa)
        mission_page.go_to_page()
        Assert.true(mission_page.header.is_tabzilla_panel_visible)
        mission_page.header.toggle_tabzilla_dropdown()
        Assert.true(mission_page.header.are_tabzilla_links_visible)
Something went wrong with that request. Please try again.