From c036253ac542dd8babaa4fc579ae89467a05d9dd Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Fri, 7 May 2021 09:45:42 +0200 Subject: [PATCH] fixed test by clearing field first --- .../pages/admin_console/manage/providers/ProviderPage.ts | 2 +- src/user-federation/ldap/LdapSettingsGeneral.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/support/pages/admin_console/manage/providers/ProviderPage.ts b/cypress/support/pages/admin_console/manage/providers/ProviderPage.ts index 43470e3ae7..659cfb7296 100644 --- a/cypress/support/pages/admin_console/manage/providers/ProviderPage.ts +++ b/cypress/support/pages/admin_console/manage/providers/ProviderPage.ts @@ -117,7 +117,7 @@ export default class ProviderPage { fillLdapRequiredGeneralData(name: string, vendor: string) { if (name) { - cy.get(`[${this.ldapNameInput}]`).type(name); + cy.get(`[${this.ldapNameInput}]`).clear().type(name); } if (vendor) { cy.get(this.ldapVendorInput).click(); diff --git a/src/user-federation/ldap/LdapSettingsGeneral.tsx b/src/user-federation/ldap/LdapSettingsGeneral.tsx index f47dd7fc03..b3b3ac86ca 100644 --- a/src/user-federation/ldap/LdapSettingsGeneral.tsx +++ b/src/user-federation/ldap/LdapSettingsGeneral.tsx @@ -83,7 +83,7 @@ export const LdapSettingsGeneral = ({ type="text" id="kc-console-display-name" name="name" - defaultValue="" + defaultValue="ldap" ref={form.register({ required: { value: true,