mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
feat: Add testcontainers and Playwright (no-changelog) (#16662)
Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
This commit is contained in:
77
packages/testing/playwright/config/test-users.ts
Normal file
77
packages/testing/playwright/config/test-users.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
import { DEFAULT_USER_PASSWORD } from './constants';
|
||||
|
||||
export interface UserCredentials {
|
||||
email: string;
|
||||
password: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
}
|
||||
|
||||
// Simple name generators
|
||||
const FIRST_NAMES = [
|
||||
'Alex',
|
||||
'Jordan',
|
||||
'Taylor',
|
||||
'Morgan',
|
||||
'Casey',
|
||||
'Riley',
|
||||
'Avery',
|
||||
'Quinn',
|
||||
'Sam',
|
||||
'Drew',
|
||||
'Blake',
|
||||
'Sage',
|
||||
'River',
|
||||
'Rowan',
|
||||
'Skylar',
|
||||
'Emery',
|
||||
];
|
||||
|
||||
const LAST_NAMES = [
|
||||
'Smith',
|
||||
'Johnson',
|
||||
'Williams',
|
||||
'Brown',
|
||||
'Jones',
|
||||
'Garcia',
|
||||
'Miller',
|
||||
'Davis',
|
||||
'Rodriguez',
|
||||
'Martinez',
|
||||
'Hernandez',
|
||||
'Lopez',
|
||||
'Gonzalez',
|
||||
'Wilson',
|
||||
'Anderson',
|
||||
'Thomas',
|
||||
];
|
||||
|
||||
const getRandomName = (names: string[]): string => {
|
||||
return names[Math.floor(Math.random() * names.length)];
|
||||
};
|
||||
|
||||
const randFirstName = (): string => getRandomName(FIRST_NAMES);
|
||||
const randLastName = (): string => getRandomName(LAST_NAMES);
|
||||
|
||||
export const INSTANCE_OWNER_CREDENTIALS: UserCredentials = {
|
||||
email: 'nathan@n8n.io',
|
||||
password: DEFAULT_USER_PASSWORD,
|
||||
firstName: randFirstName(),
|
||||
lastName: randLastName(),
|
||||
};
|
||||
|
||||
export const INSTANCE_ADMIN_CREDENTIALS: UserCredentials = {
|
||||
email: 'admin@n8n.io',
|
||||
password: DEFAULT_USER_PASSWORD,
|
||||
firstName: randFirstName(),
|
||||
lastName: randLastName(),
|
||||
};
|
||||
|
||||
export const INSTANCE_MEMBER_CREDENTIALS: UserCredentials[] = [
|
||||
{
|
||||
email: 'member@n8n.io',
|
||||
password: DEFAULT_USER_PASSWORD,
|
||||
firstName: randFirstName(),
|
||||
lastName: randLastName(),
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user