def test_systems_page(self, mozwebqa): """ Randomly select a system from the systems page and verify that key elements are present. """ home_page = Home(mozwebqa) home_page.login() home_page.click(*login_org_dropdown) home_page.click_by_text(login_org_name_selector_css, home_page.org) api = ApiTasks(mozwebqa) current_org = home_page.header.get_text_from_switcher api.create_envs(current_org) new_system_name = "system%s" % home_page.random_string() api.create_new_system(new_system_name, current_org) home_page.click_tab("systems_tab") systems = SystemsTab(mozwebqa) system_object = systems.select_random systems.system(system_object).click() Assert.true(systems.is_system_details_tab_present) Assert.true(systems.is_system_facts_tab_present) Assert.true(systems.is_system_subscriptions_tab_present)
def test_remove_a_system(self, mozwebqa): ''' create via api and remove a system. ''' home_page = Home(mozwebqa) home_page.login() api = ApiTasks(mozwebqa) current_org = home_page.header.get_text_from_switcher api.create_envs(current_org) new_system_name = "rmsystem%s" % home_page.random_string() api.create_new_system(new_system_name, current_org) home_page.tabs.click_tab("systems_tab") systems = SystemsTab(mozwebqa) home_page.enter_search_criteria(new_system_name) systems.system(new_system_name).click() systems.remove_a_system() Assert.true(home_page.is_successful)