コード例 #1
0
class EducationPageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_education_page()

    def test_01_education_page_has_expected_main_menu_links(self):
        """web.content.EducationPageContentTest  1. Education page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.EducationPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_education_panel_has_expected_content_and_links(self):
        """web.content.EducationPageContentTest  3. Education panel has expected content and links"""

        self.assert_page_contains_text_items(
            ["Education", "Want to learn about", "Want to know more?"])
        self.assert_link_exists_starting_with_text(
            "schools, institutes and universities in the Netherlands")

    def test_04_institutions_panel_has_expected_links_for_listed_institutions(
            self):
        """web.content.EducationPageContentTest  4. Institutions panel has expected links for listed institutions"""

        self.assert_page_contains_text("Institutions")
        self.assert_links_exist_starting_with_text([
            "NHL", "Saxion", "Van Hall", "Wetsus Academy", "WUR", "HZ",
            "Rotterdam", "TUD", "UNESCO-IHE"
        ])
コード例 #2
0
class ProjectsPageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_projects_page()

    def test_01_projects_page_has_expected_main_menu_links(self):
        """web.content.ProjectsPageContentTest  1. Projects page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.ProjectsPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_all_projects_panel_has_expected_content_and_links(self):
        """web.content.ProjectsPageContentTest  3. All projects panel has expected content and links"""

        self.assert_page_contains_text_items(
            ["All projects", "Our projects", "results)"])
        self.assert_links_exist_starting_with_text([
            "list of all project participants", "Name", "Country", "Continent",
            "Status", "Latest update"
        ])
コード例 #3
0
class NewsPageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_news_page()

    def test_01_news_page_has_expected_main_menu_links(self):
        """web.content.NewsPageContentTest  1. News page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.NewsPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_news_page_has_expected_sections_and_links(self):
        """web.content.NewsPageContentTest  3. News page has expected sections and links"""

        self.assert_page_contains_text_items([
            "Search for", "Recent Posts", "Participate", "Categories", "Tags",
            "Blogroll", "Archives"
        ])
        self.assert_links_exist([
            "Register", "Log in", "Entries RSS", "Comments RSS",
            "WordPress.org", "Netherlands Water Partnership blog"
        ])
コード例 #4
0
class ProjectsPageContentTest(DWSWebTestCase):

    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_projects_page()

    def test_01_projects_page_has_expected_main_menu_links(self):
        """web.content.ProjectsPageContentTest  1. Projects page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.ProjectsPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_all_projects_panel_has_expected_content_and_links(self):
        """web.content.ProjectsPageContentTest  3. All projects panel has expected content and links"""

        self.assert_page_contains_text_items(["All projects",
                                              "Our projects",
                                              "results)"])
        self.assert_links_exist_starting_with_text(["list of all project participants",
                                                    "Name",
                                                    "Country",
                                                    "Continent",
                                                    "Status",
                                                    "Latest update"])
コード例 #5
0
class DirectoryPageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_directory_page()

    def test_01_directory_page_has_expected_main_menu_links(self):
        """web.content.DirectoryPageContentTest  1. Directory page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.DirectoryPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_directory_panel_has_expected_content_and_links(self):
        """web.content.DirectoryPageContentTest  3. Directory panel has expected content and links"""

        self.assert_page_contains_text_items(["Directory of Dutch Water Expertise", "NWP", "Access our database"])
        self.assert_links_exist(
            ["Dutchwatersector.org", "Netherlands Water Partnership", "http://www.dutchwatersector.org"]
        )

    def test_04_dutch_water_history_panel_has_expected_content_and_links(self):
        """web.content.DirectoryPageContentTest  4. Dutch water history panel has expected content and links"""

        self.content_verifier.verify_dutch_water_history_panel()

    def test_05_focus_panel_has_expected_content_and_links(self):
        """web.content.DirectoryPageContentTest  5. Focus panel has expected content and links"""

        self.assert_page_contains_text("Focus: Land & Water")
        self.assert_link_exists_starting_with_text("Learn more")
コード例 #6
0
class NewsPageContentTest(DWSWebTestCase):

    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_news_page()

    def test_01_news_page_has_expected_main_menu_links(self):
        """web.content.NewsPageContentTest  1. News page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.NewsPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_news_page_has_expected_sections_and_links(self):
        """web.content.NewsPageContentTest  3. News page has expected sections and links"""

        self.assert_page_contains_text_items(["Search for",
                                              "Recent Posts",
                                              "Participate",
                                              "Categories",
                                              "Tags",
                                              "Blogroll",
                                              "Archives"])
        self.assert_links_exist(["Register",
                                 "Log in",
                                 "Entries RSS",
                                 "Comments RSS",
                                 "WordPress.org",
                                 "Netherlands Water Partnership blog"])
