Skip to content

Commit

Permalink
Merge branch 'develop' into issue/8006/TypeError_in_NotificationsList…
Browse files Browse the repository at this point in the history
…_Component
  • Loading branch information
AdityaJ2305 authored Nov 6, 2024
2 parents 8a48d66 + 6b57124 commit a603b20
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 31 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Cypress Tests

on:
schedule:
- cron: "30 22 * * *"
pull_request:
branches:
- develop
Expand All @@ -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:
Expand Down Expand Up @@ -136,4 +134,4 @@ jobs:
if: steps.pr_origin.outputs.is_forked == 'true'
with:
name: cypress-videos
path: cypress/videos
path: cypress/videos
2 changes: 1 addition & 1 deletion cypress/pageobject/Users/UserSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
9 changes: 4 additions & 5 deletions src/components/Assets/AssetManage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ const AssetManage = (props: AssetManageProps) => {
data-testid="asset-update-button"
authorizeFor={NonReadOnlyUsers}
>
<CareIcon icon="l-pen" className="mr-1 h-4" />
<CareIcon icon="l-pen" className="text-lg" />
{t("update")}
</ButtonV2>
{asset?.asset_class &&
Expand All @@ -449,7 +449,7 @@ const AssetManage = (props: AssetManageProps) => {
id="configure-asset"
data-testid="asset-configure-button"
>
<CareIcon icon="l-setting" className="h-4" />
<CareIcon icon="l-setting" className="text-lg" />
{t("configure")}
</ButtonV2>
)}
Expand All @@ -459,10 +459,9 @@ const AssetManage = (props: AssetManageProps) => {
onClick={() => setShowDeleteDialog(true)}
variant="danger"
data-testid="asset-delete-button"
className="inline-flex"
>
<CareIcon icon="l-trash" className="h-4" />
<span className="md:hidden">{t("delete")}</span>
<CareIcon icon="l-trash" className="text-lg" />
<span>{t("delete")}</span>
</ButtonV2>
)}
</div>
Expand Down
10 changes: 9 additions & 1 deletion src/components/CameraFeed/ConfigureCamera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,22 @@ export default function ConfigureCamera(props: Props) {
>
<TextFormField
name="preset-name"
className="py-4"
className="w-full py-4"
value={presetName}
onChange={({ value }) => setPresetName(value)}
errorClassName="hidden"
placeholder={t("preset_name_placeholder")}
suggestions={presetNameSuggestions}
clearable={true}
/>

<div className="cui-form-button-group">
<Cancel
onClick={() => {
setCreatePreset(undefined);
setPresetName("");
}}
/>
<Submit
onClick={async () => {
const { res } = await request(FeedRoutes.createPreset, {
Expand Down
47 changes: 30 additions & 17 deletions src/components/Form/FormFields/TextFormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export type TextFormFieldProps = FormFieldBaseProps<string> &
trailingPadding?: string | undefined;
leadingPadding?: string | undefined;
suggestions?: string[];
clearable?: boolean | undefined;
};

const TextFormField = forwardRef((props: TextFormFieldProps, ref) => {
Expand All @@ -41,24 +42,36 @@ const TextFormField = forwardRef((props: TextFormFieldProps, ref) => {
};

let child = (
<input
{...props}
ref={ref as React.Ref<HTMLInputElement>}
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,
<div className="relative">
<input
{...props}
ref={ref as React.Ref<HTMLInputElement>}
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 && (
<button
type="button"
className="absolute right-2 top-1/2 -translate-y-1/2 transform text-gray-500"
onClick={() => field.handleChange("")}
aria-label="Clear input"
>
<CareIcon icon="l-times-circle" className="text-lg" />
</button>
)}
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)}
/>
</div>
);

if (props.type === "password") {
Expand Down
3 changes: 2 additions & 1 deletion src/components/Patient/PatientConsentRecords.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ export default function PatientConsentRecords(props: {
onClick={fileUpload.clearFiles}
disabled={fileUpload.uploading}
>
<CareIcon icon="l-trash-alt" className="" />
<CareIcon icon="l-trash" className="text-lg" />
<span>{t("delete")}</span>
</ButtonV2>
</>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ export const PatientHome = (props: any) => {
</p>
</div>
)}
<div className="mb-6 rounded-sm bg-white p-2 text-center shadow">
<div className="my-3 rounded-sm bg-white p-2 text-center shadow md:my-0 md:mb-6">
<div className="flex justify-between">
<div className="w-1/2 border-r-2">
<div className="text-sm font-normal leading-5 text-secondary-500">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Patient/SampleDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
backUrl="/sample"
options={
sampleDetails?.patient && (
<div className="flex justify-end">
<div className="my-2 flex justify-center md:justify-end">
<ButtonV2
href={`/patient/${sampleDetails.patient}/test_sample/${id}/icmr_sample`}
>
Expand Down

0 comments on commit a603b20

Please sign in to comment.