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

Enhance the multi-select component to immediately open onFocus #8598

Merged
merged 18 commits into from
Sep 24, 2024
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
21 changes: 8 additions & 13 deletions cypress/e2e/facility_spec/FacilityHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ describe("Facility Homepage Function", () => {
const userPage = new UserPage();
const assetPagination = new AssetPagination();
const facilitiesAlias = "downloadFacilitiesCSV";
const capacitiesAlias = "downloadCapacitiesCSV";
const doctorsAlias = "downloadDoctorsCSV";
const triagesAlias = "downloadTriagesCSV";
const facilityName = "Dummy Facility 40";
Expand Down Expand Up @@ -91,30 +90,26 @@ describe("Facility Homepage Function", () => {
});

it("Verify Facility Export Functionality", () => {
// Download the Facilities CSV
// Verify Facility Export
facilityHome.csvDownloadIntercept(facilitiesAlias, "");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Facilities");
facilityHome.verifyDownload(facilitiesAlias);
facilityHome.clickSearchButton(); // to avoid flaky test, as sometimes, the test is unable to focus on the object
// Download the Capacities CSV
facilityHome.csvDownloadIntercept(capacitiesAlias, "&capacity");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Capacities");
facilityHome.verifyDownload(capacitiesAlias);
facilityHome.clickSearchButton();
// Download the Doctors CSV
// Verify Doctor Export
facilityHome.csvDownloadIntercept(doctorsAlias, "&doctors");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Doctors");
facilityHome.verifyDownload(doctorsAlias);
facilityHome.clickSearchButton();
// Download the Triages CSV
// Verify Triage Export
facilityHome.csvDownloadIntercept(triagesAlias, "&triage");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Triages");
facilityHome.verifyDownload(triagesAlias);
facilityHome.clickSearchButton();
});

it("Verify Capacity Export Functionality", () => {
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Capacities");
});

it("Verify Facility Detail page redirection to CNS and Live Minitoring ", () => {
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
const additionalSymptoms = "Fever";
const physicalExamination = "physical examination details";
const otherExamination = "Other";
const patientSystolic = "119";
const patientDiastolic = "150";
const patientModifiedSystolic = "120";
const patientModifiedDiastolic = "145";
const patientSystolic = "149";
const patientDiastolic = "119";
const patientModifiedSystolic = "145";
const patientModifiedDiastolic = "120";
const patientPulse = "152";
const patientTemperature = "96.6";
const patientRespiratory = "140";
Expand Down
5 changes: 4 additions & 1 deletion cypress/pageobject/Facility/FacilityHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class FacilityHome {

// Operations
clickExportButton() {
cy.get(this.exportButton).scrollIntoView();
cy.get(this.exportButton).click();
}

Expand Down Expand Up @@ -89,7 +90,9 @@ class FacilityHome {
}

verifyDownload(alias: string) {
cy.wait(`@${alias}`).its("response.statusCode").should("eq", 200);
cy.wait(`@${alias}`, { timeout: 60000 })
.its("response.statusCode")
.should("eq", 200);
}

getURL() {
Expand Down
1 change: 1 addition & 0 deletions src/Components/Form/AutoCompleteAsync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const AutoCompleteAsync = (props: Props) => {
onChange={onChange}
by={compareBy}
multiple={multiple as any}
immediate
>
<div className="relative mt-1">
<div className="flex">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export const AutocompleteMutliSelect = <T, V>(
return (
<div className={props.className} id={props.id}>
<Combobox
immediate
disabled={props.disabled}
value={value}
multiple
Expand Down
Loading