File tree Expand file tree Collapse file tree 4 files changed +15
-18
lines changed Expand file tree Collapse file tree 4 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -350,11 +350,11 @@ jobs:
350350 if : always()
351351 uses : actions/upload-artifact@v2
352352 with :
353- name : test-videos
354- path : ./test/e2e/videos
353+ name : failed- test-videos
354+ path : ./test/test-results
355355
356356 - 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
358358
359359 docker-amd64 :
360360 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1616.home
1717coverage
1818** /.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 () => {
5151const config : Config = {
5252 testDir : path . join ( __dirname , "e2e" ) , // Search for tests in this directory.
5353 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
5559}
5660
5761setConfig ( config )
Original file line number Diff line number Diff line change 11import { test , expect } from "@playwright/test"
2+ import { CODE_SERVER_ADDRESS } from "../utils/constants"
23
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 } ) => {
46 const displayNames = {
57 chromium : "Chrome" ,
68 firefox : "Firefox" ,
79 webkit : "Safari" ,
810 }
11+ await page . goto ( CODE_SERVER_ADDRESS , { waitUntil : "networkidle" } )
912 const userAgent = await page . evaluate ( "navigator.userAgent" )
1013
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 ] )
2215} )
You can’t perform that action at this time.
0 commit comments