Skip to content

Commit 9865f56

Browse files
authored
feat: added github action for anvil-catalog (#3638) (#4017)
* feat: added github action for anvil-catalog (#3638) * fix: call npm ci in explorer/files (#3638) * fix: fixed github action db build script (#3638) * fix: fixed github action db build script for real this time(#3638) * fix: shortened long timeouts on certain anvil-catalog tests (#3638) * test: changed the consortium category label to make tests fail (UNDO ME) (#3638) * fix: made the anvil catalog tests action actually run catalog tests (#3638) * test: reverted deliberate change to make tests fail (#3638) * fix: readded playwright-report gitkeep (#3638)
1 parent ce84ea5 commit 9865f56

File tree

3 files changed

+43
-6
lines changed

3 files changed

+43
-6
lines changed
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Playwright Tests anvil-catalog
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: "20.10.0"
16+
- name: Install dependencies
17+
run: |
18+
cd explorer
19+
npm ci
20+
- name: Install Playwright Browsers
21+
run: |
22+
cd explorer
23+
npx playwright install --with-deps
24+
- name: Build AnVIL-catalog database
25+
run: |
26+
cd ./explorer/files
27+
npm ci
28+
mkdir ./anvil-catalog/out
29+
npm run build-anvil-db
30+
- name: Run Playwright tests
31+
run: |
32+
cd explorer
33+
npm run test:anvil-catalog
34+
- uses: actions/upload-artifact@v3
35+
if: always()
36+
with:
37+
name: playwright-report
38+
path: explorer/playwright-report/
39+
retention-days: 30

Diff for: explorer/e2e/anvil-catalog/anvilcatalog-sort.spec.ts

-3
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,18 @@ import { anvilcatalogTabs } from "./anvilcatalog-tabs";
44

55
test.describe.configure({ mode: "parallel" });
66

7-
test.setTimeout(120000);
87
test("On the Consortia tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({
98
page,
109
}) => {
1110
await testSortCatalog(page, anvilcatalogTabs.consortia);
1211
});
1312

14-
test.setTimeout(120000);
1513
test("On the Studies tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({
1614
page,
1715
}) => {
1816
await testSortCatalog(page, anvilcatalogTabs.studies);
1917
});
2018

21-
test.setTimeout(120000);
2219
test("On the Workspaces tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({
2320
page,
2421
}) => {

Diff for: explorer/playwright_anvil-catalog.config.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { devices } from "@playwright/test";
33

44
const config: PlaywrightTestConfig = {
55
expect: {
6-
timeout: 20 * 1000,
6+
timeout: 15 * 1000,
77
},
88
outputDir: "playwright-report/",
99
projects: [
@@ -27,9 +27,10 @@ const config: PlaywrightTestConfig = {
2727
screenshot: "only-on-failure",
2828
},
2929
webServer: {
30-
command: "npm run dev:anvil-catalog",
30+
command:
31+
"npm run build-dev:anvil-catalog && mv ./out/ ./out_temp && mkdir ./out && mv ./out_temp ./out/data && npm start",
3132
reuseExistingServer: !process.env.CI,
32-
timeout: 120 * 1000,
33+
timeout: 240 * 1000,
3334
url: "http://localhost:3000/data",
3435
},
3536
};

0 commit comments

Comments
 (0)