File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 1
- import { FullConfig , request } from ' @playwright/test' ;
1
+ import { FullConfig , request } from " @playwright/test"
2
2
3
3
async function globalSetup ( config : FullConfig ) {
4
- const { baseURL } = config . projects [ 0 ] . use ;
4
+ const { baseURL } = config . projects [ 0 ] . use
5
5
console . log ( " -- Starting global setup: " + baseURL )
6
6
7
7
// Create a context that will issue http requests.
8
8
const context = await request . newContext ( {
9
9
baseURL,
10
- } ) ;
10
+ } )
11
11
12
12
// Create initial user
13
- await context . post (
14
- "/api/v2/user" , {
13
+ await context . post ( "/api/v2/user" , {
15
14
data : {
16
15
email : "admin@coder.com" ,
17
16
username : "admin" ,
18
17
password : "password" ,
19
- organization : "acme-corp"
20
- }
21
- } ) ;
18
+ organization : "acme-corp" ,
19
+ } ,
20
+ } )
22
21
23
22
console . log ( "-- Created initial user." )
24
23
}
25
24
26
- export default globalSetup ;
25
+ export default globalSetup
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import { PlaywrightTestConfig } from "@playwright/test"
3
3
4
4
const config : PlaywrightTestConfig = {
5
5
testDir : "tests" ,
6
- globalSetup : require . resolve ( ' ./globalSetup' ) ,
6
+ globalSetup : require . resolve ( " ./globalSetup" ) ,
7
7
8
8
// Create junit report file for upload to DataDog
9
- reporter : [ [ ' junit' , { outputFile : ' test-results/junit.xml' } ] ] ,
9
+ reporter : [ [ " junit" , { outputFile : " test-results/junit.xml" } ] ] ,
10
10
11
11
use : {
12
12
baseURL : "http://localhost:3000" ,
You can’t perform that action at this time.
0 commit comments