コード例 #7
0
class HomePageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_home_page()

    def test_01_home_page_has_expected_main_menu_links(self):
        """web.content.HomePageContentTest  1. Home page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_dws_intro_panel_has_expected_content_and_links(self):
        """web.content.HomePageContentTest  2. DWS introduction panel has expected content and links"""

        self.assert_page_contains_text_items(["The Dutch water sector", "Your worldwide partner for water"])
        self.assert_links_exist_starting_with_text(["Find a partner", "Our story"])

    def test_03_news_panel_has_expected_content_and_links(self):
        """web.content.HomePageContentTest  3. News panel has expected content and links"""

        self.assert_page_contains_text_items(
            [
                "Latest news",
                "Recent articles",
                "Focus Areas",
                "Clean water",
                "Governance",
                "International cooperation",
                "Land & water",
            ]
        )
        self.assert_links_exist_starting_with_text(["RSS", "View earlier articles"])

    def test_04_projects_worldwide_panel_has_expected_content_and_links(self):
        """web.content.HomePageContentTest  4. Projects worldwide panel has expected content and links"""

        self.assert_page_contains_text("Projects worldwide")
        self.assert_links_exist_starting_with_text(["See all", "View large map"])

    def test_05_focus_areas_panel_has_expected_content_and_links(self):
        """web.content.HomePageContentTest  5. Focus Areas panel has expected content and links"""

        self.assert_page_contains_text_items(
            ["Focus Areas", "Clean water", "Governance", "International cooperation", "Land & water"]
        )
        self.assert_links_exist_starting_with_text(
            ["See all", "Read more", "Clean water", "Governance", "International cooperation", "Land & water"]
        )
コード例 #8
0
class HomePageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_home_page()

    def test_01_home_page_has_expected_main_menu_links(self):
        """web.content.HomePageContentTest  1. Home page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_dws_intro_panel_has_expected_content_and_links(self):
        """web.content.HomePageContentTest  2. DWS introduction panel has expected content and links"""

        self.assert_page_contains_text_items(
            ["The Dutch water sector", "Your worldwide partner for water"])
        self.assert_links_exist_starting_with_text(
            ["Find a partner", "Our story"])

    def test_03_news_panel_has_expected_content_and_links(self):
        """web.content.HomePageContentTest  3. News panel has expected content and links"""

        self.assert_page_contains_text_items([
            "Latest news", "Recent articles", "Focus Areas", "Clean water",
            "Governance", "International cooperation", "Land & water"
        ])
        self.assert_links_exist_starting_with_text(
            ["RSS", "View earlier articles"])

    def test_04_projects_worldwide_panel_has_expected_content_and_links(self):
        """web.content.HomePageContentTest  4. Projects worldwide panel has expected content and links"""

        self.assert_page_contains_text("Projects worldwide")
        self.assert_links_exist_starting_with_text(
            ["See all", "View large map"])

    def test_05_focus_areas_panel_has_expected_content_and_links(self):
        """web.content.HomePageContentTest  5. Focus Areas panel has expected content and links"""

        self.assert_page_contains_text_items([
            "Focus Areas", "Clean water", "Governance",
            "International cooperation", "Land & water"
        ])
        self.assert_links_exist_starting_with_text([
            "See all", "Read more", "Clean water", "Governance",
            "International cooperation", "Land & water"
        ])
