[KEYCLOAK-6808] fix for the WildflyConsoleProtectionTest

Access Control is not an 'a' tag, but rather 'span'
Also two tests do not behave correctly with a same
Before annotated initialization, so reduce number
of tests to one, which calls the other one
This commit is contained in:
wyvie 2018-04-05 00:32:35 +02:00 committed by Pavel Drozd
parent 2b14469a58
commit 943bd9e48e
2 changed files with 3 additions and 6 deletions

View file

@ -34,7 +34,7 @@ public class AppServerWelcomePage extends AppServerContextRoot {
@Page
protected OIDCLogin loginPage;
@FindBy(xpath = "//a[text() = 'Access Control']")
@FindBy(xpath = "//span[text() = 'Access Control']")
private WebElement accessControlLink;
@FindBy(xpath = "//a[text() = 'Manage user profile']")

View file

@ -93,8 +93,7 @@ public class WildflyConsoleProtectionTest extends AbstractAdapterTest {
}
}
@Test
public void testLogin() throws InterruptedException {
private void testLogin() throws InterruptedException {
appServerWelcomePage.navigateToConsole();
appServerWelcomePage.login("admin", "admin");
WaitUtils.pause(2000);
@ -103,9 +102,7 @@ public class WildflyConsoleProtectionTest extends AbstractAdapterTest {
@Test
public void testUserCanAccessAccountService() throws InterruptedException {
appServerWelcomePage.navigateToConsole();
appServerWelcomePage.login("admin", "admin");
WaitUtils.pause(2000);
testLogin();
appServerWelcomePage.navigateToAccessControl();
appServerWelcomePage.navigateManageProfile();
assertTrue(accountUpdateProfilePage.isCurrent());