Skip to content

Commit

Permalink
Merge branch 'develop' into fix-rewriting-TestNotificationConfigMenu-…
Browse files Browse the repository at this point in the history
…page
  • Loading branch information
mozzy11 authored Aug 1, 2024
2 parents ecb9caf + 57b7604 commit 11008d1
Show file tree
Hide file tree
Showing 30 changed files with 1,367 additions and 370 deletions.
2 changes: 1 addition & 1 deletion frontend/cypress/fixtures/NonConform.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"suspectedCause": "A software bug",
"proposedCorrectiveAction": "Fix the software bug and add validation checks.",
"NceNumber": "1720781367696"
}
}
76 changes: 40 additions & 36 deletions frontend/cypress/pages/NonConformPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class NonConform {
return cy.get("h2");
}

getViewNonConformTitle(){
getViewNonConformTitle() {
return cy.get("h2");
}

Expand All @@ -25,16 +25,22 @@ class NonConform {
.should("eq", expectedValue);
}

validateLabNoSearchResult(labNo){
cy.get('.orderLegendBody > :nth-child(2) > :nth-child(7) > :nth-child(2)').invoke('text').should('eq', labNo);
validateLabNoSearchResult(labNo) {
cy.get(".orderLegendBody > :nth-child(2) > :nth-child(7) > :nth-child(2)")
.invoke("text")
.should("eq", labNo);
}

validateNCESearchResult(NCENo){
cy.get('[style="margin-bottom: 10px; color: rgb(85, 85, 85);"]').invoke('text').should('eq', NCENo);
validateNCESearchResult(NCENo) {
cy.get('[style="margin-bottom: 10px; color: rgb(85, 85, 85);"]')
.invoke("text")
.should("eq", NCENo);
}

validateLabNoSearchResultCorective(labNo){
cy.get('.cds--subgrid > :nth-child(7) > :nth-child(2)').invoke('text').should('eq', labNo);
validateLabNoSearchResultCorective(labNo) {
cy.get(".cds--subgrid > :nth-child(7) > :nth-child(2)")
.invoke("text")
.should("eq", labNo);
}

clickCheckbox() {
Expand All @@ -54,78 +60,77 @@ class NonConform {
}

enterDescription(description) {
cy.get('#text-area-1').type(description);
cy.get("#text-area-1").type(description);
}

enterSuspectedCause(SuspectedCause) {
cy.get('#text-area-2').type(SuspectedCause);
cy.get("#text-area-2").type(SuspectedCause);
}

enterCorrectiveAction(correctiveaction) {
cy.get('#text-area-3').type(correctiveaction);
cy.get("#text-area-3").type(correctiveaction);
}

enterNceCategory(nceCategory) {
cy.get('#nceCategory').select(nceCategory);
cy.get("#nceCategory").select(nceCategory);
}

enterNceType(nceType) {
cy.get('#nceType').select(nceType);
cy.get("#nceType").select(nceType);
}

enterConsequences(consequences) {
cy.get('#consequences').select(consequences);
cy.get("#consequences").select(consequences);
}

enterRecurrence(recurrence) {
cy.get('#recurrence').select(recurrence);
cy.get("#recurrence").select(recurrence);
}

enterLabComponent(labComponent) {
cy.get('#labComponent').select(labComponent);
cy.get("#labComponent").select(labComponent);
}

enterDescriptionAndComments(testText) {
cy.get('#text-area-10').type(testText);
cy.get('#text-area-3').type(testText);
cy.get('#text-area-2').type(testText);
cy.get("#text-area-10").type(testText);
cy.get("#text-area-3").type(testText);
cy.get("#text-area-2").type(testText);
}

submitForm() {
cy.get(':nth-child(28) > .cds--btn').click();
cy.get(":nth-child(28) > .cds--btn").click();
}

submitFormNce(){
cy.get(':nth-child(14) > .cds--btn').click();
submitFormNce() {
cy.get(":nth-child(14) > .cds--btn").click();
}


enterDiscussionDate(date) {
cy.get('.cds--date-picker-input__wrapper > #tdiscussionDate').type(date);
cy.get(".cds--date-picker-input__wrapper > #tdiscussionDate").type(date);
}

enterProposedCorrectiveAction(action) {
cy.get('#text-area-corrective').type(action, { force: true });
cy.get("#text-area-corrective").type(action, { force: true });
}

enterDateCompleted(date) {
cy.get('.cds--date-picker-input__wrapper > #dateCompleted').type(date);
cy.get(".cds--date-picker-input__wrapper > #dateCompleted").type(date);
}

selectActionType() {
cy.get(':nth-child(1) > .cds--checkbox-label').click();
cy.get(":nth-child(1) > .cds--checkbox-label").click();
}

selectResolution() {
cy.get(':nth-child(1) > .cds--radio-button__label').click();
cy.get(":nth-child(1) > .cds--radio-button__label").click();
}

enterDateCompleted0(date) {
cy.get('.cds--date-picker-input__wrapper > #dateCompleted-0').type(date);
cy.get(".cds--date-picker-input__wrapper > #dateCompleted-0").type(date);
}

clickSubmitButton() {
cy.get(':nth-child(38) > .cds--btn').click();
cy.get(":nth-child(38) > .cds--btn").click();
}

getAndSaveNceNumber() {
Expand All @@ -141,7 +146,6 @@ class NonConform {
});
});
}

}

export default NonConform;
16 changes: 9 additions & 7 deletions frontend/src/components/addOrder/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,15 @@ const Index = () => {
crossSampleTypeMap = {};
crossSampleTypeOrderMap = {};

parseSampletypes(
newOrderFormValues,
order.sampleTypes instanceof Array
? order.sampleTypes
: [{ sampleType: order.sampleTypes.sampleType }],
SampleTypes,
);
if (order.sampleTypes != "") {
parseSampletypes(
newOrderFormValues,
order.sampleTypes instanceof Array
? order.sampleTypes
: [{ sampleType: order.sampleTypes.sampleType }],
SampleTypes,
);
}

const urlParams = new URLSearchParams(window.location.search);
const externalId = urlParams.get("ID");
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/addOrder/PatientInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ const PatientInfo = (props) => {
"guid=" +
orderFormValues.patientProperties.guid;
getFromOpenElisServer(searchEndPoint, (searchPatients) => {
if (searchPatients.length > 0) {
if (searchPatients.patientSearchResults.length > 0) {
const searchEndPoint =
"/rest/patient-details?patientID=" + searchPatients[0].patientID;
"/rest/patient-details?patientID=" +
searchPatients.patientSearchResults[0].patientID;
getFromOpenElisServer(searchEndPoint, (patientDetails) => {
getSelectedPatient(patientDetails);
handleNewPatientTab();
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/admin/reflexTests/ReflexStyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body {
margin-left: 0px;
overflow-y: auto;
padding-left: 0px;
width: 330px;
width: 30%;
z-index: 10;
position: absolute;
background-color: #ffffff;
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/eOrder/EOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ const EOrder = ({ eOrders, setEOrders, eOrderRef }) => {
}

function editOrder(externalOrderId, labNumber) {
window.open("AddOrder?ID=" + externalOrderId + "&labNumber=" + labNumber);
window.open(
"SamplePatientEntry?ID=" +
externalOrderId +
"&labNumber=" +
(labNumber || ""),
);
}

const handleLabNoGeneration = (e, index) => {
Expand Down
Loading

0 comments on commit 11008d1

Please sign in to comment.