gatsby-matrix-theme 48.0.11 → 49.0.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 CHANGED
@@ -1,3 +1,37 @@
1
+ ## [49.0.1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v49.0.0...v49.0.1) (2024-08-06)
2
+
3
+
4
+ ### Config
5
+
6
+ * update theme ([964ff97](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/964ff97d48843e5234a34850e6c0358a5702a039))
7
+
8
+ # [49.0.0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v48.0.11...v49.0.0) (2024-08-02)
9
+
10
+
11
+ ### Code Refactoring
12
+
13
+ * correction to reviewer name ([6792e5a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6792e5a4a86d22592b9e5ee7bda1f036ee5bd98b))
14
+
15
+
16
+ ### Config
17
+
18
+ * update theme ([87b1c9b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/87b1c9b70b45c0d04084f9287b247c7193f7457e))
19
+
20
+
21
+ * Merge branch 'tm-4654-multiple-contributor' into 'master' ([d3f1aff](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d3f1affaa67657c93bc59a2bc34bc7f8735fa3db))
22
+ * Merge branch 'master' into tm-4654-multiple-contributor ([e83e6d5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e83e6d50cfc3d3e59d222e84d0471bbb9aa65b95))
23
+ * Merge branch 'master' into tm-4654-multiple-contributor ([1f9855e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1f9855e1b104922cd770663b1510dabe90ca9c52))
24
+
25
+
26
+ ### Features
27
+
28
+ * show author review if author, else show bio ([97d0160](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/97d01609fdbfa3d05bd33ed03bf6f9afdca99492))
29
+
30
+
31
+ ### Tests
32
+
33
+ * fix storybook ([1f91c53](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1f91c53ccfd683ce563b6f917adb8aadece3c93c))
34
+
1
35
  ## [48.0.11](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v48.0.10...v48.0.11) (2024-08-02)
2
36
 
3
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "48.0.11",
3
+ "version": "49.0.1",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@react-icons/all-files": "^4.1.0",
27
27
  "gatsby": "^5.11.0",
28
- "gatsby-core-theme": "35.1.1",
28
+ "gatsby-core-theme": "35.1.3",
29
29
  "gatsby-plugin-sharp": "^5.11.0",
30
30
  "gatsby-transformer-sharp": "^5.11.0",
31
31
  "prop-types": "15.7.2",
@@ -91,9 +91,18 @@ describe('Author Component', () => {
91
91
  );
92
92
  });
93
93
  });
94
- test('Author bio', async () => {
94
+ test('Author review', async () => {
95
95
  const { container } = render(<Contributor contributor={authorData} />);
96
96
 
97
+ await waitFor(() => {
98
+ expect(container.querySelector('.bottomContainer')).toBeTruthy();
99
+ expect(container.querySelector('.biography')).toBeTruthy();
100
+ expect(container.querySelector('.biography')).toHaveTextContent(authorData.author_review);
101
+ });
102
+ });
103
+ test('Reviewer bio', async () => {
104
+ const { container } = render(<Contributor contributor={authorData} isReviewer />);
105
+
97
106
  await waitFor(() => {
98
107
  expect(container.querySelector('.bottomContainer')).toBeTruthy();
99
108
  expect(container.querySelector('.biography')).toBeTruthy();
@@ -23,6 +23,7 @@ const Contributor = ({
23
23
  pages_count: pageCount,
24
24
  experience,
25
25
  biography,
26
+ author_review: authorReview,
26
27
  } = contributor || {};
27
28
 
28
29
  return (
@@ -58,12 +59,12 @@ const Contributor = ({
58
59
  </div>
59
60
  )}
60
61
  </div>
61
- {biography && (
62
+ {((isReviewer && biography) || (!isReviewer && authorReview)) && (
62
63
  <div className={styles.bottomContainer || ''}>
63
64
  <div
64
65
  className={styles?.biography || ''}
65
66
  // eslint-disable-next-line react/no-danger
66
- dangerouslySetInnerHTML={{ __html: biography }}
67
+ dangerouslySetInnerHTML={{ __html: isReviewer ? biography : authorReview }}
67
68
  />
68
69
  </div>
69
70
  )}
@@ -11,8 +11,21 @@ import getAuthorList from '../../../../tests/factories/authors/author.factory';
11
11
 
12
12
  import Author from '.';
13
13
 
14
- const authorData = getAuthorList({})[1];
15
- const reviewerData = getAuthorList({})[1];
14
+ const author1Props = {
15
+ pages_count: 6,
16
+ name: 'John Doe',
17
+ author_review: 'Ice Casino offers an exhilarating gaming experience with its extensive selection of slots and live dealer games, ensuring hours of entertainment for every type of player. The user-friendly interface and generous bonuses make it a standout choice for both new and seasoned online casino enthusiasts.',
18
+ experience: 4,
19
+ }
20
+
21
+ const author2Props = {
22
+ pages_count: 60,
23
+ name: 'Jack Smith',
24
+ author_review: `Ice Casino stands out for its commitment to player satisfaction, offering a wide array of games and frequent promotions that keep the excitement levels high. The platform's robust security measures and fair play policies ensure a safe and trustworthy environment, making it a top choice for online gaming aficionados.`,
25
+ experience: 10,
26
+ }
27
+
28
+ const reviewerData = getAuthorList({ name: 'Matthew Webb' })[1];
16
29
 
17
30
  export default {
18
31
  title: 'Theme/Modules/Template Blocks/Multiple Contributors',
@@ -21,7 +34,7 @@ export default {
21
34
  authors: {
22
35
  name: 'author',
23
36
  type: { name: 'object', required: true },
24
- defaultValue: [authorData, reviewerData],
37
+ defaultValue: [getAuthorList({ ...author1Props })[1], getAuthorList({ ...author2Props })[1]],
25
38
  description: 'Author Data',
26
39
  table: {
27
40
  type: { summary: 'object' },