mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
stash
This commit is contained in:
parent
7dd41441a1
commit
380133a22a
|
@ -1,6 +1,7 @@
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import webdriver from 'selenium-webdriver';
|
import webdriver from 'selenium-webdriver';
|
||||||
import electronPath from 'electron';
|
import electronPath from 'electron';
|
||||||
|
// import chromedriver from 'chromedriver';
|
||||||
import { switchMonitorTests, delay } from '../utils/e2e';
|
import { switchMonitorTests, delay } from '../utils/e2e';
|
||||||
|
|
||||||
const port = 9515;
|
const port = 9515;
|
||||||
|
@ -8,6 +9,8 @@ const devPanelPath = 'chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljd/window
|
||||||
|
|
||||||
describe('DevTools panel for Electron', function () {
|
describe('DevTools panel for Electron', function () {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
// chromedriver.start();
|
||||||
|
// await delay(1000);
|
||||||
this.driver = new webdriver.Builder()
|
this.driver = new webdriver.Builder()
|
||||||
.usingServer(`http://localhost:${port}`)
|
.usingServer(`http://localhost:${port}`)
|
||||||
.withCapabilities({
|
.withCapabilities({
|
||||||
|
@ -23,15 +26,20 @@ describe('DevTools panel for Electron', function () {
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
await this.driver.quit();
|
await this.driver.quit();
|
||||||
|
// chromedriver.stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open Redux DevTools tab', async () => {
|
it('should open Redux DevTools tab', async () => {
|
||||||
|
const originalWindow = await this.driver.getWindowHandle();
|
||||||
const windows = await this.driver.getAllWindowHandles();
|
const windows = await this.driver.getAllWindowHandles();
|
||||||
for (const window of windows) {
|
for (const window of windows) {
|
||||||
|
if (window !== originalWindow) {
|
||||||
await this.driver.switchTo().window(window);
|
await this.driver.switchTo().window(window);
|
||||||
if ((await this.driver.getCurrentUrl()).startsWith('devtools')) {
|
// if ((await this.driver.getCurrentUrl()).startsWith('devtools')) {
|
||||||
break;
|
// break;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
// await delay(2000);
|
||||||
}
|
}
|
||||||
expect(await this.driver.getCurrentUrl()).toMatch(
|
expect(await this.driver.getCurrentUrl()).toMatch(
|
||||||
/devtools:\/\/devtools\/bundled\/devtools_app.html/
|
/devtools:\/\/devtools\/bundled\/devtools_app.html/
|
||||||
|
@ -39,6 +47,8 @@ describe('DevTools panel for Electron', function () {
|
||||||
|
|
||||||
await this.driver.manage().timeouts().pageLoadTimeout(5000);
|
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) {
|
const id = await this.driver.executeAsyncScript(function (callback) {
|
||||||
let attempts = 5;
|
let attempts = 5;
|
||||||
function showReduxPanel() {
|
function showReduxPanel() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user