cozy-harvest-lib 29.1.1 → 29.1.2
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 +4 -0
- package/package.json +2 -2
- package/dist/components/cards/LaunchTriggerCard.spec.js +0 -80
- package/dist/components/cards/__snapshots__/LaunchTriggerCard.spec.jsx.snap +0 -5
- package/src/components/cards/LaunchTriggerCard.spec.jsx +0 -85
- package/src/components/cards/__snapshots__/LaunchTriggerCard.spec.jsx.snap +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
## [29.1.2](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@29.1.1...cozy-harvest-lib@29.1.2) (2024-09-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package cozy-harvest-lib
|
|
9
|
+
|
|
6
10
|
## [29.1.1](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@29.1.0...cozy-harvest-lib@29.1.1) (2024-09-04)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-harvest-lib",
|
|
3
|
-
"version": "29.1.
|
|
3
|
+
"version": "29.1.2",
|
|
4
4
|
"description": "Provides logic, modules and components for Cozy's harvest applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"react-router-dom": ">=4.3.1"
|
|
109
109
|
},
|
|
110
110
|
"sideEffects": false,
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "c7e6a2e886244c8ecf1cd794c423710fb5325091"
|
|
112
112
|
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import LaunchTriggerCard from 'components/cards/LaunchTriggerCard';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import CozyClient, { CozyProvider } from 'cozy-client';
|
|
5
|
-
import I18n from 'cozy-ui/transpiled/react/providers/I18n';
|
|
6
|
-
import enLocale from '../../locales/en.json';
|
|
7
|
-
import ConnectionFlow from '../../models/ConnectionFlow';
|
|
8
|
-
jest.mock('../../models/ConnectionFlow', function () {
|
|
9
|
-
// Require the original module to not be mocked...
|
|
10
|
-
var _jest$requireActual = jest.requireActual('../../models/ConnectionFlow'),
|
|
11
|
-
mockConnectionFlow = _jest$requireActual.default;
|
|
12
|
-
|
|
13
|
-
mockConnectionFlow.prototype.watchJob = jest.fn();
|
|
14
|
-
return mockConnectionFlow;
|
|
15
|
-
});
|
|
16
|
-
var triggerFixture = {
|
|
17
|
-
_id: 'd861818b62204988bf0bb78c182a9149',
|
|
18
|
-
arguments: '0 0 0 * * 0'
|
|
19
|
-
};
|
|
20
|
-
var konnectorFixture = {
|
|
21
|
-
slug: 'boursorama83',
|
|
22
|
-
parameters: {
|
|
23
|
-
bankId: '100000'
|
|
24
|
-
},
|
|
25
|
-
partnership: {
|
|
26
|
-
domain: 'https://budget-insight.com'
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
describe('LaunchTriggerCard', function () {
|
|
30
|
-
var client = new CozyClient({});
|
|
31
|
-
client.plugins = {
|
|
32
|
-
realtime: {
|
|
33
|
-
sendNotification: jest.fn(),
|
|
34
|
-
subscribe: jest.fn()
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
var setup = function setup(_ref) {
|
|
39
|
-
var props = _ref.props;
|
|
40
|
-
var root = mount( /*#__PURE__*/React.createElement(CozyProvider, {
|
|
41
|
-
client: client
|
|
42
|
-
}, /*#__PURE__*/React.createElement(I18n, {
|
|
43
|
-
dictRequire: function dictRequire() {
|
|
44
|
-
return enLocale;
|
|
45
|
-
},
|
|
46
|
-
lang: "en"
|
|
47
|
-
}, /*#__PURE__*/React.createElement(LaunchTriggerCard, props))));
|
|
48
|
-
return {
|
|
49
|
-
root: root
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
it('should render impossible to run message when konnector is clientSide without an accessible launcher', function () {
|
|
54
|
-
var _setup = setup({
|
|
55
|
-
props: {
|
|
56
|
-
flow: new ConnectionFlow(client, triggerFixture, {
|
|
57
|
-
slug: 'test',
|
|
58
|
-
name: 'testname',
|
|
59
|
-
clientSide: true
|
|
60
|
-
}, konnectorFixture)
|
|
61
|
-
}
|
|
62
|
-
}),
|
|
63
|
-
root = _setup.root;
|
|
64
|
-
|
|
65
|
-
expect(root.html()).toMatchSnapshot();
|
|
66
|
-
});
|
|
67
|
-
it('should render normally when konnector is not clientSide', function () {
|
|
68
|
-
var _setup2 = setup({
|
|
69
|
-
props: {
|
|
70
|
-
flow: new ConnectionFlow(client, triggerFixture, {
|
|
71
|
-
slug: 'test',
|
|
72
|
-
name: 'testname'
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
}),
|
|
76
|
-
root = _setup2.root;
|
|
77
|
-
|
|
78
|
-
expect(root.html()).toMatchSnapshot();
|
|
79
|
-
});
|
|
80
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`LaunchTriggerCard should render impossible to run message when konnector is clientSide without an accessible launcher 1`] = `""`;
|
|
4
|
-
|
|
5
|
-
exports[`LaunchTriggerCard should render normally when konnector is not clientSide 1`] = `""`;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import LaunchTriggerCard from 'components/cards/LaunchTriggerCard'
|
|
2
|
-
import { mount } from 'enzyme'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
import CozyClient, { CozyProvider } from 'cozy-client'
|
|
6
|
-
import I18n from 'cozy-ui/transpiled/react/providers/I18n'
|
|
7
|
-
|
|
8
|
-
import enLocale from '../../locales/en.json'
|
|
9
|
-
import ConnectionFlow from '../../models/ConnectionFlow'
|
|
10
|
-
|
|
11
|
-
jest.mock('../../models/ConnectionFlow', () => {
|
|
12
|
-
// Require the original module to not be mocked...
|
|
13
|
-
const { default: mockConnectionFlow } = jest.requireActual(
|
|
14
|
-
'../../models/ConnectionFlow'
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
mockConnectionFlow.prototype.watchJob = jest.fn()
|
|
18
|
-
|
|
19
|
-
return mockConnectionFlow
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const triggerFixture = {
|
|
23
|
-
_id: 'd861818b62204988bf0bb78c182a9149',
|
|
24
|
-
arguments: '0 0 0 * * 0'
|
|
25
|
-
}
|
|
26
|
-
const konnectorFixture = {
|
|
27
|
-
slug: 'boursorama83',
|
|
28
|
-
parameters: {
|
|
29
|
-
bankId: '100000'
|
|
30
|
-
},
|
|
31
|
-
partnership: {
|
|
32
|
-
domain: 'https://budget-insight.com'
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
describe('LaunchTriggerCard', () => {
|
|
37
|
-
const client = new CozyClient({})
|
|
38
|
-
client.plugins = {
|
|
39
|
-
realtime: {
|
|
40
|
-
sendNotification: jest.fn(),
|
|
41
|
-
subscribe: jest.fn()
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const setup = ({ props }) => {
|
|
46
|
-
const root = mount(
|
|
47
|
-
<CozyProvider client={client}>
|
|
48
|
-
<I18n dictRequire={() => enLocale} lang="en">
|
|
49
|
-
<LaunchTriggerCard {...props} />
|
|
50
|
-
</I18n>
|
|
51
|
-
</CozyProvider>
|
|
52
|
-
)
|
|
53
|
-
return { root }
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
it('should render impossible to run message when konnector is clientSide without an accessible launcher', () => {
|
|
57
|
-
const { root } = setup({
|
|
58
|
-
props: {
|
|
59
|
-
flow: new ConnectionFlow(
|
|
60
|
-
client,
|
|
61
|
-
triggerFixture,
|
|
62
|
-
{
|
|
63
|
-
slug: 'test',
|
|
64
|
-
name: 'testname',
|
|
65
|
-
clientSide: true
|
|
66
|
-
},
|
|
67
|
-
konnectorFixture
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
expect(root.html()).toMatchSnapshot()
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
it('should render normally when konnector is not clientSide', () => {
|
|
75
|
-
const { root } = setup({
|
|
76
|
-
props: {
|
|
77
|
-
flow: new ConnectionFlow(client, triggerFixture, {
|
|
78
|
-
slug: 'test',
|
|
79
|
-
name: 'testname'
|
|
80
|
-
})
|
|
81
|
-
}
|
|
82
|
-
})
|
|
83
|
-
expect(root.html()).toMatchSnapshot()
|
|
84
|
-
})
|
|
85
|
-
})
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`LaunchTriggerCard should render impossible to run message when konnector is clientSide without an accessible launcher 1`] = `""`;
|
|
4
|
-
|
|
5
|
-
exports[`LaunchTriggerCard should render normally when konnector is not clientSide 1`] = `""`;
|