Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/gradle/prime-router/com.hieryno…
Browse files Browse the repository at this point in the history
…mus-sshj-0.35.0
  • Loading branch information
snesm authored Jul 28, 2023
2 parents 1168623 + 6f28db4 commit a5a0ead
Show file tree
Hide file tree
Showing 342 changed files with 8,359 additions and 11,045 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build_hub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build Hub

on:
on:
pull_request:
branches:
- master
Expand Down Expand Up @@ -44,9 +44,9 @@ jobs:
- name: Set up JDK 11
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2
with:
java-version: '11'
distribution: 'adopt'
cache: 'gradle'
java-version: "11"
distribution: "adopt"
cache: "gradle"

- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4

Expand All @@ -55,7 +55,7 @@ jobs:

- name: Build Prime Router Package
run: ./gradlew package -Pshowtests

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@f0b5d2433f350eff587831d4ad22cb15aab75866
# Per https://github.com/EnricoMi/publish-unit-test-result-action#support-fork-repositories-and-dependabot-branches
Expand All @@ -80,18 +80,18 @@ jobs:
id: spin_containers
run: |
docker-compose -f docker-compose.yml up -d prime_dev sftp azurite
- name: Give some time for the container to start
run: |
echo "sleeping 30"
sleep 30
echo "wake up"
- name: Load the configuration
run: |
./gradlew reloadTables
./gradlew reloadSettings
./gradlew reloadTables
./gradlew reloadSettings
# Integrations tests require the metadata catalog
- name: Run Integration Tests
run: ./gradlew testIntegration -Pshowtests
Expand All @@ -116,12 +116,12 @@ jobs:
export $(xargs < .vault/env/.env.local)
./prime create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass
./gradlew testSmoke
- name: Dump docker logs
if: always()
uses: jwalton/gh-docker-logs@59c9656cd3cb7542525f3dce7ae2f44c0ff85d66
with:
images: 'prime-router_prime_dev,vault'
images: "prime-router_prime_dev,vault"

- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
Expand All @@ -133,7 +133,7 @@ jobs:
- name: Generate New Schema Docs
run: |
# Clean the docs before regenerating
rm -rf docs/schema_documentation/*
rm -rf docs/docs_deprecated/schema_documentation/*
./gradlew generatedocs
- name: Check for Uncommited Schema Docs
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
language: ["java"]

steps:
- name: "Check out changes"
Expand All @@ -205,9 +205,9 @@ jobs:
- name: Set up JDK 11
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2
with:
java-version: '11'
distribution: 'adopt'
cache: 'gradle'
java-version: "11"
distribution: "adopt"
cache: "gradle"

- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4

Expand All @@ -220,7 +220,7 @@ jobs:
- name: Perform Java CodeQL Analysis
uses: github/codeql-action/analyze@4fddc51e4f3b5e5e9022f35c3464736cc10e1e98
if: github.actor != 'dependabot[bot]'

- name: "Run SonarCloud Scan"
uses: sonarsource/sonarcloud-github-action@db501078e936e4b4c8773d1bb949ba9ddb7b6b6a
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Get changed files
id: changed_files
uses: tj-actions/changed-files@b50d1ab2d1388e35e9163a8eb2ae8b903e62ca8e
uses: tj-actions/changed-files@920e7b9ae1d45913fc81f86c956fee89c77d2e5e

- name: List all changed files
id: set_vars
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 @@ -47,7 +47,7 @@ jobs:
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Run Checkov action
uses: bridgecrewio/checkov-action@d132fb315b75bd455c79e83437aea7cbb2a08ff6
uses: bridgecrewio/checkov-action@d6a007e728acbcb127d43cb3e2723a2e1c3a9ed5
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_159,CKV_AZURE_67,CKV_AZURE_56,CKV_AZURE_78,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_80,CKV_AZURE_35,CKV_AZURE_36,CKV_AZURE_98,CKV_AZURE_1,CKV_AZURE_15,CKV2_AZURE_1,CKV2_AZURE_8,CKV2_AZURE_15,CKV2_AZURE_21,CKV2_AZURE_18,CKV_SECRET_6,CKV_AZURE_190,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
Expand Down
4 changes: 2 additions & 2 deletions frontend-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and use `yarn` to serve it on `localhost:3000`

```bash
cd ../frontend-react
yarn
yarn --ignore-platform
yarn start:localdev
```

Expand Down Expand Up @@ -107,4 +107,4 @@ NOTE: This only works `run:build-dir` because webpack's dynamic runtime updating

`.github/workflows/chromatic-master.yml` triggers a Chromatic build anytime a PR gets merged into our `master` branch.

`.github/workflows/chromatic-pr.yml` triggers a Chromatic build anytime a file with `// AutoUpdateFileChromatic` comment on its FIRST LINE is checked in to a PR. The goal here is to automatically update our Chromatic anytime a file that has an associated Storybook is modified.
`.github/workflows/chromatic-pr.yml` triggers a Chromatic build anytime a file with `// AutoUpdateFileChromatic` comment on its FIRST LINE is checked in to a PR. The goal here is to automatically update our Chromatic anytime a file that has an associated Storybook is modified.
52 changes: 52 additions & 0 deletions frontend-react/src/__mocks__/DataDashboardMockServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { RSReceiver } from "../config/endpoints/settings";
import {
RSReceiverDelivery,
RSReceiverDeliveryResponse,
RSReceiverSubmitterResponse,
RSSubmitter,
} from "../config/endpoints/dataDashboard";

const base = `${config.API_ROOT}/v1/receivers`;
Expand Down Expand Up @@ -60,10 +62,48 @@ export const makeRSReceiverDeliveryResponseFixture = (
totalFilteredCount: overrides?.meta?.totalFilteredCount || 101,
totalPages: overrides?.meta?.totalPages || 10,
nextPage: overrides?.meta?.nextPage || 2,
previousPage: overrides?.meta?.previousPage || 1,
},
data: makeRSReceiverDeliveryFixtureArray(deliveryCount),
});

export const makeRSSubmitterFixture = (
id: number,
overrides?: Partial<RSSubmitter>
): RSSubmitter => ({
id: id.toString() || "123",
name: overrides?.name || "Any facility USA",
firstReportDate: overrides?.firstReportDate || new Date().toString(),
testResultCount: overrides?.testResultCount || 2,
type: overrides?.type || "SUBMITTER",
location: overrides?.location || "Little Rock, AS",
});
export const makeRSSubmitterFixtureArray = (count: number) => {
const fixtures: RSSubmitter[] = [];
for (let i = 0; i < count; i++) {
fixtures.push(makeRSSubmitterFixture(i));
}
return fixtures;
};

/** TEST UTILITY - generates `RSReceiverSubmitterResponse`, with the number of RSSubmitter[] requested
*
* @param submitterCount {number} How many unique RSReceiverSubmitter you want. */
export const makeRSReceiverSubmitterResponseFixture = (
submitterCount: number,
overrides?: Partial<RSReceiverSubmitterResponse>
): RSReceiverSubmitterResponse => ({
meta: {
type: overrides?.meta?.type || "submitter",
totalCount: overrides?.meta?.totalCount || 101,
totalFilteredCount: overrides?.meta?.totalFilteredCount || 101,
totalPages: overrides?.meta?.totalPages || 10,
nextPage: overrides?.meta?.nextPage || 2,
previousPage: overrides?.meta?.previousPage || 1,
},
data: makeRSSubmitterFixtureArray(submitterCount),
});

