mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-21 21:49:20 +00:00
feat: map allowed groups to OIDC clients (#202)
This commit is contained in:
@@ -24,6 +24,8 @@ test('Update general configuration', async ({ page }) => {
|
||||
test('Update email configuration', async ({ page }) => {
|
||||
await page.goto('/settings/admin/application-configuration');
|
||||
|
||||
await page.getByRole('button', { name: 'Expand card' }).nth(1).click();
|
||||
|
||||
await page.getByLabel('SMTP Host').fill('smtp.gmail.com');
|
||||
await page.getByLabel('SMTP Port').fill('587');
|
||||
await page.getByLabel('SMTP User').fill('test@gmail.com');
|
||||
@@ -47,14 +49,53 @@ test('Update email configuration', async ({ page }) => {
|
||||
await expect(page.getByLabel('Email One Time Access')).toBeChecked();
|
||||
});
|
||||
|
||||
test('Update LDAP configuration', async ({ page }) => {
|
||||
await page.goto('/settings/admin/application-configuration');
|
||||
|
||||
await page.getByRole('button', { name: 'Expand card' }).nth(2).click();
|
||||
|
||||
await page.getByLabel('LDAP URL').fill('ldap://localhost:389');
|
||||
await page.getByLabel('LDAP Bind DN').fill('cn=admin,dc=example,dc=com');
|
||||
await page.getByLabel('LDAP Bind Password').fill('password');
|
||||
await page.getByLabel('LDAP Base DN').fill('dc=example,dc=com');
|
||||
await page.getByLabel('User Unique Identifier Attribute').fill('uuid');
|
||||
await page.getByLabel('Username Attribute').fill('uid');
|
||||
await page.getByLabel('User Mail Attribute').fill('mail');
|
||||
await page.getByLabel('User First Name Attribute').fill('givenName');
|
||||
await page.getByLabel('User Last Name Attribute').fill('sn');
|
||||
await page.getByLabel('Group Unique Identifier Attribute').fill('uuid');
|
||||
await page.getByLabel('Group Name Attribute').fill('cn');
|
||||
await page.getByLabel('Admin Group Name').fill('admin');
|
||||
|
||||
await page.getByRole('button', { name: 'Enable' }).click();
|
||||
|
||||
await expect(page.getByRole('status')).toHaveText('LDAP configuration updated successfully');
|
||||
|
||||
await page.reload();
|
||||
|
||||
await expect(page.getByRole('button', { name: 'Disable' })).toBeVisible();
|
||||
await expect(page.getByLabel('LDAP URL')).toHaveValue('ldap://localhost:389');
|
||||
await expect(page.getByLabel('LDAP Bind DN')).toHaveValue('cn=admin,dc=example,dc=com');
|
||||
await expect(page.getByLabel('LDAP Bind Password')).toHaveValue('password');
|
||||
await expect(page.getByLabel('LDAP Base DN')).toHaveValue('dc=example,dc=com');
|
||||
await expect(page.getByLabel('User Unique Identifier Attribute')).toHaveValue('uuid');
|
||||
await expect(page.getByLabel('Username Attribute')).toHaveValue('uid');
|
||||
await expect(page.getByLabel('User Mail Attribute')).toHaveValue('mail');
|
||||
await expect(page.getByLabel('User First Name Attribute')).toHaveValue('givenName');
|
||||
await expect(page.getByLabel('User Last Name Attribute')).toHaveValue('sn');
|
||||
await expect(page.getByLabel('Admin Group Name')).toHaveValue('admin');
|
||||
});
|
||||
|
||||
test('Update application images', async ({ page }) => {
|
||||
await page.goto('/settings/admin/application-configuration');
|
||||
|
||||
await page.getByRole('button', { name: 'Expand card' }).nth(3).click();
|
||||
|
||||
await page.getByLabel('Favicon').setInputFiles('tests/assets/w3-schools-favicon.ico');
|
||||
await page.getByLabel('Light Mode Logo').setInputFiles('tests/assets/pingvin-share-logo.png');
|
||||
await page.getByLabel('Dark Mode Logo').setInputFiles('tests/assets/nextcloud-logo.png');
|
||||
await page.getByLabel('Background Image').setInputFiles('tests/assets/clouds.jpg');
|
||||
await page.getByRole('button', { name: 'Save' }).nth(2).click();
|
||||
await page.getByRole('button', { name: 'Save' }).nth(1).click();
|
||||
|
||||
await expect(page.getByRole('status')).toHaveText('Images updated successfully');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user