コード例 #9
0
class AboutPageContentTest(DWSWebTestCase):

    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_about_page()

    def test_01_about_page_has_expected_main_menu_links(self):
        """web.content.AboutPageContentTest  1. About page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.AboutPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_about_panel_has_expected_content_and_links(self):
        """web.content.AboutPageContentTest  3. About panel has expected content and links"""

        self.assert_page_contains_text_items(["About",
                                              "Dutch Water sector",
                                              "an overview",
                                              "Learn more about"])
        self.assert_links_exist(["The public sector",
                                 "Knowledge institutes - research and academia",
                                 "Non-governmental organisations (NGOs)",
                                 "Private companies"])

    def test_04_about_listing_panel_has_expected_links(self):
        """web.content.AboutPageContentTest  4. About listing panel has expected links"""

        self.assert_links_exist_starting_with_text(["Dutch Water sector",
                                                    "Public sector",
                                                    "Knowledge institutes",
                                                    "NGOs",
                                                    "Private companies",
                                                    "Contact us"])

    def test_05_dutch_water_history_panel_has_expected_content_and_links(self):
        """web.content.AboutPageContentTest  5. Dutch water history panel has expected content and links"""

        self.content_verifier.verify_dutch_water_history_panel()
コード例 #10
0
class FocusAreasPageContentTest(DWSWebTestCase):

    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_focus_areas_page()

    def test_01_focus_areas_page_has_expected_main_menu_links(self):
        """web.content.FocusAreasPageContentTest  1. Focus Areas page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.FocusAreasPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_focus_areas_panel_has_expected_sections_and_all_projects_link(self):
        """web.content.FocusAreasPageContentTest  3. Focus Areas panel has expected sections and all projects link"""

        self.assert_page_contains_text_items(["Focus Areas",
                                              "Clean Water",
                                              "International co-operation",
                                              "Governance",
                                              "Land & water"])
        self.assert_link_exists_starting_with_text("See a list of all projects")

    def test_04_clean_water_section_has_expected_links(self):
        """web.content.FocusAreasPageContentTest  4. Clean Water section has expected links"""

        self.assert_links_exist_starting_with_text(["Learn more about clean water",
                                                    "See clean water projects"])

    def test_05_international_cooperation_section_has_expected_links(self):
        """web.content.FocusAreasPageContentTest  5. International co-operation section has expected links"""

        self.assert_links_exist_starting_with_text(["Learn more about International co-operation",
                                                    "See International co-operation projects"])

    def test_06_governance_section_has_expected_links(self):
        """web.content.FocusAreasPageContentTest  6. Governance section has expected links"""

        self.assert_links_exist_starting_with_text(["Learn more about governance",
                                                    "See governance projects"])

    def test_07_land_and_water_section_has_expected_links(self):
        """web.content.FocusAreasPageContentTest  7. Land & water section has expected links"""

        self.assert_links_exist_starting_with_text(["Learn more about land & water",
                                                    "See land & water projects"])

    def test_08_dutch_water_history_panel_has_expected_content_and_links(self):
        """web.content.FocusAreasPageContentTest  8. Dutch water history panel has expected content and links"""

        self.content_verifier.verify_dutch_water_history_panel()

    def test_09_holland_water_valley_panel_has_expected_content_and_links(self):
        """web.content.FocusAreasPageContentTest  9. Holland water valley panel has expected content and links"""

        self.content_verifier.verify_holland_water_valley_panel()
コード例 #11
0
class NetherlandsPageContentTest(DWSWebTestCase):

    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_netherlands_page()

    def test_01_netherlands_page_has_expected_main_menu_links(self):
        """web.content.NetherlandsPageContentTest  1. Netherlands page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.NetherlandsPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_netherlands_now_panel_has_expected_content(self):
        """web.content.NetherlandsPageContentTest  3. The Netherlands now panel has expected content"""

        self.assert_page_contains_text_items(["The Netherlands now",
                                              "Part of our culture and history",
                                              "Going Dutch, water style"])

    def test_04_dutch_water_history_panel_has_expected_content_and_links(self):
        """web.content.NetherlandsPageContentTest  4. Dutch water history panel has expected content and links"""

        self.content_verifier.verify_dutch_water_history_panel()

    def test_05_holland_water_valley_panel_has_expected_content_and_links(self):
        """web.content.NetherlandsPageContentTest  5. Holland water valley panel has expected content and links"""

        self.content_verifier.verify_holland_water_valley_panel()
コード例 #12
0
class AboutPageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_about_page()

    def test_01_about_page_has_expected_main_menu_links(self):
        """web.content.AboutPageContentTest  1. About page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.AboutPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_about_panel_has_expected_content_and_links(self):
        """web.content.AboutPageContentTest  3. About panel has expected content and links"""

        self.assert_page_contains_text_items(
            ["About", "Dutch Water sector", "an overview", "Learn more about"])
        self.assert_links_exist([
            "The public sector",
            "Knowledge institutes - research and academia",
            "Non-governmental organisations (NGOs)", "Private companies"
        ])

    def test_04_about_listing_panel_has_expected_links(self):
        """web.content.AboutPageContentTest  4. About listing panel has expected links"""

        self.assert_links_exist_starting_with_text([
            "Dutch Water sector", "Public sector", "Knowledge institutes",
            "NGOs", "Private companies", "Contact us"
        ])

    def test_05_dutch_water_history_panel_has_expected_content_and_links(self):
        """web.content.AboutPageContentTest  5. Dutch water history panel has expected content and links"""

        self.content_verifier.verify_dutch_water_history_panel()