const handlers = [
rest.post(`${base}/testOrg.testService/deliveries`, (req, res, ctx) => {
if (!req.headers.get("authorization")?.includes("TOKEN")) {
Expand All @@ -74,6 +114,18 @@ const handlers = [
ctx.json([makeRSReceiverDeliveryResponseFixture(5)])
);
}),
rest.post(
`${base}/testOrg.testService/deliveries/submitters/search`,
(req, res, ctx) => {
if (!req.headers.get("authorization")?.includes("TOKEN")) {
return res(ctx.status(401));
}
return res(
ctx.status(200),
ctx.json([makeRSReceiverSubmitterResponseFixture(5)])
);
}
),
];

export const dataDashboardServer = setupServer(...handlers);
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ describe("DataDashboardTable", () => {
afterEach(() => dataDashboardServer.resetHandlers());
afterAll(() => dataDashboardServer.close());

describe("useReceiverFeed without data", () => {
describe("useOrganizationReceiversFeed without data", () => {
beforeEach(() => {
// Mock our receivers feed data
// Mock our receiver services feed data
mockUseOrganizationReceiversFeed.mockReturnValue({
activeService: undefined,
loadingServices: false,
Expand Down Expand Up @@ -217,7 +217,7 @@ describe("DataDashboardTableWithPagination", () => {

describe("with no receiver services", () => {
beforeEach(() => {
// Mock our receivers feed data
// Mock our receiver services feed data
mockUseOrganizationReceiversFeed.mockReturnValue({
activeService: undefined,
loadingServices: false,
Expand Down Expand Up @@ -274,7 +274,7 @@ describe("DataDashboardTableWithPagination", () => {

describe("when disabled", () => {
beforeEach(() => {
// Mock our receivers feed data
// Mock our receiver services feed data
mockUseOrganizationReceiversFeed.mockReturnValue({
activeService: undefined,
loadingServices: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,15 @@ function DashboardFilterAndTable({
}: {
from: string;
to: string;
}) =>
}) => {
filterManager?.updatePage({
type: PageSettingsActionType.RESET,
});

trackAppInsightEvent(featureEvent, {
tableFilter: { startRange: from, endRange: to },
})
}
});
}}
/>
</div>
<Table apiSortable borderless rowData={data} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
.FacilitiesProviders {

header {
a {
color: white;
margin-left: 18px;
}
}
@use "../../../global-modules.scss" as *;

.FacilitiesProviders {
hr {
border: 1px solid #73B3E7;
border: 1px solid color('blue-30');
}

:global {
.usa-breadcrumb {
background-color: #D9E8F6;
background-color: color('blue-10');
margin-top: 0;
margin-left: 56px;
padding-left: 16px;
}

.usa-breadcrumb__link {
color: color('blue-60v');
}

.usa-header {
background-color: #D9E8F6;
background-color: color('blue-10');
}

.grid-container {
Expand Down Expand Up @@ -69,7 +67,7 @@
}

.usa-table--striped tbody tr:nth-child(odd) td {
background-color: #f1f3F6;
background-color: color('gray-cool-4');
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { screen } from "@testing-library/react";

import { renderApp } from "../../../utils/CustomRenderUtils";

import { FacilitiesProviders } from "./FacilitiesProviders";

describe("FacilitiesProviders", () => {
test("Breadcrumb displays with link", async () => {
renderApp(<FacilitiesProviders />);

const link = screen.getByRole("link");
expect(link).toHaveAttribute("href", "/data-dashboard");
expect(link).toHaveTextContent("Data Dashboard");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export function FacilitiesProviders() {
};
return (
<div className={styles.FacilitiesProviders}>
<header className="usa-header usa-header--extended">
<header className="usa-header usa-header--extended padding-top-6 padding-left-2 margin-top-neg-5">
<Crumbs {...crumbProps}></Crumbs>
<GridContainer className="margin-left-7 margin-right-7 padding-bottom-3">
<div className="font-sans-2xl">
<GridContainer className="margin-left-5 margin-right-7 padding-bottom-8">
<div className="font-sans-2xl text-bold">
All facilities & providers
</div>
<hr className="margin-bottom-1" />
Expand All @@ -35,7 +35,7 @@ export function FacilitiesProviders() {
<hr />
</GridContainer>
</header>
<GridContainer className="margin-left-7 margin-right-7 padding-top-4">
<GridContainer className="margin-left-7 margin-right-7 padding-top-8">
<Helmet>
<title>{FeatureName.FACILITIES_PROVIDERS}</title>
</Helmet>
Expand Down
Loading

0 comments on commit a5a0ead

Please sign in to comment.