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