Prevent multiple saves when creating new provider (#411)
* go to user fed view after create * fix for misc 401 exceptions
This commit is contained in:
parent
9c1efdcc3b
commit
4ee7bc9033
3 changed files with 11 additions and 3 deletions
|
@ -54,12 +54,18 @@ const disableModalTitle = "Disable user federation provider?";
|
|||
|
||||
describe("User Fed LDAP tests", () => {
|
||||
beforeEach(() => {
|
||||
/*
|
||||
Prevent unpredictable 401 errors from failing individual tests.
|
||||
These are most often occurring during the login process:
|
||||
GET /admin/serverinfo/
|
||||
GET /admin/master/console/whoami
|
||||
*/
|
||||
cy.on("uncaught:exception", (err, runnable) => {
|
||||
return false;
|
||||
});
|
||||
cy.visit("");
|
||||
cy.wait(1000);
|
||||
loginPage.logIn();
|
||||
cy.wait(1000);
|
||||
sidebarPage.goToUserFederation();
|
||||
cy.wait(1000);
|
||||
});
|
||||
|
||||
it("Create Ldap provider from empty state", () => {
|
||||
|
|
|
@ -120,6 +120,7 @@ export const UserFederationKerberosSettings = () => {
|
|||
if (id) {
|
||||
if (id === "new") {
|
||||
await adminClient.components.create(component);
|
||||
history.push(`/${realm}/user-federation`);
|
||||
} else {
|
||||
await adminClient.components.update({ id }, component);
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ export const UserFederationLdapSettings = () => {
|
|||
if (id) {
|
||||
if (id === "new") {
|
||||
await adminClient.components.create(component);
|
||||
history.push(`/${realm}/user-federation`);
|
||||
} else {
|
||||
await adminClient.components.update({ id }, component);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue