@@ -41,15 +41,17 @@ const close = async () => {
41
41
await mouse . leftClick ( ) ;
42
42
} ;
43
43
44
- describe ( "E2E screen test" , ( ) => {
44
+ describe ( "E2E tests" , ( ) => {
45
+ afterEach ( async ( ) => {
46
+ await keyboard . type ( Key . LeftControl , Key . LeftAlt , Key . Left ) ;
47
+ } ) ;
48
+
45
49
it ( "should throw on invalid images" , async ( ) => {
46
50
jest . setTimeout ( 30000 ) ;
47
51
await expect ( screen . find ( "mouse.png" ) ) . rejects . toContain ( "Failed to load image" ) ;
48
52
} ) ;
49
- } ) ;
50
53
51
- describe ( "E2E demo" , ( ) => {
52
- it ( "should run without throwing" , async ( ) => {
54
+ it ( "should perform some calculations" , async ( ) => {
53
55
jest . setTimeout ( 30000 ) ;
54
56
screen . config . resourceDirectory = "./e2e/assets" ;
55
57
await assert . isVisible ( "mouse.png" ) ;
@@ -60,13 +62,11 @@ describe("E2E demo", () => {
60
62
await assert . isVisible ( "calculator.png" ) ;
61
63
await keyboard . type ( "525" ) ;
62
64
await calculate ( ) ;
63
- await assert . isVisible ( "result.png" ) ;
65
+ await screen . waitFor ( "result.png" ) ;
64
66
await close ( ) ;
65
67
} ) ;
66
- } ) ;
67
68
68
- describe ( "E2E drag & drop demo" , ( ) => {
69
- it ( "should run without throwing" , async ( ) => {
69
+ it ( "drag & drop" , async ( ) => {
70
70
jest . setTimeout ( 60000 ) ;
71
71
screen . config . resourceDirectory = "./e2e/assets" ;
72
72
0 commit comments