Пример #1
0
 def test_search_systems(self, mozwebqa):
     home_page = Home(mozwebqa)
     sysapi = ApiTasks(mozwebqa)
     
     home_page.login()
     current_org = home_page.header.get_text_from_switcher
     # Some bad results
     for i in range(1,5):
         new_system_name = "%s" % home_page.random_string()
         sysapi.create_new_system(new_system_name, current_org)
     # The actual systems to search for   
     for i in range(1,5):
         new_sys_name = "SearchSys%s" % home_page.random_string()
         sysapi.create_new_system(new_sys_name, current_org)
         
     home_page.tabs.click_tab("systems_tab")
     systems = SystemsTab(mozwebqa)
     
     home_page.enter_search_criteria("SearchSys*")
     Assert.true(systems.is_search_correct("SearchSys"))
Пример #2
0
    def test_search_systems(self, mozwebqa):
        home_page = Home(mozwebqa)
        sysapi = ApiTasks(mozwebqa)
        
        home_page.login()
        home_page.click(*login_org_dropdown)
        home_page.click_by_text(login_org_name_selector_css, home_page.org)
        current_org = home_page.header.get_text_from_switcher

        for i in range(1,5):
            new_system_name = "%s" % home_page.random_string()
            sysapi.create_new_system(new_system_name, current_org)

        for i in range(1,5):
            new_sys_name = "SearchSys%s" % home_page.random_string()
            sysapi.create_new_system(new_sys_name, current_org)
            
        home_page.click_tab("systems_tab")
        systems = SystemsTab(mozwebqa)
        
        home_page.enter_search_criteria("SearchSys*")
        Assert.true(systems.is_search_correct("SearchSys"))