test: e2e oidc (#11129)
Co-authored-by: Syed Ali Shahbaz <[email protected]>
This commit is contained in:
1 parent
c820a3937a
commit
fd507f1d12
6 files changed
+105
-5
No files matched your search
@@ -57,7 +57,11 @@ export default function ConnectionInfo({
|
||||
<Dialog>
|
||||
<div>
|
||||
<DialogTrigger asChild>
|
||||
<Button color="destructive">{t("delete_sso_configuration", { connectionType })}</Button>
|
||||
<Button
|
||||
color="destructive"
|
||||
data-testid={`delete-${connectionType === "OIDC" ? "oidc" : "saml"}-sso-connection`}>
|
||||
{t("delete_sso_configuration", { connectionType })}
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
</div>
|
||||
<ConfirmationDialogContent
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function OIDCConnection({
|
||||
</div>
|
||||
{!connection && (
|
||||
<div className="flex-shrink-0 pt-3 sm:ml-auto sm:pl-3 sm:pt-0">
|
||||
<Button color="secondary" onClick={() => setOpenModal(true)}>
|
||||
<Button data-testid="sso-oidc-configure" color="secondary" onClick={() => setOpenModal(true)}>
|
||||
{t("configure")}
|
||||
</Button>
|
||||
</div>
|
||||
@@ -100,6 +100,7 @@ const CreateConnectionDialog = ({
|
||||
<TextField
|
||||
name="clientId"
|
||||
label="Client id"
|
||||
data-testid="sso-oidc-client-id"
|
||||
value={value}
|
||||
onChange={(e) => {
|
||||
form.setValue("clientId", e?.target.value);
|
||||
@@ -116,6 +117,7 @@ const CreateConnectionDialog = ({
|
||||
<TextField
|
||||
name="clientSecret"
|
||||
label="Client secret"
|
||||
data-testid="sso-oidc-client-secret"
|
||||
value={value}
|
||||
onChange={(e) => {
|
||||
form.setValue("clientSecret", e?.target.value);
|
||||
@@ -132,6 +134,7 @@ const CreateConnectionDialog = ({
|
||||
<TextField
|
||||
name="wellKnownUrl"
|
||||
label="Well-Known URL"
|
||||
data-testid="sso-oidc-well-known-url"
|
||||
value={value}
|
||||
onChange={(e) => {
|
||||
form.setValue("wellKnownUrl", e?.target.value);
|
||||
@@ -152,7 +155,7 @@ const CreateConnectionDialog = ({
|
||||
tabIndex={-1}>
|
||||
{t("cancel")}
|
||||
</Button>
|
||||
<Button type="submit" loading={form.formState.isSubmitting}>
|
||||
<Button type="submit" data-testid="sso-oidc-save" loading={form.formState.isSubmitting}>
|
||||
{t("save")}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
Reference in new issue
Block a user