From 5877d9b32c8f6e0d6c65d453e7d60ea8a8b3bba5 Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:22:19 +0530 Subject: [PATCH 1/4] Reduce the cypress GitHub runner utilization to 4 (#8987) --- .github/workflows/cypress.yaml | 6 ++---- cypress/pageobject/Users/UserSearch.ts | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cypress.yaml b/.github/workflows/cypress.yaml index 0f588568bbc..1104d7f480d 100644 --- a/.github/workflows/cypress.yaml +++ b/.github/workflows/cypress.yaml @@ -1,8 +1,6 @@ name: Cypress Tests on: - schedule: - - cron: "30 22 * * *" pull_request: branches: - develop @@ -17,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - containers: [1, 2, 3, 4, 5, 6, 7, 8] + containers: [1, 2, 3, 4] env: REACT_CARE_API_URL: http://localhost:9000 steps: @@ -136,4 +134,4 @@ jobs: if: steps.pr_origin.outputs.is_forked == 'true' with: name: cypress-videos - path: cypress/videos + path: cypress/videos \ No newline at end of file diff --git a/cypress/pageobject/Users/UserSearch.ts b/cypress/pageobject/Users/UserSearch.ts index d72c00c0de7..1292395fce3 100644 --- a/cypress/pageobject/Users/UserSearch.ts +++ b/cypress/pageobject/Users/UserSearch.ts @@ -23,7 +23,7 @@ export class UserPage { } checkUsernameText(username: string) { - cy.get(this.usernameText).should("have.text", username); + cy.get(this.usernameText).should("contain.text", username); } checkUsernameBadgeVisibility(shouldBeVisible: boolean) { From 1e00ba91aea81a2d2f629178a06ba429a9627f0a Mon Sep 17 00:00:00 2001 From: Mohamed amaan <121436543+modamaan@users.noreply.github.com> Date: Tue, 5 Nov 2024 06:13:26 +0530 Subject: [PATCH 2/4] fixed: sample details page button position (#8970) --- src/components/Patient/PatientHome.tsx | 2 +- src/components/Patient/SampleDetails.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Patient/PatientHome.tsx b/src/components/Patient/PatientHome.tsx index d95c6d1df21..fe91bc4e17d 100644 --- a/src/components/Patient/PatientHome.tsx +++ b/src/components/Patient/PatientHome.tsx @@ -591,7 +591,7 @@ export const PatientHome = (props: any) => {

)} -
+
diff --git a/src/components/Patient/SampleDetails.tsx b/src/components/Patient/SampleDetails.tsx index aaf524ef0ae..d74b83dff67 100644 --- a/src/components/Patient/SampleDetails.tsx +++ b/src/components/Patient/SampleDetails.tsx @@ -273,7 +273,7 @@ export const SampleDetails = ({ id }: DetailRoute) => { backUrl="/sample" options={ sampleDetails?.patient && ( -
+
From a65d7ec98f9560682571e3b740dc95cc076de793 Mon Sep 17 00:00:00 2001 From: Kamishetty Rishith <119791436+Rishith25@users.noreply.github.com> Date: Tue, 5 Nov 2024 06:14:35 +0530 Subject: [PATCH 3/4] Adding of clear and cancel button in create preset form (#8921) --- src/components/CameraFeed/ConfigureCamera.tsx | 10 +++- .../Form/FormFields/TextFormField.tsx | 47 ++++++++++++------- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/components/CameraFeed/ConfigureCamera.tsx b/src/components/CameraFeed/ConfigureCamera.tsx index 03b627d48ce..c0cb19e6a23 100644 --- a/src/components/CameraFeed/ConfigureCamera.tsx +++ b/src/components/CameraFeed/ConfigureCamera.tsx @@ -391,14 +391,22 @@ export default function ConfigureCamera(props: Props) { > setPresetName(value)} errorClassName="hidden" placeholder={t("preset_name_placeholder")} suggestions={presetNameSuggestions} + clearable={true} /> +
+ { + setCreatePreset(undefined); + setPresetName(""); + }} + /> { const { res } = await request(FeedRoutes.createPreset, { diff --git a/src/components/Form/FormFields/TextFormField.tsx b/src/components/Form/FormFields/TextFormField.tsx index a3663358a56..81e1edea9d0 100644 --- a/src/components/Form/FormFields/TextFormField.tsx +++ b/src/components/Form/FormFields/TextFormField.tsx @@ -24,6 +24,7 @@ export type TextFormFieldProps = FormFieldBaseProps & trailingPadding?: string | undefined; leadingPadding?: string | undefined; suggestions?: string[]; + clearable?: boolean | undefined; }; const TextFormField = forwardRef((props: TextFormFieldProps, ref) => { @@ -41,24 +42,36 @@ const TextFormField = forwardRef((props: TextFormFieldProps, ref) => { }; let child = ( - } - id={field.id} - className={classNames( - "cui-input-base peer", - hasLeading && (props.leadingPadding || "pl-10"), - hasTrailing && (props.trailingPadding || "pr-10"), - field.error && "border-danger-500", - props.inputClassName, +
+ } + id={field.id} + className={classNames( + "cui-input-base peer", + hasLeading && (props.leadingPadding || "pl-10"), + hasTrailing && (props.trailingPadding || "pr-10"), + field.error && "border-danger-500", + props.inputClassName, + )} + disabled={field.disabled} + type={props.type === "password" ? getPasswordFieldType() : props.type} + name={field.name} + value={field.value} + required={field.required} + onChange={(e) => field.handleChange(e.target.value)} + /> + {props.clearable && field.value && ( + )} - disabled={field.disabled} - type={props.type === "password" ? getPasswordFieldType() : props.type} - name={field.name} - value={field.value} - required={field.required} - onChange={(e) => field.handleChange(e.target.value)} - /> +
); if (props.type === "password") { From 6b57124a9713aa30007cd1dc4753b614e25bb9a8 Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:19:00 +0530 Subject: [PATCH 4/4] Fixed delete button size in asset details & consent record pages (#8996) --- src/components/Assets/AssetManage.tsx | 9 ++++----- src/components/Patient/PatientConsentRecords.tsx | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Assets/AssetManage.tsx b/src/components/Assets/AssetManage.tsx index 05eab3a4dec..0ee4f107d40 100644 --- a/src/components/Assets/AssetManage.tsx +++ b/src/components/Assets/AssetManage.tsx @@ -432,7 +432,7 @@ const AssetManage = (props: AssetManageProps) => { data-testid="asset-update-button" authorizeFor={NonReadOnlyUsers} > - + {t("update")} {asset?.asset_class && @@ -449,7 +449,7 @@ const AssetManage = (props: AssetManageProps) => { id="configure-asset" data-testid="asset-configure-button" > - + {t("configure")} )} @@ -459,10 +459,9 @@ const AssetManage = (props: AssetManageProps) => { onClick={() => setShowDeleteDialog(true)} variant="danger" data-testid="asset-delete-button" - className="inline-flex" > - - {t("delete")} + + {t("delete")} )}
diff --git a/src/components/Patient/PatientConsentRecords.tsx b/src/components/Patient/PatientConsentRecords.tsx index 9850cfe0b2c..aa6f45b761c 100644 --- a/src/components/Patient/PatientConsentRecords.tsx +++ b/src/components/Patient/PatientConsentRecords.tsx @@ -219,7 +219,8 @@ export default function PatientConsentRecords(props: { onClick={fileUpload.clearFiles} disabled={fileUpload.uploading} > - + + {t("delete")}
) : (