Merge pull request #2319 from stianst/KEYCLOAK-2580
KEYCLOAK-2580 Failed to create execution flow
This commit is contained in:
commit
b6118a6705
2 changed files with 20 additions and 1 deletions
|
@ -581,7 +581,7 @@ public class AuthenticationManagementResource {
|
|||
}
|
||||
|
||||
public List<AuthenticationExecutionModel> getSortedExecutions(AuthenticationFlowModel parentFlow) {
|
||||
List<AuthenticationExecutionModel> executions = realm.getAuthenticationExecutions(parentFlow.getId());
|
||||
List<AuthenticationExecutionModel> executions = new LinkedList<>(realm.getAuthenticationExecutions(parentFlow.getId()));
|
||||
Collections.sort(executions, AuthenticationExecutionModel.ExecutionComparator.SINGLETON);
|
||||
return executions;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.junit.Assert;
|
|||
import org.junit.Test;
|
||||
import org.keycloak.representations.idm.AuthenticationExecutionExportRepresentation;
|
||||
import org.keycloak.representations.idm.AuthenticationFlowRepresentation;
|
||||
import org.keycloak.testsuite.admin.ApiUtil;
|
||||
|
||||
import javax.ws.rs.BadRequestException;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
@ -172,4 +173,22 @@ public class FlowTest extends AbstractAuthenticationTest {
|
|||
compareFlows(browser, copyOfBrowser);
|
||||
}
|
||||
|
||||
@Test
|
||||
// KEYCLOAK-2580
|
||||
public void addExecutionFlow() {
|
||||
HashMap<String, String> params = new HashMap<>();
|
||||
params.put("newName", "parent");
|
||||
Response response = authMgmtResource.copy("browser", params);
|
||||
Assert.assertEquals(201, response.getStatus());
|
||||
response.close();
|
||||
|
||||
params = new HashMap<>();
|
||||
params.put("alias", "child");
|
||||
params.put("description", "Description");
|
||||
params.put("provider", "registration-page-form");
|
||||
params.put("type", "basic-flow");
|
||||
|
||||
authMgmtResource.addExecutionFlow("parent", params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue