@times-components/ts-components 1.41.0 → 1.41.1
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/recommended-articles/__tests__/RecommendedFetch.test.js +8 -2
- package/package.json +3 -3
- package/src/components/recommended-articles/__tests__/RecommendedFetch.test.tsx +11 -1
- package/src/components/recommended-articles/__tests__/__snapshots__/RecommendedFetch.test.tsx.snap +3 -0
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
|
+
## [1.41.1](https://github.com/newsuk/times-components/compare/@times-components/ts-components@1.41.0...@times-components/ts-components@1.41.1) (2022-06-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **TDP-1942:** Recommended article - feature flag ([#2984](https://github.com/newsuk/times-components/issues/2984)) ([e04ca2b](https://github.com/newsuk/times-components/commit/e04ca2be43000afa13152064618e39255808a0e0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [1.41.0](https://github.com/newsuk/times-components/compare/@times-components/ts-components@1.40.0...@times-components/ts-components@1.41.0) (2022-06-08)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
import { RecommendedFetch } from '../RecommendedFetch';
|
|
4
|
+
jest.mock('../RecommendedArticles', () => ({
|
|
5
|
+
RecommendedArticles: () => React.createElement("div", null, "RecommendedArticles")
|
|
6
|
+
}));
|
|
4
7
|
jest.mock('../../../helpers/fetch/FetchProvider', () => ({
|
|
5
|
-
FetchProvider: () => React.createElement("div", null,
|
|
8
|
+
FetchProvider: (props) => (React.createElement("div", null,
|
|
9
|
+
"FetchProvider",
|
|
10
|
+
props.children))
|
|
6
11
|
}));
|
|
7
12
|
describe('<RecommendedFetch>', () => {
|
|
8
13
|
it('should render correctly', () => {
|
|
9
14
|
const { asFragment, getByText } = render(React.createElement(RecommendedFetch, { articleId: "1234", section: "News", analyticsStream: () => ({}) }));
|
|
10
15
|
expect(getByText('FetchProvider'));
|
|
16
|
+
expect(getByText('RecommendedArticles'));
|
|
11
17
|
expect(asFragment()).toMatchSnapshot();
|
|
12
18
|
});
|
|
13
19
|
});
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb21tZW5kZWRGZXRjaC50ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvcmVjb21tZW5kZWQtYXJ0aWNsZXMvX190ZXN0c19fL1JlY29tbWVuZGVkRmV0Y2gudGVzdC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFDO0FBQzFCLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUVoRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUV2RCxJQUFJLENBQUMsSUFBSSxDQUFDLHdCQUF3QixFQUFFLEdBQUcsRUFBRSxDQUFDLENBQUM7SUFDekMsbUJBQW1CLEVBQUUsR0FBRyxFQUFFLENBQUMsdURBQThCO0NBQzFELENBQUMsQ0FBQyxDQUFDO0FBRUosSUFBSSxDQUFDLElBQUksQ0FBQyxzQ0FBc0MsRUFBRSxHQUFHLEVBQUUsQ0FBQyxDQUFDO0lBQ3ZELGFBQWEsRUFBRSxDQUFDLEtBQVUsRUFBRSxFQUFFLENBQUMsQ0FDN0I7O1FBRUcsS0FBSyxDQUFDLFFBQVEsQ0FDWCxDQUNQO0NBQ0YsQ0FBQyxDQUFDLENBQUM7QUFFSixRQUFRLENBQUMsb0JBQW9CLEVBQUUsR0FBRyxFQUFFO0lBQ2xDLEVBQUUsQ0FBQyx5QkFBeUIsRUFBRSxHQUFHLEVBQUU7UUFDakMsTUFBTSxFQUFFLFVBQVUsRUFBRSxTQUFTLEVBQUUsR0FBRyxNQUFNLENBQ3RDLG9CQUFDLGdCQUFnQixJQUNmLFNBQVMsRUFBQyxNQUFNLEVBQ2hCLE9BQU8sRUFBQyxNQUFNLEVBQ2QsZUFBZSxFQUFFLEdBQUcsRUFBRSxDQUFDLENBQUMsRUFBRSxDQUFDLEdBQzNCLENBQ0gsQ0FBQztRQUVGLE1BQU0sQ0FBQyxTQUFTLENBQUMsZUFBZSxDQUFDLENBQUMsQ0FBQztRQUNuQyxNQUFNLENBQUMsU0FBUyxDQUFDLHFCQUFxQixDQUFDLENBQUMsQ0FBQztRQUN6QyxNQUFNLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQyxlQUFlLEVBQUUsQ0FBQztJQUN6QyxDQUFDLENBQUMsQ0FBQztBQUNMLENBQUMsQ0FBQyxDQUFDIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@times-components/ts-components",
|
|
3
|
-
"version": "1.41.
|
|
3
|
+
"version": "1.41.1",
|
|
4
4
|
"description": "Reuseable Typescript React Components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"dev": "dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@times-components/link": "3.10.5",
|
|
58
58
|
"@times-components/provider": "1.32.0",
|
|
59
59
|
"@times-components/provider-queries": "2.17.0",
|
|
60
|
-
"@times-components/related-articles": "6.8.
|
|
60
|
+
"@times-components/related-articles": "6.8.24",
|
|
61
61
|
"@times-components/ts-slices": "1.3.24",
|
|
62
62
|
"@times-components/ts-styleguide": "1.36.2",
|
|
63
63
|
"@times-components/utils": "6.12.1",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"@testing-library/jest-dom/extend-expect"
|
|
120
120
|
]
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "0f967f6c6dc21b2f764425dbbf497118a2feb079"
|
|
123
123
|
}
|
|
@@ -3,8 +3,17 @@ import { render } from '@testing-library/react';
|
|
|
3
3
|
|
|
4
4
|
import { RecommendedFetch } from '../RecommendedFetch';
|
|
5
5
|
|
|
6
|
+
jest.mock('../RecommendedArticles', () => ({
|
|
7
|
+
RecommendedArticles: () => <div>RecommendedArticles</div>
|
|
8
|
+
}));
|
|
9
|
+
|
|
6
10
|
jest.mock('../../../helpers/fetch/FetchProvider', () => ({
|
|
7
|
-
FetchProvider: () =>
|
|
11
|
+
FetchProvider: (props: any) => (
|
|
12
|
+
<div>
|
|
13
|
+
FetchProvider
|
|
14
|
+
{props.children}
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
8
17
|
}));
|
|
9
18
|
|
|
10
19
|
describe('<RecommendedFetch>', () => {
|
|
@@ -18,6 +27,7 @@ describe('<RecommendedFetch>', () => {
|
|
|
18
27
|
);
|
|
19
28
|
|
|
20
29
|
expect(getByText('FetchProvider'));
|
|
30
|
+
expect(getByText('RecommendedArticles'));
|
|
21
31
|
expect(asFragment()).toMatchSnapshot();
|
|
22
32
|
});
|
|
23
33
|
});
|