File tree Expand file tree Collapse file tree 3 files changed +17
-28
lines changed Expand file tree Collapse file tree 3 files changed +17
-28
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,16 @@ import { test, expect } from "@playwright/test"
2
2
import { CODE_SERVER_ADDRESS , PASSWORD } from "../utils/constants"
3
3
4
4
test . describe ( "login" , ( ) => {
5
- test . beforeEach ( async ( { page } ) => {
6
- // TODO@jsjoeio reset the browser
7
- await page . goto ( CODE_SERVER_ADDRESS , { waitUntil : "networkidle" } )
8
- } )
5
+ // Reset the browser so no cookies are persisted
6
+ // by emptying the storageState
7
+ const options = {
8
+ contextOptions : {
9
+ storageState : { } ,
10
+ } ,
11
+ }
9
12
10
- test ( "should be able to login" , async ( { page } ) => {
13
+ test ( "should be able to login" , options , async ( { page } ) => {
14
+ await page . goto ( CODE_SERVER_ADDRESS , { waitUntil : "networkidle" } )
11
15
// Type in password
12
16
await page . fill ( ".password" , PASSWORD )
13
17
// Click the submit button and login
Original file line number Diff line number Diff line change 10
10
"jest" : " ^26.6.3" ,
11
11
"jsdom" : " ^16.4.0" ,
12
12
"node-fetch" : " ^2.6.1" ,
13
- "playwright" : " ^1.8.0 " ,
13
+ "playwright" : " ^1.11.0-next-alpha-apr-13-2021 " ,
14
14
"supertest" : " ^6.1.1" ,
15
15
"ts-jest" : " ^26.4.4"
16
+ },
17
+ "resolutions" : {
18
+ "@playwright/test/playwright" : " ^1.11.0-next-alpha-apr-13-2021"
16
19
}
17
20
}
Original file line number Diff line number Diff line change @@ -3889,10 +3889,10 @@ pkg-dir@^4.2.0:
3889
3889
dependencies :
3890
3890
find-up "^4.0.0"
3891
3891
3892
- playwright@=1.10.0 :
3893
- version "1.10.0 "
3894
- resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.10.0 .tgz#a14d295f1ad886caf4cc5e674afe03ac832066bc "
3895
- integrity sha512-b7SGBcCPq4W3pb4ImEDmNXtO0ZkJbZMuWiShsaNJd+rGfY/6fqwgllsAojmxGSgFmijYw7WxCoPiAIEDIH16Kw ==
3892
+ playwright@=1.10.0, playwright@^1.11.0-next-alpha-apr-13-2021 :
3893
+ version "1.11.0-next-alpha-apr-13-2021 "
3894
+ resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.11.0-next-alpha-apr-13-2021 .tgz#f8398f3521cfe044389e3fc9bf48f14784789225 "
3895
+ integrity sha512-0aMrEvCUQ+W6f1zUyRts2dXl+rm1ICD57y9duwvibhV3gqiSxH3owQB0EGODOpTMPCP3c2W6FcQiJ9hElBbuig ==
3896
3896
dependencies :
3897
3897
commander "^6.1.0"
3898
3898
debug "^4.1.1"
@@ -3908,24 +3908,6 @@ playwright@=1.10.0:
3908
3908
stack-utils "^2.0.3"
3909
3909
ws "^7.3.1"
3910
3910
3911
- playwright@^1.8.0 :
3912
- version "1.8.0"
3913
- resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.8.0.tgz#8eca2250967ee892b9fdfec44e2358455ab0f8e3"
3914
- integrity sha512-urMJDLX92KawbkWKrt3chVVBPQsuuNwlS5St7I5YQENXAEItoyUqX7FjiYaoPgXifKqe1+BKC+7pBAq1QUkgSw==
3915
- dependencies :
3916
- commander "^6.1.0"
3917
- debug "^4.1.1"
3918
- extract-zip "^2.0.1"
3919
- https-proxy-agent "^5.0.0"
3920
- jpeg-js "^0.4.2"
3921
- mime "^2.4.6"
3922
- pngjs "^5.0.0"
3923
- progress "^2.0.3"
3924
- proper-lockfile "^4.1.1"
3925
- proxy-from-env "^1.1.0"
3926
- rimraf "^3.0.2"
3927
- ws "^7.3.1"
3928
-
3929
3911
pngjs@^4.0.1 :
3930
3912
version "4.0.1"
3931
3913
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-4.0.1.tgz#f803869bb2fc1bfe1bf99aa4ec21c108117cfdbe"
You can’t perform that action at this time.
0 commit comments