File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 37
37
- uses : microsoft/playwright-github-action@v1
38
38
- name : Install dependencies and run tests
39
39
run : |
40
- node code-server*-linux-amd64 &
40
+ PASSWORD=e45432jklfdsab node code-server*-linux-amd64 &
41
41
yarn
42
42
yarn test
43
43
pkill node
Original file line number Diff line number Diff line change 1
1
import { chromium , Page , Browser , BrowserContext } from "playwright"
2
2
3
+ // NOTE: this is hard-coded and passed as an environment variable
4
+ // See the test job in ci.yml
5
+ const PASSWORD = "e45432jklfdsab"
6
+
3
7
describe ( "login" , ( ) => {
4
8
let browser : Browser
5
9
let page : Page
@@ -20,6 +24,7 @@ describe("login", () => {
20
24
21
25
afterEach ( async ( ) => {
22
26
await page . close ( )
27
+ // Remove password from local storage
23
28
await context . clearCookies ( )
24
29
} )
25
30
@@ -31,15 +36,12 @@ describe("login", () => {
31
36
32
37
it ( "should be able to login with the password from config.yml" , async ( ) => {
33
38
await page . goto ( "http://localhost:8080" )
34
- // Get password
35
- const password = "helloworld"
36
39
// Type in password
37
- await page . fill ( ".password" , password )
40
+ await page . fill ( ".password" , PASSWORD )
38
41
// Click the submit button and login
39
42
await page . click ( ".submit" )
40
43
// See the editor
41
44
const codeServerEditor = await page . isVisible ( ".monaco-workbench" )
42
45
expect ( codeServerEditor ) . toBeTruthy ( )
43
- // Remove password from local storage
44
46
} )
45
47
} )
You can’t perform that action at this time.
0 commit comments