@openmrs/esm-active-visits-app 5.2.2-pre.2409 → 5.2.2-pre.2415

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,4 +37,4 @@ Entrypoints:
37
37
  main.js
38
38
  
39
39
 
40
- webpack 5.86.0 compiled with 2 warnings in 76293 ms
40
+ webpack 5.86.0 compiled with 2 warnings in 76297 ms
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"active-visits-widget","slot":"homepage-widgets-slot","component":"activeVisits","order":0},{"name":"visit-summary-widget","slot":"visit-summary-slot","component":"visitDetail"}],"pages":[],"version":"5.2.2-pre.2409"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"webservices.rest":"^2.2.0"},"extensions":[{"name":"active-visits-widget","slot":"homepage-widgets-slot","component":"activeVisits","order":0},{"name":"visit-summary-widget","slot":"visit-summary-slot","component":"visitDetail"}],"pages":[],"version":"5.2.2-pre.2415"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-active-visits-app",
3
- "version": "5.2.2-pre.2409",
3
+ "version": "5.2.2-pre.2415",
4
4
  "description": "Active visits widget microfrontend for the OpenMRS SPA",
5
5
  "browser": "dist/openmrs-esm-active-visits-app.js",
6
6
  "main": "src/index.ts",
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { fireEvent, render, screen, waitFor } from '@testing-library/react';
3
- import ActiveVisitsTable from './active-visits.component';
4
- import { useConfig, usePagination } from '@openmrs/esm-framework';
2
+ import userEvent from '@testing-library/user-event';
3
+ import { render, screen } from '@testing-library/react';
4
+ import { usePagination } from '@openmrs/esm-framework';
5
5
  import { useActiveVisits } from './active-visits.resource';
6
+ import ActiveVisitsTable from './active-visits.component';
6
7
 
7
8
  const mockedUsePagination = usePagination as jest.Mock;
8
9
  const mockActiveVisits = useActiveVisits as jest.Mock;
@@ -52,7 +53,9 @@ describe('ActiveVisitsTable', () => {
52
53
  expect(patientNameLink.tagName).toBe('A');
53
54
  });
54
55
 
55
- it.skip('filters active visits based on search input', () => {
56
+ it('filters active visits based on search input', async () => {
57
+ const user = userEvent.setup();
58
+
56
59
  mockActiveVisits.mockImplementationOnce(() => ({
57
60
  activeVisits: [
58
61
  { id: '1', name: 'John Doe', visitType: 'Checkup', patientUuid: 'uuid1' },
@@ -62,10 +65,11 @@ describe('ActiveVisitsTable', () => {
62
65
  isValidating: false,
63
66
  error: null,
64
67
  }));
68
+
65
69
  render(<ActiveVisitsTable />);
66
70
 
67
71
  const searchInput = screen.getByPlaceholderText('Filter table');
68
- fireEvent.change(searchInput, { target: { value: 'John' } });
72
+ await user.type(searchInput, 'John');
69
73
 
70
74
  expect(screen.getByText('John Doe')).toBeInTheDocument();
71
75
  expect(screen.queryByText('Some One')).toBeNull();