[MM-38875] Migrate E2E testing to Playwright, re-enable tests (#1800)

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* [MM-38875] Migrate E2E testing to Playwright, re-enable tests

* Add functionality to map view names to Playwright windows

* Added search box test

* Added robot.js for automating key presses

* Add test using key strokes to navigate menu

* Reload test and added webcontentsid to test helper

* Check Ctrl+Shift+R as well

* oops

* Reorganize

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
Devin Binnie
2021-10-28 13:17:10 -04:00
committed by GitHub
parent bd0d9df7e3
commit c53e897bfd
26 changed files with 1854 additions and 3477 deletions

View File

@@ -6,7 +6,7 @@
/* eslint-disable no-magic-numbers */
import {ipcRenderer, webFrame} from 'electron';
import {contextBridge, ipcRenderer, webFrame} from 'electron';
// I've filed an issue in electron-log https://github.com/megahertz/electron-log/issues/267
// we'll be able to use it again if there is a workaround for the 'os' import
@@ -23,6 +23,8 @@ import {
CLOSE_TEAMS_DROPDOWN,
BROWSER_HISTORY_PUSH,
APP_LOGGED_IN,
GET_VIEW_NAME,
GET_VIEW_WEBCONTENTS_ID,
} from 'common/communication';
const UNREAD_COUNT_INTERVAL = 1000;
@@ -36,6 +38,13 @@ let shouldSendNotifications;
console.log('Preload initialized');
if (process.env.NODE_ENV === 'test') {
contextBridge.exposeInMainWorld('testHelper', {
getViewName: () => ipcRenderer.invoke(GET_VIEW_NAME),
getWebContentsId: () => ipcRenderer.invoke(GET_VIEW_WEBCONTENTS_ID),
});
}
ipcRenderer.invoke('get-app-version').then(({name, version}) => {
appVersion = version;
appName = name;