Skip to content

Commit 145be64

Browse files
committed
add authStorageFile to metadata
1 parent acd8f53 commit 145be64

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

testing/e2e/playwright.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { parseNumber, range, unwrap } from '@douglasneuroinformatics/libjs';
55
import { defineConfig, devices } from '@playwright/test';
66
import type { Project } from '@playwright/test';
77

8+
import { AUTH_STORAGE_DIR } from './src/helpers/constants';
9+
810
import type { BrowserName, ProjectMetadata } from './src/helpers/types';
911

1012
const apiPort = parseNumber(process.env.API_DEV_SERVER_PORT);
@@ -49,11 +51,13 @@ export default defineConfig({
4951
},
5052
...unwrap(range(1, 4)).flatMap((i) => {
5153
return browsers.map((browser) => {
54+
const browserId = crypto.createHash('sha256').update(browser.target).digest('hex');
5255
return {
5356
dependencies: i === 1 ? ['Global Setup'] : [`${i - 1}.x - ${browser.target}`],
5457
metadata: {
58+
authStorageFile: path.resolve(AUTH_STORAGE_DIR, `${browserId}.json`),
5559
browser: {
56-
id: crypto.createHash('sha256').update(browser.target).digest('hex'),
60+
id: browserId,
5761
name: browser.target
5862
}
5963
} satisfies ProjectMetadata,

testing/e2e/src/helpers/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export type NavigateVariadicArgs<TPath extends RouteTo> = IfNever<
3333
export type NavigateArgs<TPath extends RouteTo> = [to: TPath, ...NavigateVariadicArgs<TPath>];
3434

3535
export type ProjectMetadata = {
36+
authStorageFile: string;
3637
browser: {
3738
id: string;
3839
name: BrowserName;

0 commit comments

Comments
 (0)