-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update electron and e2e tests framework with webdriver (#455)
* tests: add webdriver tests for e2e app testing on local and gh actions * chore: upgrade electron from v25 to v27, rebuild to 3.4.1 * fix: register powerMonitor handlers after app ready, electron bug * chore: only run e2e tests on pr to main or manually
- Loading branch information
Showing
26 changed files
with
9,515 additions
and
5,852 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,5 @@ src/stories | |
src/stories/Generic | ||
src/stories/Presentational | ||
storybook-static | ||
|
||
.eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: e2e-tests-mac | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
e2e-build-n-test: | ||
environment: staging | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macOS-latest] | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: 💚 Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: 🧱 Install Dependencies | ||
run: | | ||
npm install | ||
# This dependency wasn't needed until suddenly on Dec. 2, 2022 | ||
npm i dmg-license | ||
shell: bash | ||
|
||
- name: 📦 Bundle Application | ||
env: | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
MP_PROJECT_TOKEN: ${{ secrets.MP_PROJECT_TOKEN }} | ||
MP_PROJECT_ENV: ${{ vars.MP_PROJECT_ENV }} | ||
NICENODE_ENV: ${{ vars.NICENODE_ENV }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
npm run package | ||
ls -al | ||
- name: 🧪 Run Tests | ||
uses: coactions/setup-xvfb@v1 | ||
with: | ||
run: npm run wdio | ||
- name: 🐛 Debug Build | ||
uses: stateful/vscode-server-action@v1 | ||
if: failure() | ||
with: | ||
timeout: '120000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: e2e-tests-ubuntu | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
e2e-build-n-test: | ||
environment: staging | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: 💚 Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: 🧱 Install Dependencies | ||
run: | | ||
npm install | ||
sudo apt-get install --no-install-recommends -y rpm libarchive-tools | ||
- name: 📦 Bundle Application | ||
env: | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
MP_PROJECT_TOKEN: ${{ secrets.MP_PROJECT_TOKEN }} | ||
MP_PROJECT_ENV: ${{ vars.MP_PROJECT_ENV }} | ||
NICENODE_ENV: ${{ vars.NICENODE_ENV }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: | | ||
npm run package -- --linux --dir | ||
ls -al ./release/build/linux-unpacked/ | ||
- name: 🧪 Run Tests | ||
uses: coactions/setup-xvfb@v1 | ||
with: | ||
run: npm run wdio | ||
- name: 🐛 Debug Build | ||
uses: stateful/vscode-server-action@v1 | ||
if: failure() | ||
with: | ||
timeout: '120000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: e2e-tests-windows | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
e2e-build-n-test: | ||
environment: staging | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: 💚 Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: 🧱 Install Dependencies | ||
run: | | ||
npm install | ||
- name: 📦 Bundle Application | ||
env: | ||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | ||
MP_PROJECT_TOKEN: ${{ secrets.MP_PROJECT_TOKEN }} | ||
MP_PROJECT_ENV: ${{ vars.MP_PROJECT_ENV }} | ||
NICENODE_ENV: ${{ vars.NICENODE_ENV }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# run: npm run package | ||
# if [ "$RUNNER_OS" == "macOS" ]; then | ||
# npm run package -- --mac --x64 | ||
# elif [ "$RUNNER_OS" == "Windows" ]; then | ||
# npm run package -- --win --x64 | ||
run: npm run package | ||
|
||
- name: 🧪 Run Tests | ||
uses: coactions/setup-xvfb@v1 | ||
with: | ||
run: npm run wdio | ||
- name: 🐛 Debug Build | ||
uses: stateful/vscode-server-action@v1 | ||
if: failure() | ||
with: | ||
timeout: '120000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.