@@ -2,8 +2,8 @@ import { expect } from 'chai';
22import {
33 init ,
44 cleanup ,
5- //screenshotIfFailed,
65 Selectors ,
6+ screenshotPathName ,
77} from '../helpers/compass' ;
88
99describe ( 'Auto-update' , function ( ) {
@@ -17,9 +17,8 @@ describe('Auto-update', function () {
1717
1818 // run the app and wait for it to auto-update
1919 const compass = await init ( 'auto-update from' , { firstRun : true } ) ;
20+ const { browser } = compass ;
2021 try {
21- const { browser } = compass ;
22-
2322 await browser . $ ( Selectors . AutoUpdateToast ) . waitForDisplayed ( ) ;
2423
2524 if ( process . env . AUTO_UPDATE_UPDATABLE === 'true' ) {
@@ -39,6 +38,7 @@ describe('Auto-update', function () {
3938 ) ;
4039 }
4140 } finally {
41+ await browser . screenshot ( screenshotPathName ( 'auto-update-from' ) ) ;
4242 await cleanup ( compass ) ;
4343 }
4444
@@ -47,13 +47,16 @@ describe('Auto-update', function () {
4747 const compass = await init ( 'auto-update from restart' , {
4848 firstRun : false ,
4949 } ) ;
50+ const { browser } = compass ;
5051 try {
51- const { browser } = compass ;
5252 await browser . $ ( Selectors . AutoUpdateToast ) . waitForDisplayed ( ) ;
5353 await browser
5454 . $ ( Selectors . AutoUpdateReleaseNotesLink )
5555 . waitForDisplayed ( ) ;
5656 } finally {
57+ await browser . screenshot (
58+ screenshotPathName ( 'auto-update-from-restart' )
59+ ) ;
5760 await cleanup ( compass ) ;
5861 }
5962 }
0 commit comments