Skip to content

Commit a7b6966

Browse files
committed
added support for out-of-the-box UI testing available in devcontainer
1 parent f5fc3b7 commit a7b6966

4 files changed

Lines changed: 5 additions & 32 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"remoteUser": "node",
99
"updateRemoteUserUID": true,
1010
"runArgs": [
11-
"--init"
11+
"--init",
12+
"--network=host"
1213
],
1314
"mounts": [
1415
"source=stretchly-node-modules,target=/workspaces/stretchly/node_modules,type=volume",

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ Common commands inside the container:
566566
- `npm run lint`
567567
- `npm test`
568568
- `npm run dev`
569+
- `npm run dev:container` (use this in dev containers if Electron sandboxing is restricted)
569570

570571
### Debugging
571572

@@ -575,7 +576,7 @@ You can use Stretchly's built-in debug shortcut by pressing `Ctrl/Cmd + D` in th
575576

576577
You can copy debug information to the clipboard.
577578

578-
If you start *Stretchly* in development mode with the `npm run dev` command, it makes it possible to debug the application in your browser on `http://localhost:9222`.
579+
If you start *Stretchly* in development mode with the `npm run dev` command (or `npm run dev:container` when running inside a dev container), it makes it possible to debug the application in your browser on `http://localhost:9222`.
579580

580581
### Logging
581582

package-lock.json

Lines changed: 0 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"scripts": {
88
"start": "electron .",
99
"dev": "cross-env NODE_ENV=development electron . --trace-warnings --trace-deprecation --enable-logging --remote-debugging-port=9222",
10+
"dev:container": "cross-env NODE_ENV=development electron . --no-sandbox --trace-warnings --trace-deprecation --enable-logging --remote-debugging-port=9223 --remote-allow-origins=*",
1011
"postinstall": "electron-builder install-app-deps",
1112
"pack": "electron-builder build --dir",
1213
"dist": "electron-builder build",

0 commit comments

Comments
 (0)