Skip to content

Commit

Permalink
Merge branch 'I-TECH-UW:develop' into issue-1474
Browse files Browse the repository at this point in the history
  • Loading branch information
harshitg927 authored Jan 31, 2025
2 parents 5a426bc + 7e528c4 commit 1e38cca
Show file tree
Hide file tree
Showing 112 changed files with 13,228 additions and 2,247 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- name: check formatting
run: mvn spotless:check

# - name: Initialize and build submodules
# run: |
# cd dataexport
# mvn clean install
# cd ..
- name: Initialize and build submodules
run: |
cd dataexport
mvn clean install
cd ..
- name: Build OpenELIS-Global2
run: mvn clean install -Dspotless.check.skip=true
Expand Down
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ RUN ./install/createDefaultPassword.sh -c -p ${DEFAULT_PW}
##
# Build DataExport
#
# COPY ./dataexport /build/dataexport
# WORKDIR /build/dataexport/dataexport-core
# RUN --mount=type=cache,target=/root/.m2,sharing=locked \
# mvn dependency:go-offline
# RUN --mount=type=cache,target=/root/.m2,sharing=locked \
# mvn clean install -DskipTests
# WORKDIR /build/dataexport/
# RUN --mount=type=cache,target=/root/.m2,sharing=locked \
# mvn dependency:go-offline
# RUN --mount=type=cache,target=/root/.m2,sharing=locked \
# mvn clean install -DskipTests
COPY ./dataexport /build/dataexport
WORKDIR /build/dataexport/dataexport-core
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn clean install -DskipTests
WORKDIR /build/dataexport/
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn clean install -DskipTests

##
# Build the Project
Expand Down
22 changes: 11 additions & 11 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
ADD ./pom.xml /build/pom.xml
ADD ./tools /build/tools
ADD ./src /build/src
# ADD ./dataexport /build/dataexport
ADD ./dataexport /build/dataexport

WORKDIR /build

Expand All @@ -28,16 +28,16 @@ RUN ./install/createDefaultPassword.sh -c -p ${DEFAULT_PW}
##
# Build DataExport
#
# WORKDIR /build/dataexport/dataexport-core
# RUN --mount=type=cache,target=/root/.m2,sharing=locked \
# mvn dependency:go-offline
# RUN --mount=type=cache,target=/root/.m2,sharing=locked \
# mvn clean install -DskipTests
# WORKDIR /build/dataexport/
# RUN --mount=type=cache,target=/root/.m2,sharing=locked \
# mvn dependency:go-offline
# RUN --mount=type=cache,target=/root/.m2,sharing=locked \
# mvn clean install -DskipTests
WORKDIR /build/dataexport/dataexport-core
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn clean install -DskipTests
WORKDIR /build/dataexport/
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn dependency:go-offline
RUN --mount=type=cache,target=/root/.m2,sharing=locked \
mvn clean install -DskipTests

