Don't use a default value in BooleanComponent
(#3822)
This commit is contained in:
parent
c3b08cd601
commit
2f8980d09a
2 changed files with 9 additions and 4 deletions
|
@ -142,32 +142,38 @@ describe("Realm settings events tab tests", () => {
|
|||
|
||||
cy.findByTestId("option-aes-generated").click();
|
||||
realmSettingsPage.enterConsoleDisplayName("test_aes-generated");
|
||||
realmSettingsPage.toggleSwitch("active", false);
|
||||
realmSettingsPage.toggleSwitch("enabled", false);
|
||||
realmSettingsPage.addProvider();
|
||||
|
||||
realmSettingsPage.toggleAddProviderDropdown();
|
||||
|
||||
cy.findByTestId("option-ecdsa-generated").click();
|
||||
realmSettingsPage.enterConsoleDisplayName("test_ecdsa-generated");
|
||||
realmSettingsPage.toggleSwitch("active", false);
|
||||
realmSettingsPage.toggleSwitch("enabled", false);
|
||||
realmSettingsPage.addProvider();
|
||||
|
||||
realmSettingsPage.toggleAddProviderDropdown();
|
||||
|
||||
cy.findByTestId("option-hmac-generated").click();
|
||||
realmSettingsPage.enterConsoleDisplayName("test_hmac-generated");
|
||||
realmSettingsPage.toggleSwitch("enabled", false);
|
||||
realmSettingsPage.toggleSwitch("active", false);
|
||||
realmSettingsPage.addProvider();
|
||||
|
||||
realmSettingsPage.toggleAddProviderDropdown();
|
||||
|
||||
cy.findByTestId("option-rsa-generated").click();
|
||||
realmSettingsPage.enterConsoleDisplayName("test_rsa-generated");
|
||||
realmSettingsPage.toggleSwitch("active", false);
|
||||
realmSettingsPage.toggleSwitch("enabled", false);
|
||||
realmSettingsPage.addProvider();
|
||||
|
||||
realmSettingsPage.toggleAddProviderDropdown();
|
||||
|
||||
cy.findByTestId("option-rsa-enc-generated").click();
|
||||
realmSettingsPage.enterConsoleDisplayName("test_rsa-enc-generated");
|
||||
realmSettingsPage.toggleSwitch("active", false);
|
||||
realmSettingsPage.toggleSwitch("enabled", false);
|
||||
realmSettingsPage.addProvider();
|
||||
});
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ export const BooleanComponent = ({
|
|||
name,
|
||||
label,
|
||||
helpText,
|
||||
defaultValue,
|
||||
isDisabled = false,
|
||||
}: ComponentProps) => {
|
||||
const { t } = useTranslation("dynamic");
|
||||
|
@ -28,7 +27,7 @@ export const BooleanComponent = ({
|
|||
<Controller
|
||||
name={convertToName(name!)}
|
||||
data-testid={name}
|
||||
defaultValue={defaultValue || false}
|
||||
defaultValue={false}
|
||||
control={control}
|
||||
render={({ onChange, value }) => (
|
||||
<Switch
|
||||
|
|
Loading…
Reference in a new issue