gatsby-core-theme 41.1.15 → 41.1.16
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
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [41.1.16](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v41.1.15...v41.1.16) (2025-01-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* deploy user ([b634f7e](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/b634f7eff91ef67d2005da557464c4a2850a7744))
|
|
7
|
+
* deploy user ([5211f50](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/5211f507098ff840c9c07d3250b05f07a4a52061))
|
|
8
|
+
* deploy user ([8c2fe8b](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/8c2fe8b1212f5465fd450691bd37665534cc612e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Code Refactoring
|
|
12
|
+
|
|
13
|
+
* changes to adding an anchor for operator review summary ([2551c2e](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/2551c2e85173d6c45a3f7ffb76fca92153008c56))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
* Merge branch 'tm-5018-anchor-operator-review-summary' into 'master' ([085235a](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/085235a1e25deb9c5c1c66556425e13ee6086482))
|
|
17
|
+
|
|
1
18
|
## [41.1.15](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v41.1.14...v41.1.15) (2024-12-27)
|
|
2
19
|
|
|
3
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render, cleanup, fireEvent
|
|
3
|
-
import { generatePlaceholderString } from '../../../helpers/generators';
|
|
2
|
+
import { render, cleanup, fireEvent } from '@testing-library/react';
|
|
4
3
|
import '@testing-library/jest-dom/extend-expect';
|
|
5
4
|
import { getSingleContentData } from '~tests/factories/modules/content.factory';
|
|
6
5
|
import Content from '.';
|
|
@@ -29,7 +28,6 @@ describe('Content Component', () => {
|
|
|
29
28
|
test('render content props', () => {
|
|
30
29
|
const correctData = getSingleContentData('h4');
|
|
31
30
|
const { container } = render(<Content module={correctData} />);
|
|
32
|
-
expect(container).toBeTruthy();
|
|
33
31
|
expect(container.querySelectorAll('div.content')).toHaveLength(1);
|
|
34
32
|
|
|
35
33
|
// HTML parse
|
|
@@ -164,7 +162,7 @@ describe('Content Component', () => {
|
|
|
164
162
|
};
|
|
165
163
|
const { container } = render(<Content module={iframeModule} />);
|
|
166
164
|
|
|
167
|
-
expect(container.querySelectorAll('iframe')).
|
|
165
|
+
expect(container.querySelectorAll('iframe')).toHaveLength(2);
|
|
168
166
|
});
|
|
169
167
|
|
|
170
168
|
test('test Show more content', () => {
|
|
@@ -213,17 +211,17 @@ describe('Content Component', () => {
|
|
|
213
211
|
`,
|
|
214
212
|
};
|
|
215
213
|
const { container, getByText } = render(<Content module={iframeModule} />);
|
|
216
|
-
expect(getByText('show more test')).
|
|
214
|
+
expect(getByText('show more test')).toBeInTheDocument();
|
|
217
215
|
|
|
218
216
|
const showMorebutton = container.querySelector('button');
|
|
219
217
|
fireEvent.click(showMorebutton);
|
|
220
218
|
|
|
221
|
-
expect(getByText('More COntent test')).
|
|
219
|
+
expect(getByText('More COntent test')).toBeInTheDocument();
|
|
222
220
|
});
|
|
223
221
|
|
|
224
222
|
test('renders content with placeholder string for h2', () => {
|
|
225
223
|
const { container } = render(<Content module={module} page={page} />);
|
|
226
|
-
expect(container.querySelector('h2')).toHaveTextContent(
|
|
224
|
+
expect(container.querySelector('h2')).toHaveTextContent('2024');
|
|
227
225
|
});
|
|
228
226
|
|
|
229
227
|
test('renders content without placeholder string for h2', () => {
|
|
@@ -41,14 +41,16 @@ function Anchor({
|
|
|
41
41
|
let numberOfCharacters = 0;
|
|
42
42
|
const anchorList = items.map((anchor) => {
|
|
43
43
|
numberOfCharacters += anchor?.label?.length;
|
|
44
|
+
const generatedLabel = generatePlaceholderString(anchor?.label?.toLowerCase().trim(),null, page?.relation);
|
|
45
|
+
|
|
44
46
|
return {
|
|
45
47
|
id: `${
|
|
46
48
|
anchor.label &&
|
|
47
|
-
removeSymbols(anchorLink(
|
|
49
|
+
removeSymbols(anchorLink(generatedLabel))
|
|
48
50
|
}`,
|
|
49
|
-
label:
|
|
51
|
+
label: generatedLabel,
|
|
50
52
|
slug: `${
|
|
51
|
-
anchor.label && anchorLink(
|
|
53
|
+
anchor.label && anchorLink(generatedLabel)
|
|
52
54
|
}`,
|
|
53
55
|
};
|
|
54
56
|
});
|
|
@@ -67,7 +67,7 @@ describe('Index Processor', () => {
|
|
|
67
67
|
|
|
68
68
|
processExtraFields(extraField);
|
|
69
69
|
|
|
70
|
-
expect(extraField.logos).toContain('
|
|
70
|
+
expect(extraField.logos).toContain('2025');
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
test('processExtraFields text', () => {
|
|
@@ -77,7 +77,7 @@ describe('Index Processor', () => {
|
|
|
77
77
|
|
|
78
78
|
processExtraFields(extraField);
|
|
79
79
|
|
|
80
|
-
expect(extraField.logos).toContain(
|
|
80
|
+
expect(extraField.logos).toContain(new Date().getFullYear().toString());
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
test('processExtraFields operator', () => {
|
|
@@ -256,7 +256,7 @@ describe("Modules Helper", () => {
|
|
|
256
256
|
test("Process Content function", () => {
|
|
257
257
|
const module = contentPlaceholders;
|
|
258
258
|
processContentModule(module, {}, {});
|
|
259
|
-
expect(module.value).toContain(
|
|
260
|
-
expect(module.show_more_content).toContain(
|
|
259
|
+
expect(module.value).toContain(new Date().getFullYear().toString());
|
|
260
|
+
expect(module.show_more_content).toContain(new Date().getFullYear().toString());
|
|
261
261
|
});
|
|
262
262
|
});
|