File tree Expand file tree Collapse file tree 2 files changed +22
-49
lines changed
Expand file tree Collapse file tree 2 files changed +22
-49
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- /**
2- * @jest -environment ./tests/environment
3- */
1+ const path = require ( "path" ) ;
42
5- describe ( "YouTube Music App" , ( ) => {
6- const app = global . __APP__ ;
3+ const { _electron : electron } = require ( "playwright" ) ;
4+ const { test , expect } = require ( "@playwright/test" ) ;
75
8- test ( "With default settings, app is launched and visible" , async ( ) => {
9- const window = await app . firstWindow ( ) ;
10- const title = await window . title ( ) ;
11- expect ( title ) . toEqual ( "YouTube Music" ) ;
6+ const appPath = path . resolve ( __dirname , ".." ) ;
127
13- const url = window . url ( ) ;
14- expect ( url . startsWith ( "https://music.youtube.com" ) ) . toBe ( true ) ;
8+ test ( "YouTube Music App - With default settings, app is launched and visible" , async ( ) => {
9+ const app = await electron . launch ( {
10+ args : [
11+ "--no-sandbox" ,
12+ "--disable-gpu" ,
13+ "--whitelisted-ips=" ,
14+ "--disable-dev-shm-usage" ,
15+ appPath ,
16+ ] ,
1517 } ) ;
18+
19+ const window = await app . firstWindow ( ) ;
20+ const title = await window . title ( ) ;
21+ expect ( title ) . toEqual ( "YouTube Music" ) ;
22+
23+ const url = window . url ( ) ;
24+ expect ( url . startsWith ( "https://music.youtube.com" ) ) . toBe ( true ) ;
25+
26+ await app . close ( ) ;
1627} ) ;
You can’t perform that action at this time.
0 commit comments