mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 08:30:02 +03:00
Finish
This commit is contained in:
parent
99f83bdc2a
commit
21119dadc6
|
@ -3,6 +3,5 @@ build
|
||||||
dev
|
dev
|
||||||
webpack/replace
|
webpack/replace
|
||||||
examples
|
examples
|
||||||
test/app/setup.js
|
|
||||||
npm-package
|
npm-package
|
||||||
_book
|
_book
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
setupFiles: ['<rootDir>/test/app/setup.js'],
|
setupFiles: ['<rootDir>/test/setup.js'],
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"docs:publish": "npm run docs:clean && npm run docs:build && cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push git@github.com:zalmoxisus/redux-devtools-extension gh-pages --force",
|
"docs:publish": "npm run docs:clean && npm run docs:build && cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push git@github.com:zalmoxisus/redux-devtools-extension gh-pages --force",
|
||||||
"clean": "rimraf build/ && rimraf dev/",
|
"clean": "rimraf build/ && rimraf dev/",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"test:app": "jest test/app",
|
"test:app": "cross-env BABEL_ENV=test jest test/app",
|
||||||
"test:chrome": "jest test/chrome",
|
"test:chrome": "jest test/chrome",
|
||||||
"test:electron": "jest test/electron && rimraf test/electron/tmp",
|
"test:electron": "jest test/electron && rimraf test/electron/tmp",
|
||||||
"test": "npm run test:app && npm run build:extension && npm run test:chrome && npm run test:electron"
|
"test": "npm run test:app && npm run build:extension && npm run test:chrome && npm run test:electron"
|
||||||
|
|
|
@ -9,9 +9,7 @@ const extensionId = 'lmhkpmbekcpmknklioeibfkpmmfibljd';
|
||||||
const actionsPattern = /^@@INIT(.|\n)+@@reduxReactRouter\/routerDidChange(.|\n)+@@reduxReactRouter\/initRoutes(.|\n)+$/;
|
const actionsPattern = /^@@INIT(.|\n)+@@reduxReactRouter\/routerDidChange(.|\n)+@@reduxReactRouter\/initRoutes(.|\n)+$/;
|
||||||
|
|
||||||
describe('Chrome extension', function () {
|
describe('Chrome extension', function () {
|
||||||
this.timeout(20000);
|
beforeAll(async () => {
|
||||||
|
|
||||||
before(async () => {
|
|
||||||
chromedriver.start();
|
chromedriver.start();
|
||||||
await delay(2000);
|
await delay(2000);
|
||||||
this.driver = new webdriver.Builder()
|
this.driver = new webdriver.Builder()
|
||||||
|
@ -24,7 +22,7 @@ describe('Chrome extension', function () {
|
||||||
.forBrowser('chrome')
|
.forBrowser('chrome')
|
||||||
.build();
|
.build();
|
||||||
});
|
});
|
||||||
after(async () => {
|
afterAll(async () => {
|
||||||
await this.driver.quit();
|
await this.driver.quit();
|
||||||
chromedriver.stop();
|
chromedriver.stop();
|
||||||
});
|
});
|
||||||
|
@ -41,10 +39,10 @@ describe('Chrome extension', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should contain inspector monitor's component", async () => {
|
it("should contain inspector monitor's component", async () => {
|
||||||
const val = this.driver
|
const val = await this.driver
|
||||||
.findElement(webdriver.By.xpath('//div[contains(@class, "inspector-")]'))
|
.findElement(webdriver.By.xpath('//div[contains(@class, "inspector-")]'))
|
||||||
.getText();
|
.getText();
|
||||||
expect(val).toExist();
|
expect(val).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should contain an empty actions list', async () => {
|
it('should contain an empty actions list', async () => {
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
require('@babel/register')();
|
|
||||||
require('@babel/polyfill');
|
|
|
@ -8,9 +8,7 @@ const port = 9515;
|
||||||
const devPanelPath = 'chrome-extension://redux-devtools/devpanel.html';
|
const devPanelPath = 'chrome-extension://redux-devtools/devpanel.html';
|
||||||
|
|
||||||
describe('DevTools panel for Electron', function () {
|
describe('DevTools panel for Electron', function () {
|
||||||
this.timeout(10000);
|
beforeAll(async () => {
|
||||||
|
|
||||||
before(async () => {
|
|
||||||
chromedriver.start();
|
chromedriver.start();
|
||||||
await delay(1000);
|
await delay(1000);
|
||||||
this.driver = new webdriver.Builder()
|
this.driver = new webdriver.Builder()
|
||||||
|
@ -26,7 +24,7 @@ describe('DevTools panel for Electron', function () {
|
||||||
await this.driver.manage().timeouts().setScriptTimeout(10000);
|
await this.driver.manage().timeouts().setScriptTimeout(10000);
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async () => {
|
afterAll(async () => {
|
||||||
await this.driver.quit();
|
await this.driver.quit();
|
||||||
chromedriver.stop();
|
chromedriver.stop();
|
||||||
});
|
});
|
||||||
|
@ -61,7 +59,7 @@ describe('DevTools panel for Electron', function () {
|
||||||
const className = await this.driver
|
const className = await this.driver
|
||||||
.findElement(webdriver.By.className(id))
|
.findElement(webdriver.By.className(id))
|
||||||
.getAttribute('class');
|
.getAttribute('class');
|
||||||
expect(className).toNotMatch(/hidden/); // not hidden
|
expect(className).not.toMatch(/hidden/); // not hidden
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have Redux DevTools UI on current tab', async () => {
|
it('should have Redux DevTools UI on current tab', async () => {
|
||||||
|
@ -91,7 +89,7 @@ describe('DevTools panel for Electron', function () {
|
||||||
const val = await this.driver
|
const val = await this.driver
|
||||||
.findElement(webdriver.By.xpath('//div[contains(@class, "inspector-")]'))
|
.findElement(webdriver.By.xpath('//div[contains(@class, "inspector-")]'))
|
||||||
.getText();
|
.getText();
|
||||||
expect(val).toExist();
|
expect(val).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.keys(switchMonitorTests).forEach((description) =>
|
Object.keys(switchMonitorTests).forEach((description) =>
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
require('@babel/register')();
|
|
||||||
require('@babel/polyfill');
|
|
Loading…
Reference in New Issue
Block a user