Skip to content

Commit

Permalink
Revert "Deployment of 2024-09-12 (#15855)"
Browse files Browse the repository at this point in the history
This reverts commit e07ac7a.
  • Loading branch information
thetaurean authored Sep 16, 2024
1 parent e07ac7a commit 86a6d9e
Show file tree
Hide file tree
Showing 314 changed files with 27,000 additions and 9,129 deletions.
2 changes: 0 additions & 2 deletions .environment/gitleaks/gitleaks-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ title = "PRIME ReportStream Gitleaks Configuration"
'authority\", \"extension\"', # FHIR extension URL also shows up in normal FHIR test data
'ApiKeyCredential\(\"flexion\"',
'authType: \"two-legged\"',
'\"apiKey\"',
'api-key\" to \"oracle123\"',
'Authorization-Type: \"username/password\"',
'cdctiautomated_sa'
]
Expand Down
17 changes: 2 additions & 15 deletions .github/ISSUE_TEMPLATE/up-receiver-migration-validate-test-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
name: UP Migrating Receiver - Validate Test Data
about: This is the fourth step in migrating a STLT to the UP
title: "[name of STLT] - UP Migration - Validate Test Data"
labels: onboarding-ops, receiver, engineering, needs-refinement
labels: onboarding-ops, receiver
assignees: ''

---
[STLT] = name of STLT

### User Story:
As a developer, I want the [STLT] to validate test messages in staging, so that they can receive data in the format they expect.
Expand All @@ -28,16 +27,4 @@ As a developer, I want the [STLT] to validate test messages in staging, so that

### Acceptance Criteria
- [ ] Created and sent data using Simple Report
- [ ] Confirmed with STLT that data passes validation
- [ ] When finished, tag Mikaelah, Chris, and Glenn in a slack post stating:
> [STLT] "Testing in Staging" is complete and will be moving on to "Monitor in Production"
>
> Connection Type: [REST, SFTP, SOAP, etc]
>
> Conditions tested: [List of Conditions]
>
> Positives set up to receive: [List of Conditions]
>
> Negatives set up to receive: [List of Conditions]
>
> Format receiving: [HL7 or FHIR]
- [ ] Confirmed with STLT that data passes validation
2 changes: 1 addition & 1 deletion .github/actions/build-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
sudo rm -rf /usr/local/lib/android
- name: Set up JDK 17
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
with:
java-version: "17"
distribution: "temurin"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-submissions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
sudo rm -rf /usr/local/lib/android
- name: Set up JDK 17
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
with:
java-version: "17"
distribution: "temurin"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ jobs:
./gradlew :prime-router:primeCLI --args='validate-yaml --type Organizations --file settings/organizations.yml --dir settings/STLTs'
./gradlew :prime-router:primeCLI --args='validate-yaml --type FhirToFhirTransform --dir src/main/resources/metadata/fhir_transforms'
./gradlew :prime-router:primeCLI --args='validate-yaml --type FhirToHL7Mapping --dir src/main/resources/metadata/hl7_mapping'
./gradlew :prime-router:primeCLI --args='validate-yaml --type HL7ToFhirMappingMessageTemplate --dir metadata/HL7/catchall/hl7/message'
./gradlew :prime-router:primeCLI --args='validate-yaml --type HL7ToFhirMappingResourceTemplate --dir metadata/HL7 --exclude-dir metadata/HL7/catchall/hl7/message metadata/HL7/catchall/hl7/codesystem --exclude-file metadata/HL7/catchall/fhir/resourcemapping.yml metadata/HL7/catchall/hl7/resource/Common.yml'
./gradlew :prime-router:primeCLI --args='validate-yaml --type HL7ToFhirMappingMessageTemplate --dir metadata/HL7/catchall/hl7/message metadata/HL7/v251-elr/hl7/message'
./gradlew :prime-router:primeCLI --args='validate-yaml --type HL7ToFhirMappingResourceTemplate --dir metadata/HL7 --exclude-dir metadata/HL7/catchall/hl7/message metadata/HL7/v251-elr/hl7/message metadata/HL7/v251-elr/hl7/codesystem metadata/HL7/catchall/hl7/codesystem --exclude-file metadata/HL7/catchall/fhir/resourcemapping.yml metadata/HL7/v251-elr/fhir/resourcemapping.yml metadata/HL7/catchall/hl7/resource/Common.yml metadata/HL7/v251-elr/hl7/resource/Common.yml'
- name: Check for Uncommited Schema Docs
id: check_changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend_chromatic_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: yarn install --immutable

