first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import { test, expect } from '../../../../fixtures/base';
|
||||
|
||||
const INVALID_NAMES = [
|
||||
'https://n8n.io',
|
||||
'http://n8n.io',
|
||||
'www.n8n.io',
|
||||
'n8n.io',
|
||||
'n8n.бг',
|
||||
'n8n.io/home',
|
||||
'n8n.io/home?send=true',
|
||||
'<a href="#">Jack</a>',
|
||||
'<script>alert("Hello")</script>',
|
||||
];
|
||||
|
||||
const VALID_NAMES = [
|
||||
['a', 'a'],
|
||||
['alice', 'alice'],
|
||||
['Robert', 'Downey Jr.'],
|
||||
['Mia', 'Mia-Downey'],
|
||||
['Mark', "O'neil"],
|
||||
['Thomas', 'Müler'],
|
||||
['ßáçøñ', 'ßáçøñ'],
|
||||
['أحمد', 'فلسطين'],
|
||||
['Милорад', 'Филиповић'],
|
||||
];
|
||||
|
||||
test.describe(
|
||||
'Personal Settings',
|
||||
{
|
||||
annotation: [{ type: 'owner', description: 'Identity & Access' }],
|
||||
},
|
||||
() => {
|
||||
test('should allow to change first and last name', async ({ n8n }) => {
|
||||
await n8n.settingsPersonal.goto();
|
||||
|
||||
for (const name of VALID_NAMES) {
|
||||
await n8n.settingsPersonal.fillPersonalData(name[0], name[1]);
|
||||
await n8n.settingsPersonal.saveSettings();
|
||||
|
||||
await expect(
|
||||
n8n.notifications.getNotificationByTitleOrContent('Personal details updated'),
|
||||
).toBeVisible();
|
||||
await n8n.notifications.closeNotificationByText('Personal details updated');
|
||||
}
|
||||
});
|
||||
|
||||
test('should not allow malicious values for personal data', async ({ n8n }) => {
|
||||
await n8n.settingsPersonal.goto();
|
||||
|
||||
for (const name of INVALID_NAMES) {
|
||||
await n8n.settingsPersonal.fillPersonalData(name, name);
|
||||
await n8n.settingsPersonal.saveSettings();
|
||||
|
||||
await expect(
|
||||
n8n.notifications.getNotificationByTitleOrContent('Problem updating your details'),
|
||||
).toBeVisible();
|
||||
await n8n.notifications.closeNotificationByText('Problem updating your details');
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user