Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing rewriting test notification config menu page #1204

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/result.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ describe("Result By Referred Out Tests", function () {
// );
// });
});
//commented due to UI changes
//commented due to UI changes
// it("should select the respecting referred test and print the selected patient reports", function () {
// result.selectRefferedTest();
// result.printReport();
Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/validation.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ describe("Validation By Range Of Order", function () {
});

it("Should Save the results", function () {
validation.saveResults('Test Note');
validation.saveResults("Test Note");
});
});
11 changes: 5 additions & 6 deletions frontend/cypress/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class HomePage {
return new NonConform();
}


goToResultsByUnit() {
this.openNavigationMenu();
cy.get("#menu_results").click();
Expand Down Expand Up @@ -150,22 +149,22 @@ class HomePage {

goToValidationByRoutine() {
this.openNavigationMenu();
cy.get('#menu_resultvalidation').click();
cy.get('#menu_resultvalidation_routine ').click();
cy.get("#menu_resultvalidation").click();
cy.get("#menu_resultvalidation_routine ").click();
return new Validation();
}
goToValidationByOrder() {
this.openNavigationMenu();
cy.get("#menu_resultvalidation").click();
cy.get('#menu_accession_validation ').click();
cy.get("#menu_accession_validation ").click();
return new Validation();
}
goToValidationByRangeOrder() {
this.openNavigationMenu();
cy.get("#menu_resultvalidation").click();
cy.get('#menu_accession_validation_range ').click();
cy.get("#menu_accession_validation_range ").click();
return new Validation();
}
}

goToRoutineReports() {
this.openNavigationMenu();
Expand Down
10 changes: 8 additions & 2 deletions frontend/cypress/pages/ResultsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ class Result {
}

validatePatientResult(patient) {
cy.get('tbody > :nth-child(1) > :nth-child(2)').should("contain.text", patient.lastName);
cy.get('tbody > :nth-child(1) > :nth-child(3)').should("contain.text", patient.firstName);
cy.get("tbody > :nth-child(1) > :nth-child(2)").should(
"contain.text",
patient.lastName,
);
cy.get("tbody > :nth-child(1) > :nth-child(3)").should(
"contain.text",
patient.firstName,
);
}

referSample(index = 0, reason, institute) {
Expand Down
49 changes: 24 additions & 25 deletions frontend/cypress/pages/Validation.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
class Validation {
checkForHeading() {
cy.get('section > h3').should("contain.text", "Validation");
}

selectTestUnit(unitType) {
cy.get('#unitType').select(unitType);
}
checkForHeading() {
cy.get("section > h3").should("contain.text", "Validation");
}

selectTestUnit(unitType) {
cy.get("#unitType").select(unitType);
}

validateTestUnit(unitType) {
cy.get("#cell-testName-0 > .sampleInfo").should("contain.text", unitType);
}

enterLabNumberAndSearch(labNo) {
cy.get("#accessionNumber").type(labNo);
cy.get(".cds--sm\\:col-span-4.cds--lg\\:col-span-16 > #submit").click();
cy.get("#cell-sampleInfo-0 > .sampleInfo").should("contain.text", labNo);
}

validateTestUnit(unitType) {
cy.get('#cell-testName-0 > .sampleInfo').should("contain.text", unitType);
}

enterLabNumberAndSearch(labNo) {
cy.get('#accessionNumber').type(labNo);
cy.get('.cds--sm\\:col-span-4.cds--lg\\:col-span-16 > #submit').click();
cy.get('#cell-sampleInfo-0 > .sampleInfo').should("contain.text", labNo);
}

saveResults(note) {
cy.get('#cell-save-0 > .cds--form-item > .cds--checkbox-label').click();
cy.get('#resultList0\\.note').type(note);
cy.get(':nth-child(3) > #submit').click();
}
saveResults(note) {
cy.get("#cell-save-0 > .cds--form-item > .cds--checkbox-label").click();
cy.get("#resultList0\\.note").type(note);
cy.get(":nth-child(3) > #submit").click();
}
export default Validation;
}

export default Validation;
12 changes: 12 additions & 0 deletions frontend/src/components/admin/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
Bullhorn,
User,
BatchJob,
Popup,
} from "@carbon/icons-react";
import PathRoute from "../utils/PathRoute";
import CalculatedValue from "./calculatedValue/CalculatedValueForm";
Expand All @@ -54,6 +55,8 @@ import UserManagement from "./userManagement/UserManagement";
import UserAddModify from "./userManagement/UserAddModify";
import ManageMethod from "./testManagement/ManageMethod.js";
import BatchTestReassignmentAndCancelation from "./BatchTestReassignmentAndCancellation/BatchTestReassignmentAndCancelation.js";
import TestNotificationConfigMenu from "./testNotificationConfigMenu/TestNotificationConfigMenu.js";
import TestNotificationConfigEdit from "./testNotificationConfigMenu/TestNotificationConfigEdit.js";

function Admin() {
const intl = useIntl();
Expand Down Expand Up @@ -188,6 +191,9 @@ function Admin() {
defaultMessage={"Common Properties"}
/>
</SideNavLink>
<SideNavLink href="#testNotificationConfigMenu" renderIcon={Popup}>
<FormattedMessage id="testnotificationconfig.browse.title" />
</SideNavLink>
<SideNavLink href="#DictionaryMenu" renderIcon={CharacterWholeNumber}>
<FormattedMessage id="dictionary.label.modify" />
</SideNavLink>
Expand Down Expand Up @@ -325,6 +331,12 @@ function Admin() {
id="sidenav.label.admin.formEntry.PrintedReportsconfig"
/>
</PathRoute>
<PathRoute path="#testNotificationConfigMenu">
<TestNotificationConfigMenu />
</PathRoute>
<PathRoute path="#testNotificationConfig">
<TestNotificationConfigEdit />
</PathRoute>
<PathRoute path="#DictionaryMenu">
<DictionaryManagement />
</PathRoute>
Expand Down
Loading
Loading