Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@
import org.keycloak.testsuite.pages.AppPage;
import org.keycloak.testsuite.pages.ErrorPage;
import org.keycloak.testsuite.pages.LoginPage;
import org.keycloak.testsuite.pages.PushTheButtonPage;

import org.jboss.arquillian.graphene.page.Page;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.openqa.selenium.By;

/**
* @author <a href="mailto:n1330@me.com">Tomohiro Nagai</a>
Expand All @@ -59,6 +58,9 @@ public class AuthenticatorSubflowsTest2 extends AbstractChangeImportedUserPasswo
@Page
protected ErrorPage errorPage;

@Page
protected PushTheButtonPage pushTheButtonPage;

@Before
public void setupFlows() {
testingClient.server().run(session -> {
Expand Down Expand Up @@ -179,10 +181,10 @@ public void testSubflow2() throws Exception {

// Fill username+password. I am redirected push the button.
oauth.fillLoginForm("test-user@localhost", getPassword("test-user@localhost"));
Assert.assertEquals("PushTheButton", driver.getTitle());
pushTheButtonPage.assertCurrent();

// Push the button. I am successfully authenticated.
driver.findElement(By.name("submit1")).click();
pushTheButtonPage.submit();
appPage.assertCurrent();

events.expectLogin().detail(Details.USERNAME, "test-user@localhost").assertEvent();
Expand Down
Loading