mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 08:30:02 +03:00
misc changes
This commit is contained in:
parent
11c5fd1c57
commit
ecb4916b74
|
@ -7,7 +7,7 @@ if (process.env.NODE_ENV === 'production') {
|
||||||
(document.head || document.documentElement).appendChild(s);
|
(document.head || document.documentElement).appendChild(s);
|
||||||
s.parentNode.removeChild(s);
|
s.parentNode.removeChild(s);
|
||||||
} else {
|
} else {
|
||||||
s.src = chrome.extension.getURL('js/page.bundle.js');
|
s.src = chrome.extension.getURL('page.bundle.js');
|
||||||
s.onload = function () {
|
s.onload = function () {
|
||||||
this.parentNode.removeChild(this);
|
this.parentNode.removeChild(this);
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('App container', () => {
|
||||||
|
|
||||||
it('should contain an empty action list', () => {
|
it('should contain an empty action list', () => {
|
||||||
expect(component.find('ActionList').html()).toMatch(
|
expect(component.find('ActionList').html()).toMatch(
|
||||||
/<div class="actionListRows-[0-9]+"><\/div>/
|
/<div class="actionListRows-[0-9-]+"><\/div>/
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require('@babel/polyfill');
|
require('@babel/polyfill');
|
||||||
global.chrome = require('sinon-chrome');
|
global.chrome = require('sinon-chrome');
|
||||||
import Enzyme from 'enzyme';
|
import Enzyme from 'enzyme';
|
||||||
import Adapter from 'enzyme-adapter-react-15.4';
|
import Adapter from 'enzyme-adapter-react-16';
|
||||||
|
|
||||||
Enzyme.configure({ adapter: new Adapter() });
|
Enzyme.configure({ adapter: new Adapter() });
|
||||||
|
|
|
@ -6,26 +6,28 @@ export const delay = (time) =>
|
||||||
export const switchMonitorTests = {
|
export const switchMonitorTests = {
|
||||||
'should switch to Log Monitor': async function () {
|
'should switch to Log Monitor': async function () {
|
||||||
await this.driver
|
await this.driver
|
||||||
.findElement(webdriver.By.xpath('//div[text()="Inspector"]'))
|
.findElement(webdriver.By.xpath('//button[text()="Inspector"]'))
|
||||||
.click();
|
.click();
|
||||||
await delay(500); // Wait till menu is fully opened
|
await delay(500); // Wait till menu is fully opened
|
||||||
await this.driver
|
await this.driver
|
||||||
.findElement(webdriver.By.xpath('//div[text()="Log monitor"]'))
|
.findElement(webdriver.By.xpath('//button[text()="Log monitor"]'))
|
||||||
.click();
|
.click();
|
||||||
await delay(500);
|
await delay(500);
|
||||||
await this.driver.findElement(
|
await this.driver.findElement(
|
||||||
webdriver.By.xpath('//div[a[text()="Reset"] and .//a[text()="Revert"]]')
|
webdriver.By.xpath(
|
||||||
|
'//div[div[button[text()="Reset"]] and .//div[button[text()="Revert"]]]'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
await delay(500);
|
await delay(500);
|
||||||
},
|
},
|
||||||
|
|
||||||
'should switch to Chart Monitor': async function () {
|
'should switch to Chart Monitor': async function () {
|
||||||
await this.driver
|
await this.driver
|
||||||
.findElement(webdriver.By.xpath('//div[text()="Log monitor"]'))
|
.findElement(webdriver.By.xpath('//button[text()="Log monitor"]'))
|
||||||
.click();
|
.click();
|
||||||
await delay(500); // Wait till menu is fully opened
|
await delay(500); // Wait till menu is fully opened
|
||||||
await this.driver
|
await this.driver
|
||||||
.findElement(webdriver.By.xpath('//div[text()="Chart"]'))
|
.findElement(webdriver.By.xpath('//button[text()="Chart"]'))
|
||||||
.click();
|
.click();
|
||||||
await delay(500);
|
await delay(500);
|
||||||
await this.driver.findElement(
|
await this.driver.findElement(
|
||||||
|
@ -36,11 +38,11 @@ export const switchMonitorTests = {
|
||||||
|
|
||||||
'should switch back to Inspector Monitor': async function () {
|
'should switch back to Inspector Monitor': async function () {
|
||||||
await this.driver
|
await this.driver
|
||||||
.findElement(webdriver.By.xpath('//div[text()="Chart"]'))
|
.findElement(webdriver.By.xpath('//button[text()="Chart"]'))
|
||||||
.click();
|
.click();
|
||||||
await delay(1000); // Wait till menu is fully opened
|
await delay(1000); // Wait till menu is fully opened
|
||||||
await this.driver
|
await this.driver
|
||||||
.findElement(webdriver.By.xpath('//div[text()="Inspector"]'))
|
.findElement(webdriver.By.xpath('//button[text()="Inspector"]'))
|
||||||
.click();
|
.click();
|
||||||
await delay(1500); // Wait till menu is closed
|
await delay(1500); // Wait till menu is closed
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@ const mock = `${extpath}chromeAPIMock.js`;
|
||||||
|
|
||||||
const baseConfig = (params) => ({
|
const baseConfig = (params) => ({
|
||||||
// devtool: 'source-map',
|
// devtool: 'source-map',
|
||||||
mode: 'production',
|
mode: params.mode,
|
||||||
entry: params.input || {
|
entry: params.input || {
|
||||||
background: [mock, `${extpath}background/index`],
|
background: [mock, `${extpath}background/index`],
|
||||||
options: [mock, `${extpath}options/index`],
|
options: [mock, `${extpath}options/index`],
|
||||||
|
|
|
@ -3,6 +3,7 @@ import webpack from 'webpack';
|
||||||
import baseConfig from './base.config';
|
import baseConfig from './base.config';
|
||||||
|
|
||||||
let config = baseConfig({
|
let config = baseConfig({
|
||||||
|
mode: 'development',
|
||||||
inputExtra: {
|
inputExtra: {
|
||||||
page: [path.join(__dirname, '../src/browser/extension/inject/pageScript')],
|
page: [path.join(__dirname, '../src/browser/extension/inject/pageScript')],
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,6 +2,10 @@ import path from 'path';
|
||||||
import baseConfig from './base.config';
|
import baseConfig from './base.config';
|
||||||
|
|
||||||
export default baseConfig({
|
export default baseConfig({
|
||||||
|
mode: 'production',
|
||||||
|
inputExtra: {
|
||||||
|
page: [path.join(__dirname, '../src/browser/extension/inject/pageScript')],
|
||||||
|
},
|
||||||
output: { path: path.join(__dirname, '../build/extension') },
|
output: { path: path.join(__dirname, '../build/extension') },
|
||||||
globals: {
|
globals: {
|
||||||
'process.env': {
|
'process.env': {
|
||||||
|
|
|
@ -2,6 +2,7 @@ import path from 'path';
|
||||||
import baseConfig from './base.config';
|
import baseConfig from './base.config';
|
||||||
|
|
||||||
export default baseConfig({
|
export default baseConfig({
|
||||||
|
mode: 'production',
|
||||||
output: { path: path.join(__dirname, '../build/extension') },
|
output: { path: path.join(__dirname, '../build/extension') },
|
||||||
globals: {
|
globals: {
|
||||||
'process.env': {
|
'process.env': {
|
||||||
|
|
|
@ -2,6 +2,7 @@ import path from 'path';
|
||||||
import baseConfig from './base.config';
|
import baseConfig from './base.config';
|
||||||
|
|
||||||
export default baseConfig({
|
export default baseConfig({
|
||||||
|
mode: 'production',
|
||||||
input: {
|
input: {
|
||||||
page: [path.join(__dirname, '../src/browser/extension/inject/pageScript')],
|
page: [path.join(__dirname, '../src/browser/extension/inject/pageScript')],
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
projects: ['<rootDir>/packages/*'],
|
projects: ['extension', '<rootDir>/packages/*'],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user