def test_tiny_letter_link(player_wizard, browser): # noqa """As a player, navbar footer links to tiny letter.""" print('As a player, navbar footer links to tiny letter.') footer = Footer(browser) footer.tiny_letter.click() WebDriverWait(browser, 20).until(EC.number_of_windows_to_be(2)) browser.switch_to.window(browser.window_handles[1]) WebDriverWait(browser, 20).until( url_in_new_tab_matches('https://tinyletter.com/adventurerscodex')) assert browser.current_url == 'https://tinyletter.com/adventurerscodex'
def test_patreon_link(player_wizard, browser): # noqa """As a player, navbar footer links to patreon.""" print('As a player, navbar footer links to patreon.') footer = Footer(browser) footer.patreon.click() WebDriverWait(browser, 20).until(EC.number_of_windows_to_be(2)) browser.switch_to.window(browser.window_handles[1]) WebDriverWait(browser, 20).until( url_in_new_tab_matches('https://www.patreon.com/bePatron?u=5313385')) assert browser.current_url == 'https://www.patreon.com/bePatron?u=5313385'
def test_google_plus_link(player_wizard, browser): # noqa """As a player, navbar footer links to google +.""" print('As a player, navbar footer links to google +.') footer = Footer(browser) footer.google_plus.click() WebDriverWait(browser, 20).until(EC.number_of_windows_to_be(2)) browser.switch_to.window(browser.window_handles[1]) WebDriverWait(browser, 20).until( url_in_new_tab_matches( 'https://plus.google.com/105624626079092258118')) assert browser.current_url == 'https://plus.google.com/105624626079092258118'
def test_ogl_link(player_wizard, browser): # noqa """As a player, navbar footer links to ogl.""" print('As a player, navbar footer links to ogl.') footer = Footer(browser) footer.ogl.click() WebDriverWait(browser, 20).until(EC.number_of_windows_to_be(2)) browser.switch_to.window(browser.window_handles[1]) WebDriverWait(browser, 20).until( url_in_new_tab_matches( 'http://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf')) assert browser.current_url == 'http://media.wizards.com/2016/downloads/DND/SRD-OGL_V5.1.pdf'
def test_markdown_cheatsheet_link(player_wizard, browser): # noqa """As a player, I can click on the link to the markdown guide.""" print('As a player, I can click on the link to the markdown guide.') notes_list = NotesList(browser) notes_detail = NotesDetail(browser) tabs = Tabs(browser) tabs.notes.click() notes_list.add.click() notes_detail.edit_textarea = 'Test Note 1' notes_detail.markdown_cheatcheat.click() WebDriverWait(browser, 20).until(EC.number_of_windows_to_be(2)) browser.switch_to.window(browser.window_handles[1]) WebDriverWait(browser, 20).until( url_in_new_tab_matches( 'https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet') ) assert browser.current_url == 'https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet'