From 9921ee179aecb8c1f0553ef69da8e94613436519 Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 11:26:54 -0700 Subject: [PATCH 1/9] feat: added github action for anvil-catalog (#3638) --- .../run-playwright-tests-anvil-catalog.yml | 40 +++++++++++++++++++ explorer/playwright-report/.gitkeep | 1 - explorer/playwright_anvil-catalog.config.ts | 5 ++- 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/run-playwright-tests-anvil-catalog.yml delete mode 100644 explorer/playwright-report/.gitkeep diff --git a/.github/workflows/run-playwright-tests-anvil-catalog.yml b/.github/workflows/run-playwright-tests-anvil-catalog.yml new file mode 100644 index 000000000..5427e7886 --- /dev/null +++ b/.github/workflows/run-playwright-tests-anvil-catalog.yml @@ -0,0 +1,40 @@ +name: Playwright Tests anvil-catalog +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: "20.10.0" + - name: Install dependencies + run: | + cd explorer + npm ci + - name: Install Playwright Browsers + run: | + cd explorer + npx playwright install --with-deps + - name: Build AnVIL-catalog database + run: | + cd ./explorer/files + npm run build-anvil-db + mkdir ./anvil-catalog/out + cp ./anvil-catalog/data/* ./anvil-catalog/out + cd ../.. + - name: Run Playwright tests + run: | + cd explorer + npm run test:anvil-cmg + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: explorer/playwright-report/ + retention-days: 30 \ No newline at end of file diff --git a/explorer/playwright-report/.gitkeep b/explorer/playwright-report/.gitkeep deleted file mode 100644 index 3293407bc..000000000 --- a/explorer/playwright-report/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -:3 \ No newline at end of file diff --git a/explorer/playwright_anvil-catalog.config.ts b/explorer/playwright_anvil-catalog.config.ts index acbf475cd..010f89b68 100644 --- a/explorer/playwright_anvil-catalog.config.ts +++ b/explorer/playwright_anvil-catalog.config.ts @@ -27,9 +27,10 @@ const config: PlaywrightTestConfig = { screenshot: "only-on-failure", }, webServer: { - command: "npm run dev:anvil-catalog", + command: + "npm run build-dev:anvil-catalog && mv ./out/ ./out_temp && mkdir ./out && mv ./out_temp ./out/data && npm start", reuseExistingServer: !process.env.CI, - timeout: 120 * 1000, + timeout: 240 * 1000, url: "http://localhost:3000/data", }, }; From 8503661a50cd7cfd6819f6147c326888df5a8209 Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 11:37:03 -0700 Subject: [PATCH 2/9] fix: call npm ci in explorer/files (#3638) --- .github/workflows/run-playwright-tests-anvil-catalog.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run-playwright-tests-anvil-catalog.yml b/.github/workflows/run-playwright-tests-anvil-catalog.yml index 5427e7886..a382184e3 100644 --- a/.github/workflows/run-playwright-tests-anvil-catalog.yml +++ b/.github/workflows/run-playwright-tests-anvil-catalog.yml @@ -24,6 +24,7 @@ jobs: - name: Build AnVIL-catalog database run: | cd ./explorer/files + npm ci npm run build-anvil-db mkdir ./anvil-catalog/out cp ./anvil-catalog/data/* ./anvil-catalog/out From 553269a217fc9efe9b6ee152feb990540bb52ac4 Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 11:46:30 -0700 Subject: [PATCH 3/9] fix: fixed github action db build script (#3638) --- .github/workflows/run-playwright-tests-anvil-catalog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-playwright-tests-anvil-catalog.yml b/.github/workflows/run-playwright-tests-anvil-catalog.yml index a382184e3..002252f08 100644 --- a/.github/workflows/run-playwright-tests-anvil-catalog.yml +++ b/.github/workflows/run-playwright-tests-anvil-catalog.yml @@ -26,8 +26,8 @@ jobs: cd ./explorer/files npm ci npm run build-anvil-db - mkdir ./anvil-catalog/out - cp ./anvil-catalog/data/* ./anvil-catalog/out + mkdir ./anvil-catalog/data + cp ./anvil-catalog/out/* ./anvil-catalog/data cd ../.. - name: Run Playwright tests run: | From eb09ed5e048fbb57a9c95b326b09adfbf8e75936 Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 12:24:02 -0700 Subject: [PATCH 4/9] fix: fixed github action db build script for real this time(#3638) --- .github/workflows/run-playwright-tests-anvil-catalog.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/run-playwright-tests-anvil-catalog.yml b/.github/workflows/run-playwright-tests-anvil-catalog.yml index 002252f08..20cb254ab 100644 --- a/.github/workflows/run-playwright-tests-anvil-catalog.yml +++ b/.github/workflows/run-playwright-tests-anvil-catalog.yml @@ -25,10 +25,8 @@ jobs: run: | cd ./explorer/files npm ci + mkdir ./anvil-catalog/out npm run build-anvil-db - mkdir ./anvil-catalog/data - cp ./anvil-catalog/out/* ./anvil-catalog/data - cd ../.. - name: Run Playwright tests run: | cd explorer From 9ae626a2e522ed478ea99a4857e4dbf697a3c1fb Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 16:50:03 -0700 Subject: [PATCH 5/9] fix: shortened long timeouts on certain anvil-catalog tests (#3638) --- explorer/e2e/anvil-catalog/anvilcatalog-sort.spec.ts | 3 --- explorer/playwright_anvil-catalog.config.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/explorer/e2e/anvil-catalog/anvilcatalog-sort.spec.ts b/explorer/e2e/anvil-catalog/anvilcatalog-sort.spec.ts index 1d261d32d..bd2a12ff1 100644 --- a/explorer/e2e/anvil-catalog/anvilcatalog-sort.spec.ts +++ b/explorer/e2e/anvil-catalog/anvilcatalog-sort.spec.ts @@ -4,21 +4,18 @@ import { anvilcatalogTabs } from "./anvilcatalog-tabs"; test.describe.configure({ mode: "parallel" }); -test.setTimeout(120000); test("On the Consortia tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({ page, }) => { await testSortCatalog(page, anvilcatalogTabs.consortia); }); -test.setTimeout(120000); test("On the Studies tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({ page, }) => { await testSortCatalog(page, anvilcatalogTabs.studies); }); -test.setTimeout(120000); test("On the Workspaces tab, expect clicking the column header (the sort button) to keep the first element of the column visible", async ({ page, }) => { diff --git a/explorer/playwright_anvil-catalog.config.ts b/explorer/playwright_anvil-catalog.config.ts index 010f89b68..19bf82642 100644 --- a/explorer/playwright_anvil-catalog.config.ts +++ b/explorer/playwright_anvil-catalog.config.ts @@ -3,7 +3,7 @@ import { devices } from "@playwright/test"; const config: PlaywrightTestConfig = { expect: { - timeout: 20 * 1000, + timeout: 15 * 1000, }, outputDir: "playwright-report/", projects: [ From 408a5c9160d874a0f546514bb6536424929b1877 Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 17:04:06 -0700 Subject: [PATCH 6/9] test: changed the consortium category label to make tests fail (UNDO ME) (#3638) --- explorer/site-config/anvil-catalog/category.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/explorer/site-config/anvil-catalog/category.ts b/explorer/site-config/anvil-catalog/category.ts index e0f98cacf..fe5863456 100644 --- a/explorer/site-config/anvil-catalog/category.ts +++ b/explorer/site-config/anvil-catalog/category.ts @@ -15,7 +15,7 @@ export const ANVIL_CATALOG_CATEGORY_KEY = { export const ANVIL_CATALOG_CATEGORY_LABEL = { BUCKET_SIZE: "Size (TB)", CONSENT_CODE: "Consent Code", - CONSORTIUM: "Consortium", + CONSORTIUM: "I can't believe it's not Consortium!", DATA_TYPE: "Data Type", DB_GAP_ID: "dbGap Id", DISEASE: "Disease (indication)", From 062f9431245dde5880a256edd2d43558d3033d26 Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 17:14:45 -0700 Subject: [PATCH 7/9] fix: made the anvil catalog tests action actually run catalog tests (#3638) --- .github/workflows/run-playwright-tests-anvil-catalog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-playwright-tests-anvil-catalog.yml b/.github/workflows/run-playwright-tests-anvil-catalog.yml index 20cb254ab..a46060008 100644 --- a/.github/workflows/run-playwright-tests-anvil-catalog.yml +++ b/.github/workflows/run-playwright-tests-anvil-catalog.yml @@ -30,7 +30,7 @@ jobs: - name: Run Playwright tests run: | cd explorer - npm run test:anvil-cmg + npm run test:anvil-catalog - uses: actions/upload-artifact@v3 if: always() with: From 63053af9d74098d195fda839c68ed091b894ba7c Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 17:27:11 -0700 Subject: [PATCH 8/9] test: reverted deliberate change to make tests fail (#3638) --- explorer/site-config/anvil-catalog/category.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/explorer/site-config/anvil-catalog/category.ts b/explorer/site-config/anvil-catalog/category.ts index fe5863456..e0f98cacf 100644 --- a/explorer/site-config/anvil-catalog/category.ts +++ b/explorer/site-config/anvil-catalog/category.ts @@ -15,7 +15,7 @@ export const ANVIL_CATALOG_CATEGORY_KEY = { export const ANVIL_CATALOG_CATEGORY_LABEL = { BUCKET_SIZE: "Size (TB)", CONSENT_CODE: "Consent Code", - CONSORTIUM: "I can't believe it's not Consortium!", + CONSORTIUM: "Consortium", DATA_TYPE: "Data Type", DB_GAP_ID: "dbGap Id", DISEASE: "Disease (indication)", From e26f5e9ac83fd49a596962530a65ef58cfe6eacf Mon Sep 17 00:00:00 2001 From: Jonah Paten Date: Sat, 27 Apr 2024 17:38:08 -0700 Subject: [PATCH 9/9] fix: readded playwright-report gitkeep (#3638) --- explorer/playwright-report/.gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 explorer/playwright-report/.gitkeep diff --git a/explorer/playwright-report/.gitkeep b/explorer/playwright-report/.gitkeep new file mode 100644 index 000000000..3293407bc --- /dev/null +++ b/explorer/playwright-report/.gitkeep @@ -0,0 +1 @@ +:3 \ No newline at end of file