##
# Build the Project
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ see [OpenELIS-Docker setup](https://github.com/I-TECH-UW/openelis-docker)

git clone https://github.com/username/OpenELIS-Global-2.git

1. innitialize and build sub modules

cd OpenELIS-Global-2
git submodule update --init --recursive
cd dataexport
mvn clean install -DskipTests

1. Build the War file

mvn clean install -DskipTests
Expand Down
1 change: 1 addition & 0 deletions frontend/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = defineConfig({
// implement node event listeners here
config.specPattern = [
"cypress/e2e/login.cy.js",
"cypress/e2e/home.cy.js",
"cypress/e2e/patientEntry.cy.js",
"cypress/e2e/orderEntity.cy.js",
"cypress/e2e/workplan.cy.js",
Expand Down
101 changes: 59 additions & 42 deletions frontend/cypress/e2e/batchOrderEntry.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ before("login", () => {
loginPage.visit();
});

describe("Batch Order Entry On Demand", function () {
describe("Batch Order Entry On Demand and Serum form type", function () {
before("navigate to Batch Order Entry Page", function () {
navigateToBatchOrderEntryPage();
});
Expand All @@ -28,46 +28,63 @@ describe("Batch Order Entry On Demand", function () {
batchOrder.checkNextButtonDisabled();
});

it("Should Select Form And Samples", function () {
it("User selects Routine Form and Serum Sample", function () {
cy.fixture("BatchOrder").then((batchOrderData) => {
batchOrder.selectForm(batchOrderData.formTypeRoutine);
batchOrder.selectSampleType(batchOrderData.sampleType);
batchOrder.selectPanel(3);
batchOrder.selectSampleType(batchOrderData.serumSample);
});
});

it("User checks Panels and Tests", function () {
batchOrder.checkBilanPanel();
batchOrder.checkSerologiePanel();
//tests picked at random
batchOrder.checkDenguePCR();
batchOrder.checkHIVViralLoad();
batchOrder.checkCreatinine();
});

it("Should Select Methods, Site Name and Move to Next Page", function () {
cy.fixture("BatchOrder").then((batchOrderData) => {
batchOrder.selectMethod(batchOrderData.methodOnDemand);
batchOrder.checkFacilityCheckbox();
batchOrder.checkPatientCheckbox();
batchOrder.enterSiteName(batchOrderData.siteName);
batchOrder.checkNextButtonEnabled();
});
});

it("Should Visit Batch Order Entry Page", function () {
batchOrder.visitBatchOrderEntryPage();
it("User adds New Patient", function () {
batchOrder.clickNewPatientButton();
cy.fixture("BatchOrder").then((batchOrderData) => {
batchOrder.uniqueHealthIDNum(batchOrderData.healthID);
batchOrder.nationalID(batchOrderData.nationalID);
batchOrder.firstName(batchOrderData.firstName);
batchOrder.lastName(batchOrderData.lastName);
batchOrder.typePatientYears(batchOrderData.years);
batchOrder.typePatientMonths(batchOrderData.months);
batchOrder.typePatientDays(batchOrderData.days);
batchOrder.selectGender(); //female in this case
});
});
//Save button is lacking and needs to be added for this test to work
//it("User should click save new patient information button", function () {
// batchOrder.clickSavePatientButton();
//});

it("Should Validate Fields And Generate BarCode", function () {
it("Generate BarCode", function () {
cy.fixture("BatchOrder").then((batchOrderData) => {
batchOrder.validateField(
":nth-child(1) > .cds--subgrid > :nth-child(8)",
batchOrderData.sampleType,
);
batchOrder.validateField(".cds--lg\\:col-span-12", batchOrderData.panel);
batchOrder.validateField(
":nth-child(1) > .cds--subgrid > :nth-child(13)",
batchOrderData.facility,
);
batchOrder.checkNextLabel().should("be.disabled");
batchOrder.typeLabNumber(batchOrderData.labNumber);
batchOrder.clickGenerateAndSaveBarcode();
batchOrder.checkNextLabel().should("be.visible");
});
});
});

describe("Batch Order Entry Pre Printed", function () {
it("User clicks the finish button", function () {
batchOrder.clickFinishButton();
});
});
describe("Batch Order Entry Pre Printed and EID form type", function () {
before("navigate to Batch Order Entry Page", function () {
navigateToBatchOrderEntryPage();
});
Expand All @@ -77,15 +94,16 @@ describe("Batch Order Entry Pre Printed", function () {
batchOrder.checkNextButtonDisabled();
});

it("Should Select Form And Samples", function () {
it("User selects EID form, samples and test", function () {
cy.fixture("BatchOrder").then((batchOrderData) => {
batchOrder.selectForm(batchOrderData.formTypeRoutine);
batchOrder.selectSampleType(batchOrderData.sampleType);
batchOrder.selectPanel(3);
batchOrder.selectForm(batchOrderData.formTypeEID);
batchOrder.selectDNAPCRTest();
batchOrder.selectTubeSample();
batchOrder.selectBloodSample();
});
});

it("Should Select Methods, Site Name and Move to Next Page", function () {
it("User Selects Methods, Site Name and Move to Next Page", function () {
cy.fixture("BatchOrder").then((batchOrderData) => {
batchOrder.selectMethod(batchOrderData.methodPrePrinted);
batchOrder.checkFacilityCheckbox();
Expand All @@ -95,30 +113,29 @@ describe("Batch Order Entry Pre Printed", function () {
});
});

it("User Searches for Existing Patient", function () {
batchOrder.clickSearchPatientButton();
cy.fixture("BatchOrder").then((batchOrderData) => {
batchOrder.lastName(batchOrderData.lastName);
batchOrder.firstName(batchOrderData.firstName);
batchOrder.localSearchButton();
batchOrder.checkPatientRadio(); //the first on the list
});
});

it("Should Visit Batch Order Entry Page", function () {
batchOrder.visitBatchOrderEntryPage();
});

it("Should Validate Fields", function () {
it(" User enters Lab Number and Generates Barcode", function () {
cy.fixture("BatchOrder").then((batchOrderData) => {
batchOrder.validateField(
":nth-child(1) > .cds--subgrid > :nth-child(8)",
batchOrderData.sampleType,
);
batchOrder.validateField(".cds--lg\\:col-span-12", batchOrderData.panel);
batchOrder.validateField(
":nth-child(1) > .cds--subgrid > :nth-child(13)",
batchOrderData.facility,
);
batchOrder.typeLabNumber(batchOrderData.labNumber);
batchOrder.visitBatchOrderEntryPage();
batchOrder.clickGenerateButton();
batchOrder.saveOrder();
});
});

it("Should Search For Patient And Generate Barcode", function () {
batchOrder.selectPatientGender(2);
batchOrder.clickSearchPatient();
batchOrder.selectPatient(1);

batchOrder.clickGenerateButton();
batchOrder.saveOrder();
it("User clicks the finish button", function () {
batchOrder.clickFinishButton();
});
});
58 changes: 58 additions & 0 deletions frontend/cypress/e2e/home.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import LoginPage from "../pages/LoginPage";

let loginPage = null;
let home = null;

before(() => {
loginPage = new LoginPage();
loginPage.visit();

home = loginPage.goToHomePage();
});

//This action runs after each test
afterEach(() => {
home.afterAll();
});

describe("User navigates to different tiles", function () {
it("User navigates to the In Progress", function () {
home.selectInProgress();
});

it("User navigates to Ready for Validation", function () {
home.selectReadyforValidation();
});

it("User navigates to Orders Completed Today", function () {
home.selectOrdersCompletedToday();
});

it("User navigates to Partially Completed Today", function () {
home.selectPartiallyCompletedToday();
});

it("User navigates to Orders Entered By Users", function () {
home.selectOrdersEnteredByUsers();
});

it("User navigates to Orders Rejected", function () {
home.selectOrdersRejected();
});

it("User navigates to UnPrinted Results", function () {
home.selectUnPrintedResults();
});

it("User navigates to Electronic Orders", function () {
home.selectElectronicOrders();
});

it("User navigates to Average Turn Around time", function () {
home.selectAverageTurnAroundTime();
});

it("User navigates to Delayed Turn Around", function () {
home.selectDelayedTurnAround();
});
});
12 changes: 5 additions & 7 deletions frontend/cypress/e2e/nonConform.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import LoginPage from "../pages/LoginPage";
import HomePage from "../pages/HomePage";
import NonConform from "../pages/NonConformPage";

let homePage = null;
let loginPage = null;
Expand Down Expand Up @@ -65,7 +63,7 @@ describe("Report Non-Conforming Event", function () {
nonConform.enterSearchField(order.labNo);
nonConform.clickSearchButton();
nonConform.validateSearchResult(order.labNo);
nonConform.clickCheckbox();
nonConform.clickCheckbox({ force: true });
nonConform.clickGoToNceFormButton();
});

Expand All @@ -80,7 +78,7 @@ describe("Report Non-Conforming Event", function () {
nonConform.enterDescription(nonConformData.description);
nonConform.enterSuspectedCause(nonConformData.suspectedCause);
nonConform.enterCorrectiveAction(nonConformData.proposedCorrectiveAction);
nonConform.submitFormNce();
nonConform.submitForm();
});
});
});
Expand All @@ -100,12 +98,12 @@ describe("View New Non-Conforming Event", function () {
.getViewNonConformTitle()
.should("contain.text", "View New Non Conform Event");
});

it("Should Search by Lab Number and Validate the results", function () {
cy.fixture("EnteredOrder").then((order) => {
nonConform.selectSearchType("Lab Number");
nonConform.enterSearchField(order.labNo);
nonConform.clickSearchButton();
//nonConform.clickRadioButtonNCE();
nonConform.validateLabNoSearchResult(order.labNo);
});
});
Expand Down Expand Up @@ -148,13 +146,13 @@ describe("Corrective Actions", function () {
.getViewNonConformTitle()
.should("contain.text", "Nonconforming Events Corrective Action");
});

it("Should Search by Lab Number and Validate the results", function () {
cy.fixture("EnteredOrder").then((order) => {
nonConform.selectSearchType("Lab Number");
nonConform.enterSearchField(order.labNo);
nonConform.clickSearchButton();
nonConform.validateLabNoSearchResultCorective(order.labNo);
//nonConform.clickRadioButtonNCE();
nonConform.validateLabNoSearchResult(order.labNo);
});
});

Expand Down
Loading

0 comments on commit 1e38cca

Please sign in to comment.