From 4bba984d6851f6810d72963c97ee546606b4a7cd Mon Sep 17 00:00:00 2001 From: Chi Bong Ho Date: Thu, 9 Jan 2025 09:55:12 -0500 Subject: [PATCH] (fix) O3-3847 Ward app - hide close button for search patient warning notifications and wording change --- .../queue-table/default-queue-table.test.tsx | 22 +- .../admit-patient-button.component.tsx | 5 +- .../create-admission-encounter.workspace.tsx | 3 + yarn.lock | 216 +++++++++--------- 4 files changed, 122 insertions(+), 124 deletions(-) diff --git a/packages/esm-service-queues-app/src/queue-table/default-queue-table.test.tsx b/packages/esm-service-queues-app/src/queue-table/default-queue-table.test.tsx index 328105a8f..46d653865 100644 --- a/packages/esm-service-queues-app/src/queue-table/default-queue-table.test.tsx +++ b/packages/esm-service-queues-app/src/queue-table/default-queue-table.test.tsx @@ -1,20 +1,19 @@ -import React from 'react'; -import { of } from 'rxjs'; +import { getDefaultsFromConfigSchema, useConfig, useSession } from '@openmrs/esm-framework'; import { screen } from '@testing-library/react'; -import { useConfig, useSession, getDefaultsFromConfigSchema } from '@openmrs/esm-framework'; import { - mockServices, - mockSession, + mockLocationSurgery, + mockLocationTriage, mockQueueEntries, mockQueueRooms, - mockLocationTriage, - mockLocationSurgery, + mockServices, + mockSession, } from '__mocks__'; +import React from 'react'; import { renderWithSwr } from 'tools'; -import { useQueueEntries } from '../hooks/useQueueEntries'; import { useQueueRooms } from '../add-provider-queue-room/add-provider-queue-room.resource'; -import { useQueueLocations } from '../create-queue-entry/hooks/useQueueLocations'; import { type ConfigObject, configSchema } from '../config-schema'; +import { useQueueLocations } from '../create-queue-entry/hooks/useQueueLocations'; +import { useQueueEntries } from '../hooks/useQueueEntries'; import DefaultQueueTable from '../queue-table/default-queue-table.component'; const mockUseConfig = jest.mocked(useConfig); @@ -44,11 +43,6 @@ jest.mock('../hooks/useQueueEntries', () => ({ useQueueEntries: jest.fn(), })); -jest.mock('../helpers/helpers', () => ({ - ...jest.requireActual('../helpers/helpers'), - getSelectedServiceName: jest.fn().mockReturnValue(of({ serviceName: 'All' })), -})); - describe('DefaultQueueTable', () => { beforeEach(() => { mockUseConfig.mockReturnValue({ diff --git a/packages/esm-ward-app/src/ward-workspace/admit-patient-button.component.tsx b/packages/esm-ward-app/src/ward-workspace/admit-patient-button.component.tsx index 00c2cdd72..3f710900e 100644 --- a/packages/esm-ward-app/src/ward-workspace/admit-patient-button.component.tsx +++ b/packages/esm-ward-app/src/ward-workspace/admit-patient-button.component.tsx @@ -80,8 +80,9 @@ const AdmitPatientButton: React.FC = ({ const disabledButton = isLoadingEmrConfiguration || errorFetchingEmrConfiguration || disabled; return ( ); }; diff --git a/packages/esm-ward-app/src/ward-workspace/create-admission-encounter/create-admission-encounter.workspace.tsx b/packages/esm-ward-app/src/ward-workspace/create-admission-encounter/create-admission-encounter.workspace.tsx index d7e8fe1a7..0686fdd98 100644 --- a/packages/esm-ward-app/src/ward-workspace/create-admission-encounter/create-admission-encounter.workspace.tsx +++ b/packages/esm-ward-app/src/ward-workspace/create-admission-encounter/create-admission-encounter.workspace.tsx @@ -96,6 +96,7 @@ const CreateAdmissionEncounterWorkspace: React.FC )} @@ -103,6 +104,7 @@ const CreateAdmissionEncounterWorkspace: React.FC