@Test public void returnToAppFromQueryParam() { driver.navigate().to(AccountUpdateProfilePage.PATH + "?referrer=test-app"); loginPage.login("test-user@localhost", "password"); Assert.assertTrue(profilePage.isCurrent()); profilePage.backToApplication(); Assert.assertTrue(appPage.isCurrent()); driver .navigate() .to( AccountUpdateProfilePage.PATH + "?referrer=test-app&referrer_uri=http://localhost:8081/app?test"); Assert.assertTrue(profilePage.isCurrent()); profilePage.backToApplication(); Assert.assertTrue(appPage.isCurrent()); Assert.assertEquals(appPage.baseUrl + "?test", driver.getCurrentUrl()); driver.navigate().to(AccountUpdateProfilePage.PATH + "?referrer=test-app"); Assert.assertTrue(profilePage.isCurrent()); driver.findElement(By.linkText("Authenticator")).click(); Assert.assertTrue(totpPage.isCurrent()); driver.findElement(By.linkText("Account")).click(); Assert.assertTrue(profilePage.isCurrent()); profilePage.backToApplication(); Assert.assertTrue(appPage.isCurrent()); events.clear(); }
@Test public void returnToAppFromQueryParam() { driver.navigate().to(AccountUpdateProfilePage.PATH + "?referrer=test-app"); loginPage.login("test-user@localhost", "password"); Assert.assertTrue(profilePage.isCurrent()); profilePage.backToApplication(); Assert.assertTrue(appPage.isCurrent()); }
@Test public void returnToAppFromHeader() { appPage.open(); appPage.openAccount(); loginPage.login("test-user@localhost", "password"); Assert.assertTrue(profilePage.isCurrent()); profilePage.backToApplication(); Assert.assertTrue(appPage.isCurrent()); }