cozy-harvest-lib 9.24.2 → 9.24.3
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.
- package/CHANGELOG.md +11 -0
- package/dist/components/KonnectorConfiguration/ConfigurationTab/BIContractActivationWindow.spec.js +4 -4
- package/dist/components/KonnectorConfiguration/ConfigurationTab/EditContract.js +0 -1
- package/dist/components/KonnectorModal.spec.js +2 -2
- package/dist/components/{KonnectorUpdateInfos.spec.js → infos/KonnectorUpdateInfos.spec.js} +15 -2
- package/package.json +8 -8
- package/src/components/KonnectorConfiguration/ConfigurationTab/BIContractActivationWindow.spec.jsx +4 -4
- package/src/components/KonnectorModal.spec.jsx +1 -1
- package/src/components/{KonnectorUpdateInfos.spec.jsx → infos/KonnectorUpdateInfos.spec.jsx} +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.24.3](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.24.2...cozy-harvest-lib@9.24.3) (2022-08-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **node:** Upgrade to Node 16 ([3a82521](https://github.com/cozy/cozy-libs/commit/3a825217b4a55d6434b20660d73df44ab17e7bd0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [9.24.2](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@9.24.1...cozy-harvest-lib@9.24.2) (2022-07-29)
|
|
7
18
|
|
|
8
19
|
|
package/dist/components/KonnectorConfiguration/ConfigurationTab/BIContractActivationWindow.spec.js
CHANGED
|
@@ -79,7 +79,7 @@ describe('BIContractActivationWindow', function () {
|
|
|
79
79
|
case 0:
|
|
80
80
|
_context.next = 2;
|
|
81
81
|
return waitFor(function () {
|
|
82
|
-
expect(getByRole('button').getAttribute('class')).not.toContain('Mui-disabled');
|
|
82
|
+
return expect(getByRole('button').getAttribute('class')).not.toContain('Mui-disabled');
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
case 2:
|
|
@@ -100,7 +100,7 @@ describe('BIContractActivationWindow', function () {
|
|
|
100
100
|
fireEvent.click(getByRole('button'));
|
|
101
101
|
_context2.next = 3;
|
|
102
102
|
return waitFor(function () {
|
|
103
|
-
expect(refreshContracts).toHaveBeenCalled();
|
|
103
|
+
return expect(refreshContracts).toHaveBeenCalled();
|
|
104
104
|
});
|
|
105
105
|
|
|
106
106
|
case 3:
|
|
@@ -145,7 +145,7 @@ describe('BIContractActivationWindow', function () {
|
|
|
145
145
|
case 0:
|
|
146
146
|
_context4.next = 2;
|
|
147
147
|
return waitFor(function () {
|
|
148
|
-
expect(getByRole('button').getAttribute('class')).not.toContain('Mui-disabled');
|
|
148
|
+
return expect(getByRole('button').getAttribute('class')).not.toContain('Mui-disabled');
|
|
149
149
|
});
|
|
150
150
|
|
|
151
151
|
case 2:
|
|
@@ -166,7 +166,7 @@ describe('BIContractActivationWindow', function () {
|
|
|
166
166
|
fireEvent.click(getByRole('button'));
|
|
167
167
|
_context5.next = 3;
|
|
168
168
|
return waitFor(function () {
|
|
169
|
-
expect(refreshContracts).toHaveBeenCalled();
|
|
169
|
+
return expect(refreshContracts).toHaveBeenCalled();
|
|
170
170
|
});
|
|
171
171
|
|
|
172
172
|
case 3:
|
|
@@ -86,9 +86,9 @@ describe('KonnectorModal', function () {
|
|
|
86
86
|
switch (_context.prev = _context.next) {
|
|
87
87
|
case 0:
|
|
88
88
|
_setup = setup(), root = _setup.root;
|
|
89
|
-
waitFor(function () {
|
|
89
|
+
return _context.abrupt("return", waitFor(function () {
|
|
90
90
|
return root.getByRole('progressbar');
|
|
91
|
-
});
|
|
91
|
+
}));
|
|
92
92
|
|
|
93
93
|
case 2:
|
|
94
94
|
case "end":
|
|
@@ -3,8 +3,21 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
/* eslint-env jest */
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { render } from '@testing-library/react';
|
|
6
|
-
import AppLike from '
|
|
7
|
-
import KonnectorUpdateInfos from 'components/infos/KonnectorUpdateInfos';
|
|
6
|
+
import AppLike from '../../../test/AppLike';
|
|
7
|
+
import KonnectorUpdateInfos from 'components/infos/KonnectorUpdateInfos';
|
|
8
|
+
jest.mock('../KonnectorUpdateLinker', function () {
|
|
9
|
+
return function (_ref) {
|
|
10
|
+
var konnector = _ref.konnector,
|
|
11
|
+
label = _ref.label,
|
|
12
|
+
isBlocking = _ref.isBlocking;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
"data-testtid": "KonnectorUpdateLinker",
|
|
15
|
+
"data-label": label,
|
|
16
|
+
"data-konnector": konnector,
|
|
17
|
+
"data-is-blocking": isBlocking
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
}); // Default props
|
|
8
21
|
|
|
9
22
|
var intents = {
|
|
10
23
|
redirect: jest.fn()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-harvest-lib",
|
|
3
|
-
"version": "9.24.
|
|
3
|
+
"version": "9.24.3",
|
|
4
4
|
"description": "Provides logic, modules and components for Cozy's harvest applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@cozy/minilog": "^1.0.0",
|
|
30
30
|
"@sentry/browser": "^6.0.1",
|
|
31
31
|
"cozy-bi-auth": "0.0.25",
|
|
32
|
-
"cozy-doctypes": "^1.85.
|
|
32
|
+
"cozy-doctypes": "^1.85.1",
|
|
33
33
|
"cozy-logger": "^1.9.0",
|
|
34
34
|
"date-fns": "^1.30.1",
|
|
35
35
|
"final-form": "^4.18.5",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"@testing-library/react": "10.4.9",
|
|
52
52
|
"babel-jest": "26.6.3",
|
|
53
53
|
"babel-plugin-inline-react-svg": "1.1.2",
|
|
54
|
-
"babel-preset-cozy-app": "^2.0.
|
|
54
|
+
"babel-preset-cozy-app": "^2.0.3",
|
|
55
55
|
"cozy-client": "27.17.0",
|
|
56
|
-
"cozy-device-helper": "^2.2.
|
|
57
|
-
"cozy-flags": "^2.10.
|
|
58
|
-
"cozy-intent": "^2.3.
|
|
56
|
+
"cozy-device-helper": "^2.2.2",
|
|
57
|
+
"cozy-flags": "^2.10.1",
|
|
58
|
+
"cozy-intent": "^2.3.1",
|
|
59
59
|
"cozy-keys-lib": "^4.1.9",
|
|
60
|
-
"cozy-realtime": "^4.2.
|
|
60
|
+
"cozy-realtime": "^4.2.3",
|
|
61
61
|
"cozy-ui": "60.6.0",
|
|
62
62
|
"enzyme": "3.11.0",
|
|
63
63
|
"enzyme-adapter-react-16": "1.15.6",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"react-router-dom": "^5.0.1"
|
|
91
91
|
},
|
|
92
92
|
"sideEffects": false,
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "2289f1b25b415030fcf9b9c23ebc7e170fe7ab5d"
|
|
94
94
|
}
|
package/src/components/KonnectorConfiguration/ConfigurationTab/BIContractActivationWindow.spec.jsx
CHANGED
|
@@ -63,7 +63,7 @@ describe('BIContractActivationWindow', () => {
|
|
|
63
63
|
const { getByRole } = setup()
|
|
64
64
|
await act(async () => {
|
|
65
65
|
await waitFor(() => {
|
|
66
|
-
expect(getByRole('button').getAttribute('class')).not.toContain(
|
|
66
|
+
return expect(getByRole('button').getAttribute('class')).not.toContain(
|
|
67
67
|
'Mui-disabled'
|
|
68
68
|
)
|
|
69
69
|
})
|
|
@@ -72,7 +72,7 @@ describe('BIContractActivationWindow', () => {
|
|
|
72
72
|
await act(async () => {
|
|
73
73
|
fireEvent.click(getByRole('button'))
|
|
74
74
|
await waitFor(() => {
|
|
75
|
-
expect(refreshContracts).toHaveBeenCalled()
|
|
75
|
+
return expect(refreshContracts).toHaveBeenCalled()
|
|
76
76
|
})
|
|
77
77
|
})
|
|
78
78
|
|
|
@@ -91,7 +91,7 @@ describe('BIContractActivationWindow', () => {
|
|
|
91
91
|
const { getByRole } = setup()
|
|
92
92
|
await act(async () => {
|
|
93
93
|
await waitFor(() => {
|
|
94
|
-
expect(getByRole('button').getAttribute('class')).not.toContain(
|
|
94
|
+
return expect(getByRole('button').getAttribute('class')).not.toContain(
|
|
95
95
|
'Mui-disabled'
|
|
96
96
|
)
|
|
97
97
|
})
|
|
@@ -100,7 +100,7 @@ describe('BIContractActivationWindow', () => {
|
|
|
100
100
|
await act(async () => {
|
|
101
101
|
fireEvent.click(getByRole('button'))
|
|
102
102
|
await waitFor(() => {
|
|
103
|
-
expect(refreshContracts).toHaveBeenCalled()
|
|
103
|
+
return expect(refreshContracts).toHaveBeenCalled()
|
|
104
104
|
})
|
|
105
105
|
})
|
|
106
106
|
|
|
@@ -73,7 +73,7 @@ describe('KonnectorModal', () => {
|
|
|
73
73
|
|
|
74
74
|
it('should show a spinner while loading', async () => {
|
|
75
75
|
const { root } = setup()
|
|
76
|
-
waitFor(() => root.getByRole('progressbar'))
|
|
76
|
+
return waitFor(() => root.getByRole('progressbar'))
|
|
77
77
|
})
|
|
78
78
|
|
|
79
79
|
it('should show an error view', async () => {
|
package/src/components/{KonnectorUpdateInfos.spec.jsx → infos/KonnectorUpdateInfos.spec.jsx}
RENAMED
|
@@ -2,9 +2,23 @@
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import { render } from '@testing-library/react'
|
|
4
4
|
|
|
5
|
-
import AppLike from '
|
|
5
|
+
import AppLike from '../../../test/AppLike'
|
|
6
6
|
import KonnectorUpdateInfos from 'components/infos/KonnectorUpdateInfos'
|
|
7
7
|
|
|
8
|
+
jest.mock(
|
|
9
|
+
'../KonnectorUpdateLinker',
|
|
10
|
+
() =>
|
|
11
|
+
({ konnector, label, isBlocking }) =>
|
|
12
|
+
(
|
|
13
|
+
<div
|
|
14
|
+
data-testtid="KonnectorUpdateLinker"
|
|
15
|
+
data-label={label}
|
|
16
|
+
data-konnector={konnector}
|
|
17
|
+
data-is-blocking={isBlocking}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
)
|
|
21
|
+
|
|
8
22
|
// Default props
|
|
9
23
|
const intents = {
|
|
10
24
|
redirect: jest.fn()
|