This works

This commit is contained in:
Nathan Bierema 2021-06-06 14:31:07 -04:00
parent 380133a22a
commit 4d673247cd

View File

@ -31,15 +31,16 @@ describe('DevTools panel for Electron', function () {
it('should open Redux DevTools tab', async () => {
const originalWindow = await this.driver.getWindowHandle();
const windows = await this.driver.getAllWindowHandles();
for (const window of windows) {
if (window !== originalWindow) {
console.log(await this.driver.getCurrentUrl());
if (!(await this.driver.getCurrentUrl()).startsWith('devtools')) {
const windows = await this.driver.getAllWindowHandles();
for (const window of windows) {
if (window === originalWindow) continue;
await this.driver.switchTo().window(window);
// if ((await this.driver.getCurrentUrl()).startsWith('devtools')) {
// break;
// }
if ((await this.driver.getCurrentUrl()).startsWith('devtools')) {
break;
}
}
// await delay(2000);
}
expect(await this.driver.getCurrentUrl()).toMatch(
/devtools:\/\/devtools\/bundled\/devtools_app.html/
@ -47,8 +48,6 @@ describe('DevTools panel for Electron', function () {
await this.driver.manage().timeouts().pageLoadTimeout(5000);
// await this.driver.wait(() => window.UI && window.UI.inspectorView, 5000);
const id = await this.driver.executeAsyncScript(function (callback) {
let attempts = 5;
function showReduxPanel() {