- name: Run Chromatic
uses: chromaui/action@95f238da20415287a1a877fecec79290ad2a7e0c
uses: chromaui/action@b984808b772126a9f44b2b7737b131b68a2ede32
with:
workingDir: frontend-react
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:

- name: Run Chromatic
id: chromatic
uses: chromaui/action@95f238da20415287a1a877fecec79290ad2a7e0c
uses: chromaui/action@b984808b772126a9f44b2b7737b131b68a2ede32
with:
workingDir: frontend-react
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: snyk/actions/setup@b98d498629f1c368650224d6d212bf7dfa89e4bf
- name: Set up JDK 17 to generate backend coverage stats
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
with:
java-version: "17"
distribution: "temurin"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set up JDK 17
if: steps.changed-files-yaml.outputs.backend_any_changed == 'true' || steps.branch-name.outputs.is_default == 'true'
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
with:
java-version: "17"
distribution: "temurin"
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@08a0f072354cdd9c009ce7c5c6174491834cec08
uses: bridgecrewio/checkov-action@c9421864e014ef6b8acfa35d0bf3c7e52c13ab10
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ hs_err_pid*
**/build/**
**/log/**
**/dependency-reduced-pom.xml
**/version.json

# Frontend build output
**/node_modules/**
Expand Down
196 changes: 4 additions & 192 deletions frontend-react/e2e/pages/authenticated/admin/receiver-status.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { expect, Locator } from "@playwright/test";
import { endOfDay, format, startOfDay, subDays } from "date-fns";
import type { RSOrganizationSettings } from "../../../../src/config/endpoints/settings";
import { RSReceiverStatus } from "../../../../src/hooks/api/UseReceiversConnectionStatus/UseReceiversConnectionStatus";
import {
createStatusTimePeriodData,
SUCCESS_RATE_CLASSNAME_MAP,
SuccessRate,
} from "../../../../src/pages/admin/receiver-dashboard/utils";
import { DatePair, dateShortFormat, durationFormatShort } from "../../../../src/utils/DateTimeUtils";
import { formatDate } from "../../../../src/utils/misc";
import { DatePair, dateShortFormat } from "../../../../src/utils/DateTimeUtils";
import { createMockGetReceiverStatus } from "../../../mocks/receiverStatus";
import { BasePage, BasePageTestArgs, type ResponseHandlerEntry, type RouteHandlerFulfillEntry } from "../../BasePage";

Expand Down Expand Up @@ -313,7 +310,8 @@ export class AdminReceiverStatusPage extends BasePage {
if (!isRequestAwaitedBool) return undefined as void;

const req = await p;
return req ? new URL(req.url()) : undefined;
const reqUrl = req ? new URL(req.url()) : undefined;
return reqUrl;
}

async updateFilterDateRange(start: Date, end: Date, inputMethod: "textbox" | "calendar" = "textbox") {
Expand Down Expand Up @@ -402,7 +400,7 @@ export class AdminReceiverStatusPage extends BasePage {
return a[0] !== b[0] && a[1] !== b[1];
}

async testReceiverStatusDisplay(isSmoke = false) {
async testReceiverStatusDisplay() {
const [startDate, endDate] = this.filterFormInputs.dateRange.value;
const statusRows = this.receiverStatusRowsLocator;
await expect(statusRows).toHaveCount(new Set(this.receiverStatus?.map((r) => r.receiverId)).size);
Expand Down Expand Up @@ -446,192 +444,6 @@ export class AdminReceiverStatusPage extends BasePage {
await expect(sliceEle).toHaveClass(expectedClass);
}
}

if (isSmoke && i === 0) {
break;
}
}

return true;
}

async testReceiverName() {
const { organizationName, receiverName, successRate } =
this.timePeriodData[1];

const receiversStatusRows = this.receiverStatusRowsLocator;
const expectedReceiverStatusRow = receiversStatusRows.nthCustom(0);
const expectedReceiverStatusRowTitle =
this.getExpectedReceiverStatusRowTitle(
organizationName,
receiverName,
successRate,
);

await expect(receiversStatusRows).toHaveCount(this.timePeriodData.length);

await this.updateFilters({
receiverName,
});

await expect(receiversStatusRows).toHaveCount(1);
await expect(expectedReceiverStatusRow).toBeVisible();
await expect(expectedReceiverStatusRow.title).toHaveText(expectedReceiverStatusRowTitle);

await this.resetFilters();

await expect(receiversStatusRows).toHaveCount(this.timePeriodData.length);

return true;
}

async testReceiverMessage() {
// get first entry's result from all-fail receiver's first day -> third time period
const receiverI = 0;
const dayI = 0;
const timePeriodI = 2;
const entryI = 0;
const {days} = this.timePeriodData[receiverI];
const {connectionCheckResult} = days[dayI].timePeriods[timePeriodI].entries[entryI];

const receiversStatusRows = this.receiverStatusRowsLocator;

await this.updateFilters({
resultMessage: connectionCheckResult,
});

for (const [i, {days}] of this.timePeriodData.entries()) {
const isRowExpected = i === receiverI;
const row = receiversStatusRows.nthCustom(i);

for (const [i, {timePeriods}] of days.entries()) {
const isDayExpected = isRowExpected && i === dayI;
const rowDay = row.days.nthCustom(i);

for (const [i] of timePeriods.entries()) {
const isTimePeriodExpected = isDayExpected && i === timePeriodI;
const expectedClass = !isTimePeriodExpected
? /success-result-hidden/
: /^((?!success-result-hidden).)*$/;
const rowDayTimePeriod = rowDay.timePeriods.nth(i);

await expect(rowDayTimePeriod).toBeVisible();
await expect(rowDayTimePeriod).toHaveClass(expectedClass);
}
}
}

await this.resetFilters();

await this.testReceiverStatusDisplay();

return true;
}

async testReceiverOrgLinks(isSmoke = false) {
const rows = this.receiverStatusRowsLocator;

for (const [i, { organizationName }] of this.timePeriodData.entries()) {
const row = rows.nthCustom(i);

const link = row.title.getByRole("link", { name: organizationName, exact: true }).first();
const expectedUrl = this.getExpectedStatusOrganizationUrl(i);
await expect(link).toBeVisible();
const p = this.page.route(
`/api/settings/organizations/${organizationName}`,
(route) =>
route.fulfill({
json: {
description: "fake",
filters: [],
name: organizationName,
jurisdiction: "fake",
version: 0,
createdAt: "",
createdBy: "",
} satisfies RSOrganizationSettings,
}),
);
await link.click();
await expect(this.page).toHaveURL(expectedUrl);
await p;
await this.page.goBack();

if (isSmoke && i === 0) {
break;
}
}

return true;
}

async testReceiverTimePeriodModals(isSmoke = false) {
const overlay = this.filterFormInputs.dateRange.modalOverlay;

for (const [i, { days }] of this.timePeriodData.entries()) {
const { days: daysLoc } = this.receiverStatusRowsLocator.nthCustom(i);

for (const [dayI, day] of days.entries()) {
for (const [i, { successRateType, entries }] of day.timePeriods.entries()) {
// only first entry in time period is currently displayed
const {
organizationName,
organizationId,
receiverId,
receiverName,
connectionCheckSuccessful,
connectionCheckStartedAt,
connectionCheckCompletedAt,
connectionCheckResult,
} = entries[0] ?? {};
const sliceEle = daysLoc.nthCustom(dayI).timePeriods.nth(i);

const isModalExpectedVisible = successRateType !== SuccessRate.UNDEFINED;

await sliceEle.click({ force: true });
await expect(overlay).toBeAttached({
attached: isModalExpectedVisible,
});

if (isModalExpectedVisible) {
const expectedResultText = connectionCheckSuccessful ? "success" : "failed";
const expectedModalText = `Results for connection verification checkOrg:${organizationName} (id: ${organizationId})Receiver:${receiverName} (id: ${receiverId})Result:${expectedResultText}Started At:${formatDate(connectionCheckStartedAt)}${connectionCheckStartedAt.toISOString()}Time to complete:${durationFormatShort(connectionCheckCompletedAt, connectionCheckStartedAt)}Result message:${connectionCheckResult}`;

await expect(overlay).toBeVisible();
await expect(overlay).toHaveText(expectedModalText);

await overlay.press("Escape");
}
}
}

if (isSmoke && i === 0) {
break;
}
}

return true;
}

async testReceiverLinks(isSmoke = false) {
const rows = this.receiverStatusRowsLocator;

for (const [i, { receiverName }] of this.timePeriodData.entries()) {
const row = rows.nthCustom(i);

const link = row.title.getByRole("link", {
name: receiverName,
});
await expect(link).toBeVisible();
await link.click();
await expect(this.page).toHaveURL(
this.getExpectedStatusReceiverUrl(i),
);
await this.page.goBack();

if (isSmoke && i === 0) {
break;
}
}

return true;
Expand Down
Loading

0 comments on commit 86a6d9e

Please sign in to comment.