mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-14 07:12:19 +00:00
feat: add audit log with email notification (#26)
This commit is contained in:
@@ -21,6 +21,33 @@ test('Update general configuration', async ({ page }) => {
|
||||
await expect(page.getByLabel('Session Duration')).toHaveValue('30');
|
||||
});
|
||||
|
||||
test('Update email configuration', async ({ page }) => {
|
||||
await page.goto('/settings/admin/application-configuration');
|
||||
|
||||
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');
|
||||
await page.getByLabel('SMTP Password').fill('password');
|
||||
await page.getByLabel('SMTP From').fill('test@gmail.com');
|
||||
await page.getByRole('button', { name: 'Enable' }).click();
|
||||
await page.getByRole('status').click();
|
||||
|
||||
await expect(page.getByRole('status')).toHaveText('Email configuration updated successfully');
|
||||
await expect(page.getByRole('button', { name: 'Disable' })).toBeVisible();
|
||||
|
||||
await page.reload();
|
||||
|
||||
await expect(page.getByLabel('SMTP Host')).toHaveValue('smtp.gmail.com');
|
||||
await expect(page.getByLabel('SMTP Port')).toHaveValue('587');
|
||||
await expect(page.getByLabel('SMTP User')).toHaveValue('test@gmail.com');
|
||||
await expect(page.getByLabel('SMTP Password')).toHaveValue('password');
|
||||
await expect(page.getByLabel('SMTP From')).toHaveValue('test@gmail.com');
|
||||
|
||||
await page.getByRole('button', { name: 'Disable' }).click();
|
||||
|
||||
await expect(page.getByRole('status')).toHaveText('Email disabled successfully');
|
||||
});
|
||||
|
||||
test('Update application images', async ({ page }) => {
|
||||
await page.goto('/settings/admin/application-configuration');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user