コード例 #13
0
class EducationPageContentTest(DWSWebTestCase):

    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_education_page()

    def test_01_education_page_has_expected_main_menu_links(self):
        """web.content.EducationPageContentTest  1. Education page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.EducationPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_education_panel_has_expected_content_and_links(self):
        """web.content.EducationPageContentTest  3. Education panel has expected content and links"""

        self.assert_page_contains_text_items(["Education",
                                              "Want to learn about",
                                              "Want to know more?"])
        self.assert_link_exists_starting_with_text("schools, institutes and universities in the Netherlands")

    def test_04_institutions_panel_has_expected_links_for_listed_institutions(self):
        """web.content.EducationPageContentTest  4. Institutions panel has expected links for listed institutions"""

        self.assert_page_contains_text("Institutions")
        self.assert_links_exist_starting_with_text(["NHL",
                                                    "Saxion",
                                                    "Van Hall",
                                                    "Wetsus Academy",
                                                    "WUR",
                                                    "HZ",
                                                    "Rotterdam",
                                                    "TUD",
                                                    "UNESCO-IHE"])
コード例 #14
0
class DirectoryPageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_directory_page()

    def test_01_directory_page_has_expected_main_menu_links(self):
        """web.content.DirectoryPageContentTest  1. Directory page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.DirectoryPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_directory_panel_has_expected_content_and_links(self):
        """web.content.DirectoryPageContentTest  3. Directory panel has expected content and links"""

        self.assert_page_contains_text_items([
            "Directory of Dutch Water Expertise", "NWP", "Access our database"
        ])
        self.assert_links_exist([
            "Dutchwatersector.org", "Netherlands Water Partnership",
            "http://www.dutchwatersector.org"
        ])

    def test_04_dutch_water_history_panel_has_expected_content_and_links(self):
        """web.content.DirectoryPageContentTest  4. Dutch water history panel has expected content and links"""

        self.content_verifier.verify_dutch_water_history_panel()

    def test_05_focus_panel_has_expected_content_and_links(self):
        """web.content.DirectoryPageContentTest  5. Focus panel has expected content and links"""

        self.assert_page_contains_text("Focus: Land & Water")
        self.assert_link_exists_starting_with_text("Learn more")
コード例 #15
0
 def setUp(self):
     DWSWebTestCase.setUp(self)
     self.content_verifier = SharedPageContentVerifier(self)
     self.open_about_page()
コード例 #16
0
 def setUp(self):
     DWSWebTestCase.setUp(self)
     self.content_verifier = SharedPageContentVerifier(self)
     self.open_home_page()
コード例 #17
0
class FocusAreasPageContentTest(DWSWebTestCase):
    def setUp(self):
        DWSWebTestCase.setUp(self)
        self.content_verifier = SharedPageContentVerifier(self)
        self.open_focus_areas_page()

    def test_01_focus_areas_page_has_expected_main_menu_links(self):
        """web.content.FocusAreasPageContentTest  1. Focus Areas page has expected main menu links"""

        self.content_verifier.verify_expected_main_menu_links()

    def test_02_breadcrumb_bar_has_home_link(self):
        """web.content.FocusAreasPageContentTest  2. Breadcrumb bar has Home link"""

        self.assert_link_exists("Home")

    def test_03_focus_areas_panel_has_expected_sections_and_all_projects_link(
            self):
        """web.content.FocusAreasPageContentTest  3. Focus Areas panel has expected sections and all projects link"""

        self.assert_page_contains_text_items([
            "Focus Areas", "Clean Water", "International co-operation",
            "Governance", "Land & water"
        ])
        self.assert_link_exists_starting_with_text(
            "See a list of all projects")

    def test_04_clean_water_section_has_expected_links(self):
        """web.content.FocusAreasPageContentTest  4. Clean Water section has expected links"""

        self.assert_links_exist_starting_with_text(
            ["Learn more about clean water", "See clean water projects"])

    def test_05_international_cooperation_section_has_expected_links(self):
        """web.content.FocusAreasPageContentTest  5. International co-operation section has expected links"""

        self.assert_links_exist_starting_with_text([
            "Learn more about International co-operation",
            "See International co-operation projects"
        ])

    def test_06_governance_section_has_expected_links(self):
        """web.content.FocusAreasPageContentTest  6. Governance section has expected links"""

        self.assert_links_exist_starting_with_text(
            ["Learn more about governance", "See governance projects"])

    def test_07_land_and_water_section_has_expected_links(self):
        """web.content.FocusAreasPageContentTest  7. Land & water section has expected links"""

        self.assert_links_exist_starting_with_text(
            ["Learn more about land & water", "See land & water projects"])

    def test_08_dutch_water_history_panel_has_expected_content_and_links(self):
        """web.content.FocusAreasPageContentTest  8. Dutch water history panel has expected content and links"""

        self.content_verifier.verify_dutch_water_history_panel()

    def test_09_holland_water_valley_panel_has_expected_content_and_links(
            self):
        """web.content.FocusAreasPageContentTest  9. Holland water valley panel has expected content and links"""

        self.content_verifier.verify_holland_water_valley_panel()
コード例 #18
0
 def setUp(self):
     DWSWebTestCase.setUp(self)
     self.content_verifier = SharedPageContentVerifier(self)
     self.open_netherlands_page()