This repository was archived by the owner on Jan 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -3,18 +3,18 @@ import ms from "ms";
3
3
import child_process from "node:child_process" ;
4
4
import { promisify } from "node:util" ;
5
5
import { globalCredentials } from "./global-credentials" ;
6
- import { registerUser } from "./register-user.function" ;
6
+ import { registerUserViaApi } from "./register-user.function" ;
7
7
8
8
const exec = promisify ( child_process . exec ) ;
9
9
10
- test ( "Global setup" , async ( { page } ) => {
10
+ test ( "Global setup" , async ( { page, request } ) => {
11
11
test . setTimeout ( ms ( "20 seconds" ) ) ;
12
12
await exec ( "docker compose up --detach" ) ;
13
13
14
14
console . log ( "Waiting for servers to be ready..." ) ;
15
15
await exec ( "npm run wait:servers" ) ;
16
16
console . log ( "Servers are ready ✔" ) ;
17
17
18
- await registerUser ( page , globalCredentials ) ;
18
+ await registerUserViaApi ( request , globalCredentials ) ;
19
19
console . log ( "Global setup complete ✔" ) ;
20
20
} ) ;
Original file line number Diff line number Diff line change @@ -4,16 +4,15 @@ import { Credentials } from "_server/types/credentials";
4
4
import { UserMessage } from "../../src/app/types/user-message.enum" ;
5
5
import { test } from "../fixtures" ;
6
6
import { logInUser } from "../log-in-user.function" ;
7
- import { registerUser } from "../register-user.function" ;
7
+ import { registerUserViaApi } from "../register-user.function" ;
8
8
9
9
test . describe ( "Session revocation" , ( ) => {
10
10
let credentials : Credentials ;
11
11
12
- test . beforeEach ( async ( { browser, page } ) => {
13
- const context = await browser . newContext ( ) ;
12
+ test . beforeEach ( async ( { page, request } ) => {
14
13
credentials = getFakeCredentials ( ) ;
15
14
16
- await registerUser ( await context . newPage ( ) , credentials ) ;
15
+ await registerUserViaApi ( request , credentials ) ;
17
16
await logInUser ( page , credentials ) ;
18
17
} ) ;
19
18
You can’t perform that action at this time.
0 commit comments