2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-06-12 11:38:47 +00:00

refactor(frontend): use central user creds (#11520)

This commit is contained in:
Matthias Mair
2026-03-14 03:29:46 +01:00
committed by GitHub
parent fda3204e33
commit d7af345e20
22 changed files with 118 additions and 105 deletions
+11 -9
View File
@@ -2,7 +2,13 @@ import { type FullConfig, chromium, request } from '@playwright/test';
import fs from 'node:fs';
import path from 'node:path';
import { apiUrl } from '../tests/defaults';
import {
adminuser,
allaccessuser,
apiUrl,
readeruser,
stevenuser
} from '../tests/defaults';
import { doCachedLogin } from '../tests/login';
async function globalSetup(config: FullConfig) {
@@ -45,26 +51,22 @@ async function globalSetup(config: FullConfig) {
// Perform login for each user (each in a separate browser instance)
await doCachedLogin(await chromium.launch(), {
username: 'admin',
password: 'inventree',
user: adminuser,
baseUrl: baseUrl
});
await doCachedLogin(await chromium.launch(), {
username: 'allaccess',
password: 'nolimits',
user: allaccessuser,
baseUrl: baseUrl
});
await doCachedLogin(await chromium.launch(), {
username: 'reader',
password: 'readonly',
user: readeruser,
baseUrl: baseUrl
});
await doCachedLogin(await chromium.launch(), {
username: 'steven',
password: 'wizardstaff',
user: stevenuser,
baseUrl: baseUrl
});
}