-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test): try running in github actions
- Loading branch information
Showing
11 changed files
with
60 additions
and
102 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
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,20 @@ | ||
name: E2E Testing | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: E2E Testing | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install dependencies | ||
run: | | ||
npm ci | ||
sudo apt-get install xvfb | ||
- name: Build for testing | ||
run: npm run build | ||
- name: Run E2E on chrome | ||
run: xvfb-run --auto-servernum npm run test:e2e:chrome |
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
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import AppPage from '../pageobjects/volview.page'; | ||
|
||
// handle pixel jitter | ||
const THRESHOLD = 15; // percent | ||
|
||
describe('VolView', () => { | ||
it('should load', async () => { | ||
it('should load and render a sample dataset', async () => { | ||
await AppPage.open(); | ||
await AppPage.downloadHeadAndNeckSample(); | ||
await AppPage.downloadProstateSample(); | ||
await AppPage.waitForViews(); | ||
await browser.pause(20000); | ||
|
||
const misMatchPercentage = await browser.checkElement( | ||
await $('div[data-testid~="vtk-three-view"] > canvas'), | ||
'neck_sample_three_view' | ||
); | ||
|
||
expect(misMatchPercentage).toBeLessThan(10); | ||
expect( | ||
await browser.checkElement( | ||
await $('div[data-testid~="vtk-three-view"] > canvas'), | ||
'prostate_sample_three_view' | ||
) | ||
).toBeLessThan(THRESHOLD); | ||
}); | ||
}); |
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,11 @@ | ||
import { config } from './wdio.shared.conf'; | ||
|
||
config.capabilities = [ | ||
{ | ||
browserName: 'chrome', | ||
}, | ||
]; | ||
|
||
config.services?.push('chromedriver'); | ||
|
||
export { config }; |
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