Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:I-TECH-UW/OpenELIS-Global-2 into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
CalebSLane committed Jun 28, 2024
2 parents 8f9e387 + 602ff5d commit cc96766
Show file tree
Hide file tree
Showing 1,949 changed files with 165,877 additions and 173,070 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/frontend-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,42 @@ on:
pull_request:
branches: [develop]
workflow_dispatch:

env:
DOCKER_NAME: ${{ vars.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}-frontend

jobs:

build-prod-frontend-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_NAME }}

- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile.prod
push: false


build-and-run-qa-tests:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ jobs:
[build-and-push-test-image-backend, build-and-push-test-image-frontend]
runs-on: ubuntu-latest
steps:
- name: Sleep for 2 minutes
run: sleep 2m
shell: bash

- name: Checkout OpenELIS-Global2
uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ src/main/resources/adminPassword.txt
/bin/
/.apt_generated/
*/plugins/*.jar
Patient/*
2 changes: 1 addition & 1 deletion dev.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:

oe.openelis.org:
container_name: openelisglobal-webapp
image: itechuw/openelis-global-2:develop
image: itechuw/openelis-global-2-dev:develop
depends_on:
- database
- certs
Expand Down
6 changes: 2 additions & 4 deletions frontend/cypress/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"extends": [
"plugin:cypress/recommended"
]
}
"extends": ["plugin:cypress/recommended"]
}
5 changes: 4 additions & 1 deletion frontend/cypress/e2e/orderEntity.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ describe("Order Entity", function () {
orderEntityPage.clickNextButton();
});

it("Should click generate Lab Order Number and store it in a fixture", function () {
it("Should do a validation check for labNo and then click generate Lab Order Number and store it in a fixture", function () {
cy.fixture("Order").then((order) => {
orderEntityPage.validateAcessionNumber(order.invalidLabNo);
});
orderEntityPage.generateLabOrderNumber();
cy.get("#labNo").then(($input) => {
const generatedOrderNumber = $input.val();
Expand Down
18 changes: 18 additions & 0 deletions frontend/cypress/e2e/patientEntry.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,24 @@ describe("Patient Search", function () {
cy.wait(200).reload();
});

it("should search patient By Lab Number", function () {
cy.fixture("Patient").then((patient) => {
patientPage.searchPatientBylabNo(patient.labNo);
cy.intercept(
"GET",
`**/rest/patient-search-results?*labNumber=${patient.labNo}*`,
).as("getPatientSearch");
patientPage.clickSearchPatientButton();
cy.wait("@getPatientSearch").then((interception) => {
const responseBody = interception.response.body;
console.log(responseBody);
expect(responseBody.patientSearchResults).to.be.an("array").that.is
.empty;
});
});
cy.wait(200).reload();
});

it("should search patient By PatientId", function () {
cy.wait(1000);
cy.fixture("Patient").then((patient) => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/cypress/fixtures/Order.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"firstName": "Optimus",
"lastName": "Prime"
},
"labNo": ""
"labNo": "",
"invalidLabNo": "DEV0124000000000000"
}
3 changes: 2 additions & 1 deletion frontend/cypress/fixtures/Patient.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"subjectNumber": "001202782410",
"nationalId": "UG-23SLHD7DBD",
"DOB": "12/05/2001",
"gender": "Male"
"gender": "Male",
"labNo": "DEV01240000000000001"
}
12 changes: 12 additions & 0 deletions frontend/cypress/pages/OrderEntityPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ class OrderEntityPage {
).click();
}

validateAcessionNumber(order) {
cy.intercept("GET", `**/rest/SampleEntryAccessionNumberValidation**`).as(
"accessionNoValidation",
);
cy.get("#labNo").type(order, { delay: 300 });

cy.wait("@accessionNoValidation").then((interception) => {
const responseBody = interception.response.body;
console.log(responseBody);
expect(responseBody.status).to.be.false;
});
}
enterSiteName(siteName) {
cy.enterText("input#siteName", siteName);
}
Expand Down
5 changes: 5 additions & 0 deletions frontend/cypress/pages/PatientEntryPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class PatientEntryPage {
personContactPrimaryPhone = "input#patientContact\\.person\\.primaryPhone";
personContactEmail = "input#patientContact\\.person\\.email";
patientIdSelector = "input#patientId";
labNoSelector = "#labNumber";
city = "input#city";
primaryPhone = "input#primaryPhone";
dateOfBirth = "input#date-picker-default-id";
Expand Down Expand Up @@ -92,6 +93,10 @@ class PatientEntryPage {
cy.enterText(this.patientIdSelector, PID);
}

searchPatientBylabNo(labNo) {
cy.enterText(this.labNoSelector, labNo);
}

getPatientSearchResultsTable() {
return cy.getElement(
".cds--data-table.cds--data-table--lg.cds--data-table--sort > tbody",
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import PrintBarcode from "./components/printBarcode/Index";
import NonConformIndex from "./components/nonconform/index";
import SampleBatchEntrySetup from "./components/batchOrderEntry/SampleBatchEntrySetup.js";
import AuditTrailReportIndex from "./components/reports/auditTrailReport/Index.js";
import OrganizationAddEdit from "./components/admin/OrganizationManagement/OrganizationAddModify.js";
import ReferredOutTests from "./components/resultPage/resultsReferredOut/ReferredOutTests.js";

export default function App() {
let i18nConfig = {
Expand Down Expand Up @@ -410,6 +410,12 @@ export default function App() {
component={() => <ResultSearch />}
role="Results"
/>
<SecureRoute
path="/ReferredOutTests"
exact
component={() => <ReferredOutTests />}
role="Results"
/>
<SecureRoute
path="/RoutineReports"
exact
Expand Down
23 changes: 23 additions & 0 deletions frontend/src/components/admin/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import {
CicsSystemGroup,
QrCode,
ContainerSoftware,
BootVolumeAlt,
Report,
} from "@carbon/icons-react";
import PathRoute from "../utils/PathRoute";
import CalculatedValue from "./calculatedValue/CalculatedValueForm";
Expand All @@ -40,6 +42,9 @@ import ProviderMenu from "./ProviderMenu/ProviderMenu";
import BarcodeConfiguration from "./barcodeConfiguration/BarcodeConfiguration";
import OrganizationManagament from "./OrganizationManagement/OrganizationManagement";
import OrganizationAddModify from "./OrganizationManagement/OrganizationAddModify.js";
import AnalyzerTestName from "./analyzerTestName/AnalyzerTestName.js";
import PluginList from "./pluginFile/PluginFile.js";
import ResultReportingConfiguration from "./ResultReportingConfiguration/ResultReportingConfiguration.js";

function Admin() {
const intl = useIntl();
Expand Down Expand Up @@ -75,6 +80,9 @@ function Admin() {
<FormattedMessage id="sidenav.label.admin.testmgt.calculated" />
</SideNavMenuItem>
</SideNavMenu>
<SideNavLink href="#AnalyzerTestName" renderIcon={ListDropdown}>
<FormattedMessage id="sidenav.label.admin.analyzerTest" />
</SideNavLink>
<SideNavLink href="#labNumber" renderIcon={CharacterWholeNumber}>
<FormattedMessage id="sidenav.label.admin.labNumber" />
</SideNavLink>
Expand All @@ -87,12 +95,18 @@ function Admin() {
<SideNavLink renderIcon={QrCode} href="#barcodeConfiguration">
<FormattedMessage id="sidenav.label.admin.barcodeconfiguration" />
</SideNavLink>
<SideNavLink href="#PluginFile" renderIcon={BootVolumeAlt}>
<FormattedMessage id="sidenav.label.admin.Listplugin" />
</SideNavLink>
<SideNavLink
renderIcon={ContainerSoftware}
href="#organizationManagement"
>
<FormattedMessage id="organization.main.title" />
</SideNavLink>
<SideNavLink renderIcon={Report} href="#resultReportingConfiguration">
<FormattedMessage id="resultreporting.browse.title" />
</SideNavLink>
<SideNavMenu
title={intl.formatMessage({ id: "sidenav.label.admin.menu" })}
renderIcon={TableOfContents}
Expand Down Expand Up @@ -166,6 +180,9 @@ function Admin() {
<PathRoute path="#calculatedValue">
<CalculatedValue />
</PathRoute>
<PathRoute path="#AnalyzerTestName">
<AnalyzerTestName />
</PathRoute>
<PathRoute path="#labNumber">
<LabNumberManagement />
</PathRoute>
Expand All @@ -184,6 +201,9 @@ function Admin() {
<PathRoute path="#organizationEdit">
<OrganizationAddModify />
</PathRoute>
<PathRoute path="#resultReportingConfiguration">
<ResultReportingConfiguration />
</PathRoute>
<PathRoute path="#globalMenuManagement">
<GlobalMenuManagement />
</PathRoute>
Expand Down Expand Up @@ -248,6 +268,9 @@ function Admin() {
<PathRoute path="#DictionaryMenu">
<DictionaryManagement />
</PathRoute>
<PathRoute path="#PluginFile">
<PluginList />
</PathRoute>
</>
);
}
Expand Down
Loading

0 comments on commit cc96766

Please sign in to comment.