Skip to content

Commit

Permalink
Update typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
mutuajames committed Jun 20, 2023
1 parent 7c95959 commit 3a9e943
Show file tree
Hide file tree
Showing 9 changed files with 799 additions and 829 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"eslint"
]
},

"devDependencies": {
"@babel/cli": "^7.16.8",
"@babel/eslint-parser": "^7.17.0",
Expand Down Expand Up @@ -73,6 +72,7 @@
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
"antd": "^5.5.2",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"copyfiles": "^2.4.1",
"coveralls": "^3.1.1",
Expand All @@ -92,7 +92,7 @@
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-sonarjs": "^0.12.0",
"flush-promises": "^1.0.2",
"glob": "^8.0.1",
"glob": "^8.0.1",
"husky": "^8.0.0",
"i18next-parser": "^5.4.0",
"jest": "27.5.1",
Expand All @@ -107,7 +107,6 @@
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.5.1",
"antd": "^5.5.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
Expand All @@ -120,7 +119,7 @@
"redux-testkit": "^1.0.6",
"redux-thunk": "^2.4.1",
"tsd": "^0.19.1",
"typescript": "~4.5.4",
"typescript": "~5.1.3",
"vinyl": "^2.2.1",
"vinyl-fs": "^3.0.3",
"yargs": "^17.4.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/fhir-care-team/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"@opensrp/reducer-factory": "^0.0.13",
"@opensrp/server-service": "^0.0.17",
"@smile-cdr/fhirts": "^1.2.5",
"antd": "^5.5.2",
"fhirclient": "^2.4.0",
"lodash": "^4.17.21",
"uuid": "^8.3.1"
Expand All @@ -50,6 +49,7 @@
},
"peerDependencies": {
"@opensrp/i18n": "^0.0.1",
"antd": "^5.5.2",
"@opensrp/store": "^0.0.10",
"react": "^16.13.1",
"react-query": "^3.15.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import { authenticateUser } from '@onaio/session-reducer';
import { QueryClient, QueryClientProvider } from 'react-query';
import nock from 'nock';
import { waitForElementToBeRemoved } from '@testing-library/dom';
import { cleanup, fireEvent, prettyDOM, render, screen } from '@testing-library/react';
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
import {
healthCareServicePage1,
healthCareServicePage2,
healthCareServiceSearch,
} from './fixtures';
import userEvents from '@testing-library/user-event';
import { healthCareServiceResourceType, LIST_HEALTHCARE_URL } from '../../../constants';
import userEvent from '@testing-library/user-event';

jest.mock('fhirclient', () => {
return jest.requireActual('fhirclient/lib/entry/browser');
Expand Down Expand Up @@ -132,7 +131,7 @@ test('renders correctly when listing resources', async () => {
</Router>
);

// await waitForElementToBeRemoved(document.querySelector('.ant-spin'));
await waitForElementToBeRemoved(document.querySelector('.ant-spin'));

expect(document.querySelector('.ant-page-header-heading-title')).toMatchSnapshot('Header title');

Expand All @@ -142,11 +141,10 @@ test('renders correctly when listing resources', async () => {
});
});

userEvent.click(screen.getByTitle('2'));
fireEvent.click(screen.getByTitle('2'));

expect(history.location.search).toEqual('?pageSize=20&page=2');

console.log(prettyDOM(document))
await waitForElementToBeRemoved(document.querySelector('.ant-spin'));
document.querySelectorAll('tr').forEach((tr, idx) => {
tr.querySelectorAll('td').forEach((td) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/fhir-location-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@opensrp/react-utils": "^0.0.12",
"@opensrp/reducer-factory": "^0.0.13",
"@opensrp/server-service": "^0.0.16",
"antd": "^5.6.1",
"antd": "^5.5.1",
"cycle": "^1.0.3",
"fhirclient": "^2.4.0",
"tree-model": "^1.0.7",
Expand Down
1 change: 0 additions & 1 deletion packages/keycloak-user-management/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@opensrp/react-utils": "^0.0.12",
"@opensrp/server-service": "^0.0.17",
"@opensrp/team-management": "^0.0.9",
"antd": "^5.5.1",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"bootstrap": "^4.5.2",
"connected-react-router": "^6.8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ Array [
],
"warnings": Array [],
},
Object {
"errors": Array [
"'date' is required",
],
"name": Array [
"date",
],
"warnings": Array [],
},
Object {
"errors": Array [
"'description' is required",
Expand All @@ -43,11 +34,7 @@ Array [

exports[`containers/forms/PlanForm Form validation works: Initial Errors, no errors shown initially 1`] = `Array []`;

exports[`containers/forms/PlanForm Form validation works: date error 1`] = `
Array [
"'date' is required",
]
`;
exports[`containers/forms/PlanForm Form validation works: date error 1`] = `Array []`;

exports[`containers/forms/PlanForm Form validation works: dateRange required error 1`] = `Array []`;

Expand Down Expand Up @@ -90,15 +77,6 @@ Array [
],
"warnings": Array [],
},
Object {
"errors": Array [
"'date' is required",
],
"name": Array [
"date",
],
"warnings": Array [],
},
Object {
"errors": Array [
"'description' is required",
Expand Down Expand Up @@ -149,15 +127,6 @@ Array [
],
"warnings": Array [],
},
Object {
"errors": Array [
"'date' is required",
],
"name": Array [
"date",
],
"warnings": Array [],
},
Object {
"errors": Array [
"'description' is required",
Expand Down Expand Up @@ -219,8 +188,8 @@ exports[`containers/forms/PlanForm renders correctly: date field 1`] = `
placeholder="Select date"
readOnly={true}
size={12}
title=""
value=""
title="2017-07-13"
value="2017-07-13"
/>
`;

Expand Down
Loading

0 comments on commit 3a9e943

Please sign in to comment.