This commit is contained in:
Nathan Bierema 2021-06-06 14:45:29 -04:00
parent e2e9fe5d9f
commit 4d6fc0ae8b
2 changed files with 8 additions and 3 deletions

View File

@ -5,7 +5,8 @@ import chromedriver from 'chromedriver';
import { switchMonitorTests, delay } from '../utils/e2e';
const port = 9515;
const devPanelPath = 'chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljd/window.html';
const devPanelPath =
'chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljd/window.html';
describe('DevTools panel for Electron', function () {
beforeAll(async () => {
@ -56,7 +57,8 @@ describe('DevTools panel for Electron', function () {
if (UI.inspectorView) {
const tabs = UI.inspectorView._tabbedPane._tabs;
const idList = tabs.map((tab) => tab.id);
const reduxPanelId = 'chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljdRedux';
const reduxPanelId =
'chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljdRedux';
if (idList.indexOf(reduxPanelId) !== -1) {
UI.inspectorView.showPanel(reduxPanelId);
return callback(reduxPanelId);

View File

@ -3,7 +3,10 @@ const { app, BrowserWindow, session } = require('electron');
app.on('window-all-closed', app.quit);
app.whenReady().then(async () => {
await session.defaultSession.loadExtension(path.join(__dirname, '../../../build/extension'), { allowFileAccess: true });
await session.defaultSession.loadExtension(
path.join(__dirname, '../../../build/extension'),
{ allowFileAccess: true }
);
const mainWindow = new BrowserWindow({
width: 150,