Skip to content

Commit d84a6c0

Browse files
committed
logging, screenshots
1 parent 7ea61b9 commit d84a6c0

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

packages/compass-e2e-tests/tests/auto-update.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { expect } from 'chai';
22
import {
33
init,
44
cleanup,
5-
//screenshotIfFailed,
65
Selectors,
6+
screenshotPathName,
77
} from '../helpers/compass';
88

99
describe('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
}

packages/compass/src/app/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ const app = {
379379
});
380380
}
381381

382+
// eslint-disable-next-line no-console
383+
console.log({
384+
previousVersion: state.previousVersion,
385+
DEFAULT_APP_VERSION,
386+
APP_VERSION,
387+
});
388+
382389
if (
383390
state.previousVersion !== DEFAULT_APP_VERSION &&
384391
APP_VERSION !== state.previousVersion

0 commit comments

Comments
 (0)