Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dkrylov/azure_resou…
Browse files Browse the repository at this point in the history
…rce_costs
  • Loading branch information
dkrylovsb committed Sep 3, 2024
2 parents 25df864 + d6391f8 commit ef28841
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ runs:

- name: Upload Artifact
if: inputs.upload-build == 'true'
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: prime-router-build-${{ inputs.version }}
path: prime-router/prime-router-build.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/build-frontend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ runs:
shell: bash

- name: Store E2E Results
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
if: always() && ${{ !startsWith(inputs.env-name, 'trialfrontend') }}
with:
name: e2e-data
Expand Down Expand Up @@ -182,7 +182,7 @@ runs:
run: tar -czf static-website-react.tar.gz build

- name: Upload frontend artifact
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: static-website-react-${{ inputs.version }}
path: frontend-react/static-website-react.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
run: yarn run test:e2e --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
- name: Upload blob report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: frontend-e2e-data--shard-${{ matrix.shardIndex }}
path: frontend-react/e2e-data
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Merge folders
run: mv ./playwright-report/* ./e2e-data/report && rmdir ./playwright-report && rm ./e2e-data/report/*.zip && rm -rf ./e2e-data/report/resources
- name: Upload final e2e-data
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: frontend-e2e-data--attempt-${{ github.run_attempt }}
path: frontend-react/e2e-data
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/restore_databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ jobs:
if: |
needs.pre_job.outputs.sink_env_name != 'prod' &&
(${{ matrix.db }} == 'prime_data_hub' || ${{ matrix.db }} == 'prime_data_hub_candidate')
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: clean_output_${{ matrix.db }}
path: clean_output_${{ matrix.db }}.html
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: "Get changed files with yaml"
id: changed-files-yaml
uses: tj-actions/changed-files@40853de9f8ce2d6cfdc73c1b96f14e22ba44aec4
uses: tj-actions/changed-files@e9772d140489982e0e3704fea5ee93d536f1e275
with:
files_yaml: |
frontend:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/start_frontend_smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
echo "::endgroup::"
- name: "Store E2E Results"
if: ${{ !cancelled() }}
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: smoke-data
path: frontend-react/e2e-data/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate_terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Run Checkov action
uses: bridgecrewio/checkov-action@1b813e8f72afe2b6263a6ea10c873707e21ebe44
uses: bridgecrewio/checkov-action@37f985492b07e3c4985330361b4c8b299437d05e
with:
directory: operations/app/terraform
skip_check: CKV_AZURE_139,CKV_AZURE_137,CKV_AZURE_103,CKV_AZURE_104,CKV_AZURE_102,CKV_AZURE_130,CKV_AZURE_121,CKV_AZURE_67,CKV_AZURE_56,CKV_AZURE_17,CKV_AZURE_63,CKV_AZURE_18,CKV_AZURE_88,CKV_AZURE_65,CKV_AZURE_13,CKV_AZURE_66,CKV_AZURE_33,CKV_AZURE_35,CKV_AZURE_36,CKV_AZURE_98,CKV2_AZURE_1,CKV2_AZURE_15,CKV2_AZURE_21,CKV_AZURE_213,CKV_AZURE_59,CKV2_AZURE_33,CKV2_AZURE_32,CKV2_AZURE_28,CKV_AZURE_206,CKV_AZURE_42,CKV_AZURE_110,CKV_AZURE_109,CKV_AZURE_166,CKV2_AZURE_38,CKV2_AZURE_40,CKV2_AZURE_41,CKV_AZURE_235
15 changes: 15 additions & 0 deletions frontend-react/e2e/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,18 @@ export function toDateWithTime(date: string, time?: string) {
}
return toDateTime;
}

export function removeDateTime(filename: string) {
// Example string: "co.yml-beb0c9d9-ca1f-4af3-853e-0aba61541f66-20240829191221.hl7"
// Find the last hyphen and the last dot in the string
const lastHyphenIndex = filename.lastIndexOf("-");
const lastDotIndex = filename.lastIndexOf(".");

// If both indices are found, implying a properly formatted file extension,
// remove the timestamp
if (lastHyphenIndex !== -1 && lastDotIndex !== -1 && lastHyphenIndex < lastDotIndex) {
return filename.slice(0, lastHyphenIndex);
}

return filename;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { format } from "date-fns";
import fs from "node:fs";
import {
expectTableColumnValues,
removeDateTime,
tableColumnDateTimeInRange,
tableDataCellValue,
tableRows,
Expand Down Expand Up @@ -79,10 +80,6 @@ test.describe(
test.describe("admin user", () => {
test.use({ storageState: "e2e/.auth/admin.json" });

test.beforeAll(({ browserName }) => {
test.skip(browserName !== "chromium");
});

test.describe(`${TEST_ORG_IGNORE} org - ${TEST_ORG_UP_RECEIVER_UP} receiver`, () => {
test.describe("onLoad", () => {
test("has correct title", async ({ dailyDataPage }) => {
Expand All @@ -102,6 +99,7 @@ test.describe(
});

test("table has pagination", async ({ dailyDataPage }) => {
await dailyDataPage.page.locator(".usa-table tbody").waitFor({ state: "visible" });
await expect(dailyDataPage.page.locator('[aria-label="Pagination"]')).toBeAttached();
});

Expand Down Expand Up @@ -292,9 +290,11 @@ test.describe(
expect(await tableDataCellValue(dailyDataPage.page, 0, 0)).toEqual(reportId);
});

test("returns match for Filename", async ({ dailyDataPage }) => {
test.skip("returns match for Filename", async ({ dailyDataPage }) => {
// Filename search is currently broken and being tracked
// in ticket #15644
const fileName = await tableDataCellValue(dailyDataPage.page, 0, 4);
await searchInput(dailyDataPage.page).fill(fileName);
await searchInput(dailyDataPage.page).fill(removeDateTime(fileName));
await searchButton(dailyDataPage.page).click();
await dailyDataPage.page.locator(".usa-table tbody").waitFor({ state: "visible" });

Expand Down Expand Up @@ -365,7 +365,7 @@ test.describe(
});
});

test.describe.skip("on 'Filename' click", () => {
test.describe("on 'Filename' click", () => {
test.beforeEach(async ({ dailyDataPage }) => {
await dailyDataPage.page.locator(".usa-table tbody").waitFor({ state: "visible" });
await dailyDataPage.page.locator("#receiver-dropdown").selectOption(TEST_ORG_UP_RECEIVER_UP);
Expand All @@ -387,7 +387,7 @@ test.describe(
const download = await downloadProm;

// assert filename
expect(download.suggestedFilename()).toEqual(expect.stringContaining(fileName));
expect(removeDateTime(download.suggestedFilename())).toEqual(removeDateTime(fileName));

// get and assert stats
expect((await fs.promises.stat(await download.path())).size).toBeGreaterThan(200);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable playwright/no-conditional-in-test */
/* eslint-disable playwright/no-networkidle */
import axios, { AxiosError } from "axios";
import * as fs from "fs";
import { test as baseTest, expect } from "../../test";
Expand Down Expand Up @@ -55,7 +55,9 @@ test.describe("Evaluate links on public facing pages", { tag: "@warning" }, () =
// Set test timeout to be 1 minute instead of 30 seconds
test.setTimeout(60000);
for (const path of urlPaths) {
await page.goto(path);
await page.goto(path, {
waitUntil: "networkidle",
});
const baseUrl = new URL(page.url()).origin;

const allATags = await page.getByRole("link", { includeHidden: true }).elementHandles();
Expand Down

0 comments on commit ef28841

Please sign in to comment.