Skip to content

Commit 8495458

Browse files
authored
test(e2e): Use ipc directly to open tour modal (#2581)
This works around an obscure issue when running tests locally on macos where the firewall warning popup seems to prevent this script from being stuck
1 parent d4241f9 commit 8495458

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

packages/compass-e2e-tests/helpers/commands/open-tour-modal.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,7 @@ module.exports = function (app) {
77
const { client } = app;
88

99
await client.execute(() => {
10-
const menu = require('electron').remote.Menu.getApplicationMenu();
11-
let subMenu;
12-
for (let i = 0; i < menu.getItemCount(); i++) {
13-
if (menu.getLabelAt(i) === '&Help') {
14-
subMenu = menu.items[i].submenu;
15-
break;
16-
}
17-
}
18-
if (!subMenu) {
19-
throw new Error('Could not find Help submenu');
20-
}
21-
for (let i = 0; i < subMenu.getItemCount(); i++) {
22-
if (subMenu.getLabelAt(i).endsWith('Overview')) {
23-
subMenu.items[i].click();
24-
return;
25-
}
26-
}
27-
throw new Error('Could not find overview item to click');
10+
require('electron').ipcRenderer.emit('window:show-compass-tour');
2811
});
2912

3013
const featureTourModalElement = await client.$(Selectors.FeatureTourModal);

0 commit comments

Comments
 (0)