def test_setting(browser, login, close): """Test that 'Settings' page is seen if select 'Settings' option in 'Hello, User' dropdown""" about_page = AboutPage(browser) about_page.load() about_page.hello_user_click() about_page.user_settings_select() assert browser.current_url == locators.SettingsPageLocators.SETTINGS_URL
def test_logout(browser, login): """Test that 'Sign In' page is seen if select 'Logout' option in 'Hello, User' dropdown""" about_page = AboutPage(browser) about_page.load() about_page.hello_user_click() about_page.user_logout_select() assert about_page.get_title() == 'Sign In'
def test_dropdown_options(browser, login, close): """Check the available dropdown settings from the About page""" about_page = AboutPage(browser) about_page.load() about_page.hello_user_click() dropdown_elements_names = [ x.text for x in browser.find_elements( *locators.BasePageLocators.SETTINGS_OPT_NAMES) ] assert dropdown_elements_names[0][ -8:] == 'Settings' and dropdown_elements_names[1][-6:] == 'Logout'