mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-12 16:10:30 +02:00
38 lines
977 B
TypeScript
38 lines
977 B
TypeScript
import { test, expect } from '../../../fixtures/base';
|
|
|
|
test.use({
|
|
capability: 'oidc',
|
|
ignoreHTTPSErrors: true, // Keycloak uses self-signed certs
|
|
});
|
|
|
|
test.describe(
|
|
'OIDC Authentication @capability:oidc @licensed',
|
|
{
|
|
annotation: [{ type: 'owner', description: 'Identity & Access' }],
|
|
},
|
|
() => {
|
|
test('should configure OIDC and login with Keycloak @auth:owner', async ({
|
|
n8n,
|
|
api,
|
|
services,
|
|
}) => {
|
|
const keycloak = services.keycloak;
|
|
await api.enableFeature('oidc');
|
|
await n8n.oidcComposer.configureOidc(
|
|
keycloak.internalDiscoveryUrl,
|
|
keycloak.clientId,
|
|
keycloak.clientSecret,
|
|
);
|
|
|
|
await n8n.sideBar.signOutFromWorkflows();
|
|
await n8n.page.waitForURL('/signin');
|
|
|
|
await n8n.signIn.getSsoButton().click();
|
|
await n8n.keycloakLogin.login(keycloak.testUser.email, keycloak.testUser.password);
|
|
|
|
await expect(n8n.page).toHaveURL(/\/(workflow|home)/);
|
|
await expect(n8n.sideBar.getSettings()).toBeVisible();
|
|
});
|
|
},
|
|
);
|