File tree 4 files changed +15
-18
lines changed
4 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -350,11 +350,11 @@ jobs:
350
350
if : always()
351
351
uses : actions/upload-artifact@v2
352
352
with :
353
- name : test-videos
354
- path : ./test/e2e/videos
353
+ name : failed- test-videos
354
+ path : ./test/test-results
355
355
356
356
- name : Remove release packages and test artifacts
357
- run : rm -rf ./release-packages ./test/e2e/videos
357
+ run : rm -rf ./release-packages ./test/test-results
358
358
359
359
docker-amd64 :
360
360
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 16
16
.home
17
17
coverage
18
18
** /.DS_Store
19
- test / e2e / videos
20
- test /e2e / screenshots
19
+ # Failed e2e test videos are saved here
20
+ test /test-results
Original file line number Diff line number Diff line change @@ -51,7 +51,11 @@ globalSetup(async () => {
51
51
const config : Config = {
52
52
testDir : path . join ( __dirname , "e2e" ) , // Search for tests in this directory.
53
53
timeout : 30000 , // Each test is given 30 seconds.
54
- retries : 2 , // Retry failing tests 2 times
54
+ retries : 3 , // Retry failing tests 2 times
55
+ }
56
+
57
+ if ( process . env . CI ) {
58
+ config . retries = 2
55
59
}
56
60
57
61
setConfig ( config )
Original file line number Diff line number Diff line change 1
1
import { test , expect } from "@playwright/test"
2
+ import { CODE_SERVER_ADDRESS } from "../utils/constants"
2
3
3
- test ( "should display correct browser based on userAgent" , async ( { page, browserName } ) => {
4
+ // This is a "gut-check" test to make sure playwright is working as expected
5
+ test ( "browser should display correct userAgent" , async ( { page, browserName } ) => {
4
6
const displayNames = {
5
7
chromium : "Chrome" ,
6
8
firefox : "Firefox" ,
7
9
webkit : "Safari" ,
8
10
}
11
+ await page . goto ( CODE_SERVER_ADDRESS , { waitUntil : "networkidle" } )
9
12
const userAgent = await page . evaluate ( "navigator.userAgent" )
10
13
11
- if ( browserName === "chromium" ) {
12
- expect ( userAgent ) . toContain ( displayNames [ browserName ] )
13
- }
14
-
15
- if ( browserName === "firefox" ) {
16
- expect ( userAgent ) . toContain ( displayNames [ browserName ] )
17
- }
18
-
19
- if ( browserName === "webkit" ) {
20
- expect ( userAgent ) . toContain ( displayNames [ browserName ] )
21
- }
14
+ expect ( userAgent ) . toContain ( displayNames [ browserName ] )
22
15
} )
You can’t perform that action at this time.
0 commit comments