Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates the DevTools test script #19179

Merged
merged 1 commit into from Jun 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -32,5 +32,6 @@ packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/firefox/*.xpi
packages/react-devtools-extensions/firefox/*.pem
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/.tempUserDataDir
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
14 changes: 12 additions & 2 deletions packages/react-devtools-extensions/chrome/test.js
Expand Up @@ -4,10 +4,20 @@

const chromeLaunch = require('chrome-launch');
const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./chrome/build/unpacked');
const START_URL = 'https://facebook.github.io/react/';
const START_URL = argv.url || 'https://reactjs.org/';

chromeLaunch(START_URL, {
args: [`--load-extension=${EXTENSION_PATH}`],
args: [
// Load the React DevTools extension
`--load-extension=${EXTENSION_PATH}`,

// Automatically open DevTools window
'--auto-open-devtools-for-tabs',

// Remembers previous session settings (e.g. DevTools size/position)
'--user-data-dir=./.tempUserDataDir',
],
});
4 changes: 3 additions & 1 deletion packages/react-devtools-extensions/edge/test.js
Expand Up @@ -5,10 +5,12 @@
const open = require('open');
const os = require('os');
const osName = require('os-name');
const START_URL = 'https://facebook.github.io/react/';
const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./edge/build/unpacked');
const START_URL = argv.url || 'https://reactjs.org/';

const extargs = `--load-extension=${EXTENSION_PATH}`;

const osname = osName(os.platform());
Expand Down
3 changes: 2 additions & 1 deletion packages/react-devtools-extensions/firefox/test.js
Expand Up @@ -5,9 +5,10 @@
const {exec} = require('child-process-promise');
const {Finder} = require('firefox-profile');
const {resolve} = require('path');
const {argv} = require('yargs');

const EXTENSION_PATH = resolve('./firefox/build/unpacked');
const START_URL = 'https://facebook.github.io/react/';
const START_URL = argv.url || 'https://reactjs.org/';

const main = async () => {
const finder = new Finder();
Expand Down
1 change: 1 addition & 0 deletions scripts/flow/config/flowconfig
@@ -1,6 +1,7 @@
[ignore]
.*/scripts/bench/.*
.*/build/.*
.*/.tempUserDataDir/.*

# These shims are copied into external projects:
.*/rollup/shims/facebook-www/.*
Expand Down