gatsby-matrix-theme 7.1.53 → 7.1.56

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.
Files changed (24) hide show
  1. package/.ci.yml +23 -3
  2. package/CHANGELOG.md +45 -0
  3. package/package.json +6 -5
  4. package/src/components/atoms/cards/game-card/index.js +10 -2
  5. package/src/components/molecules/newsletter/index.js +8 -1
  6. package/src/components/molecules/toplist/row/variant-one.js +11 -0
  7. package/src/components/molecules/toplist/row/variant-one.test.js +3 -3
  8. package/src/gatsby-core-theme/components/atoms/module-title/index.js +7 -5
  9. package/src/gatsby-core-theme/components/molecules/footer/index.js +29 -22
  10. package/src/gatsby-core-theme/components/molecules/module/index.js +2 -2
  11. package/src/gatsby-core-theme/components/organisms/toplist/list/index.js +10 -15
  12. package/src/gatsby-core-theme/components/organisms/toplist/list/list.test.js +31 -0
  13. package/src/hooks/tabs/index.js +2 -3
  14. package/storybook/.ci.yml +6 -6
  15. package/storybook/public/139.61d42329.iframe.bundle.js +7 -0
  16. package/storybook/public/{139.24421e72.iframe.bundle.js.LICENSE.txt → 139.61d42329.iframe.bundle.js.LICENSE.txt} +11 -8
  17. package/storybook/public/{139.24421e72.iframe.bundle.js.map → 139.61d42329.iframe.bundle.js.map} +1 -1
  18. package/storybook/public/409.d50be782.iframe.bundle.js +1 -0
  19. package/storybook/public/iframe.html +1 -1
  20. package/storybook/public/main.dba5a8ff.iframe.bundle.js +1 -0
  21. package/storybook/public/{runtime~main.efcc3f75.iframe.bundle.js → runtime~main.eb5f3045.iframe.bundle.js} +1 -1
  22. package/storybook/public/139.24421e72.iframe.bundle.js +0 -7
  23. package/storybook/public/409.466d6266.iframe.bundle.js +0 -1
  24. package/storybook/public/main.1daa973f.iframe.bundle.js +0 -1
package/.ci.yml CHANGED
@@ -21,9 +21,9 @@ Matrix Theme Test:
21
21
  - coverage/
22
22
  coverage: /All files\s*\|\s*([\d\.]+)/
23
23
  rules:
24
- - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
25
- - if: '$CI_COMMIT_BRANCH == "master" && $PIPELINE == "automated"'
26
- - if: '$CI_PIPELINE_SOURCE == "push" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $PIPELINE == "automated"'
24
+ - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta"'
25
+ - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "beta") && $PIPELINE == "automated"'
26
+ - if: '$CI_PIPELINE_SOURCE == "push" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta") && $PIPELINE == "automated"'
27
27
 
28
28
  Theme Publish:
29
29
  image: git.ilcd.rocks:4567/team-floyd/themes/gatsby-themes:node14
@@ -48,5 +48,25 @@ Theme Publish:
48
48
  variables:
49
49
  - $PIPELINE != "content-trigger"
50
50
 
51
+ Theme Beta Publish:
52
+ image: git.ilcd.rocks:4567/team-floyd/themes/gatsby-themes:node14
53
+ stage: publish-beta
54
+ tags:
55
+ - floyd-runner-test
56
+ before_script:
57
+ - git config --global http.sslverify false
58
+ - git config --global user.email "floyd@gig.com"
59
+ - git config --global user.name "floyd"
60
+ script:
61
+ - export HUSKY=0
62
+ - yarn config set cache-folder .yarn
63
+ - yarn
64
+ - cd matrix-theme/
65
+ - npx semantic-release
66
+ when: manual
67
+ only:
68
+ refs:
69
+ - beta
70
+
51
71
  variables:
52
72
  PIPELINE: automated
package/CHANGELOG.md CHANGED
@@ -1,3 +1,48 @@
1
+ ## [7.1.56](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.55...v7.1.56) (2022-08-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added prop for copyright in footer ([cdbfcee](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cdbfcee0a89c18019afd50cf5f4d487ca0bfc666))
7
+ * fixed conflict ([97b28db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/97b28db2b647776acdddf661ede28596c83fbde1))
8
+ * updated core version ([6a790ef](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6a790ef737e038310531f86506cd19f0d92569d5))
9
+
10
+ ## [7.1.55](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.54...v7.1.55) (2022-08-29)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * added a new state to check when the newsletter button is clicked ([043d063](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/043d0639cf5f3be317e73b8b68d8fc4544b6dad6))
16
+ * added link to provider name if the game relation has an existing page ([3ff6006](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3ff60060244d8f4efc471dc56062976105539a3e))
17
+ * build issues ([9d576a1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9d576a129c0e20d21b1599078111ca651260671b))
18
+ * changed the content-intro component to use the content module ([e0ee58d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e0ee58dc4e3fa2b46d01fe6004a17653785c747a))
19
+ * fixed load more button ([c6de753](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c6de753ac0b744d2c9d1e952765b121faa20cfe2))
20
+ * merged master ([05515fa](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/05515fae41e5c9064234098fd454fdafd4b147cc))
21
+ * tests ([ef69bcb](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ef69bcb0dc63a0c16f9f8cae17688ad5dfd0efdf))
22
+ * toplist variant one ([328d331](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/328d3315eac8d4d3fe559ac3b8b2d807da4eed46))
23
+ * updated core theme version ([20f3fd4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/20f3fd431d020a3f7d9b24677c5b4cd6752e7057))
24
+
25
+
26
+ * Merge branch 'tm-2781-linking-provider-name' into 'master' ([095f727](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/095f727fd5bf86369707bbe37ce1ef4e013cdcf9))
27
+ * Merge branch 'tm-3041-load-more-fix' into 'master' ([5bd36b5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5bd36b5019f83087866737cda4b838e60198c5e1))
28
+ * Merge branch 'tm-3037-module-intro' into 'master' ([beaa6f3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/beaa6f3795ee75a9264c82efb407b6fa025bbd37))
29
+ * Merge branch 'tm-3039-icon/button-fuctionality-issue' into 'master' ([eb28f59](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/eb28f59219d9c5a6b3add86ebacfeb1d9a526e71))
30
+
31
+ ## [7.1.54](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.53...v7.1.54) (2022-08-24)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * added react-helmet ([43ce9b8](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/43ce9b8b6f139965d6c104720b1a5b7440fd39d3))
37
+ * added react-helmet ([97a218d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/97a218d39053cd57a4deefc97cb39e59ad6a924f))
38
+ * pipelines ([36ea0f0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/36ea0f077858c8cd7226087d227fe931a3a8aaa7))
39
+ * pipelines ([5c07a87](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5c07a878dddfc17445565bafc1ef58247bfcd798))
40
+ * updated to latest official core version ([3ebfd4d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3ebfd4dabae0a0408487855cb5bf094b26e0366e))
41
+ * upgrade gatsby and react ([98f77c4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/98f77c4c32f3f2504f9a0f39f0e113c051d054b7))
42
+
43
+
44
+ * Merge branch 'tm-2987-gatsby-upgrade' into 'master' ([64e4558](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/64e4558953f24c499e83d033b5b849473617f532))
45
+
1
46
  ## [7.1.53](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v7.1.52...v7.1.53) (2022-08-22)
2
47
 
3
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "7.1.53",
3
+ "version": "7.1.56",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -23,13 +23,14 @@
23
23
  "url": "https://storybook-matrix.gigmedia.com/"
24
24
  },
25
25
  "dependencies": {
26
- "gatsby": "^4.17.0",
27
- "gatsby-core-theme": "^11.0.0",
26
+ "gatsby": "^4.20.0",
27
+ "gatsby-core-theme": "11.0.5",
28
28
  "gatsby-plugin-sharp": "^4.10.2",
29
29
  "gatsby-plugin-sitemap": "^3.3.0",
30
30
  "gatsby-transformer-sharp": "^4.10.0",
31
- "react": "^17.0.2",
32
- "react-dom": "^17.0.2"
31
+ "react": "^18.2.0",
32
+ "react-dom": "^18.2.0",
33
+ "@react-icons/all-files": "^4.1.0"
33
34
  },
34
35
  "devDependencies": {
35
36
  "@babel/core": "^7.13.1",
@@ -87,7 +87,15 @@ const GameCard = ({
87
87
  <span className={styles.cardTitle}>{title}</span>
88
88
  </Link>
89
89
  <div className={styles.cardMeta}>
90
- <div className={styles.cardProvider}>{relation && relation?.game_provider?.name}</div>
90
+ {relation &&
91
+ (relation?.game_provider.name && relation?.game_provider.path ? (
92
+ <Link to={relation.game_provider.path} className={styles.cardProvider}>
93
+ {relation.game_provider.name}
94
+ </Link>
95
+ ) : (
96
+ <div className={styles.cardProvider}>{relation.game_provider.name}</div>
97
+ ))}
98
+
91
99
  <div className={styles.cardRating}>
92
100
  {relation && (
93
101
  <StarRating
@@ -116,7 +124,7 @@ GameCard.propTypes = {
116
124
  second_rating: PropTypes.string,
117
125
  third_rating: PropTypes.string,
118
126
  fourth_rating: PropTypes.string,
119
- game_provider: PropTypes.shape({ name: PropTypes.string }),
127
+ game_provider: PropTypes.shape({ name: PropTypes.string, path: PropTypes.string }),
120
128
  thumbnail_filename_object: PropTypes.shape({
121
129
  alt: PropTypes.string,
122
130
  }),
@@ -14,6 +14,7 @@ import styles from './newsletter.module.scss';
14
14
 
15
15
  const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', footer = false }) => {
16
16
  const [toggleNewsetter, setToggleNewsletter] = useState(false);
17
+ const [isClicked, setIsClicked] = useState(false);
17
18
  const { translations } = useContext(Context) || {};
18
19
  const redirectUrl =
19
20
  page?.path === '/'
@@ -23,6 +24,11 @@ const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', footer = false }) =>
23
24
  const newsletterFloatingContainer = useRef(React.createRef());
24
25
  const ppcPage = page.template === 'ppc';
25
26
 
27
+ const statesCombined = () => {
28
+ setToggleNewsletter(!toggleNewsetter);
29
+ setIsClicked(true);
30
+ };
31
+
26
32
  return (
27
33
  <div
28
34
  ref={newsletterFloatingContainer}
@@ -32,7 +38,8 @@ const Newsletter = ({ page, openBtnText = 'Unlock Bonuses', footer = false }) =>
32
38
  <Button
33
39
  active={!toggleNewsetter}
34
40
  text={translate(translations, 'newsletter_open_btn', openBtnText)}
35
- toggleNewsLetter={() => setToggleNewsletter(!toggleNewsetter)}
41
+ toggleNewsLetter={statesCombined}
42
+ isClicked={isClicked}
36
43
  gtmClass="newsletter-gtm btn-cta"
37
44
  ppcPage={ppcPage}
38
45
  />
@@ -1,3 +1,4 @@
1
+ /* eslint-disable react/prop-types */
1
2
  /* eslint-disable import/no-extraneous-dependencies */
2
3
  import React, { useContext } from 'react';
3
4
  import PropTypes from 'prop-types';
@@ -27,11 +28,13 @@ export default function Row({
27
28
  oneliner = 'main',
28
29
  layout = 'list',
29
30
  number = 1,
31
+ index,
30
32
  activeAuthor = false,
31
33
  isPPC = false,
32
34
  showLaunchDate = true,
33
35
  showCtaReviewLink = false,
34
36
  className,
37
+ itemRefs,
35
38
  }) {
36
39
  const result = item.authorName?.split(/\s+/);
37
40
  const itemName = item.bonus?.operator_name || item.name;
@@ -55,11 +58,18 @@ export default function Row({
55
58
  const ribbons = hasRibbon?.split(',');
56
59
  const launchDate = getLaunchDate(item.founded);
57
60
 
61
+ const addToRefs = (el, itemNum) => {
62
+ if (el && itemRefs) {
63
+ itemRefs.current[itemNum] = el;
64
+ }
65
+ };
66
+
58
67
  return (
59
68
  <li
60
69
  className={`${className} ${styles.row} ${layout === 'grid' ? styles.grid : ''} ${
61
70
  showLaunchDate ? styles.launchDate : ''
62
71
  } ${!tandcEnabled ? styles.rowNoTandC : ''}`}
72
+ ref={(el) => addToRefs(el, index)}
63
73
  >
64
74
  {layout === 'grid' && (
65
75
  <div className={`${styles.numbers} ${styles[`num_${number}`]}`} id={`num_${number}`}>
@@ -168,6 +178,7 @@ export default function Row({
168
178
 
169
179
  Row.propTypes = {
170
180
  showLaunchDate: PropTypes.bool,
181
+ index: PropTypes.number,
171
182
  activeAuthor: PropTypes.bool,
172
183
  className: PropTypes.string,
173
184
  tracker: PropTypes.string,
@@ -8,7 +8,7 @@ import Row from './variant-one';
8
8
  describe('toplist row component', () => {
9
9
  test('render row list format', () => {
10
10
  const { container, getAllByText, getByText } = render(
11
- <Row item={getToplistItem()} tracker="main" />
11
+ <Row item={getToplistItem()} tracker="main" itemRefs={{ current: {} }} />
12
12
  );
13
13
  expect(container).toBeTruthy();
14
14
 
@@ -38,7 +38,7 @@ describe('toplist row component', () => {
38
38
 
39
39
  test('render row grid format', () => {
40
40
  const { container, getAllByText, getByText } = render(
41
- <Row layout="grid" item={getToplistItem()} tracker="main" />
41
+ <Row layout="grid" item={getToplistItem()} itemRefs={{ current: {} }} tracker="main" />
42
42
  );
43
43
  expect(container).toBeTruthy();
44
44
 
@@ -76,7 +76,7 @@ describe('toplist row component', () => {
76
76
  },
77
77
  review_link: null,
78
78
  };
79
- const { getByText } = render(<Row item={updateObj} />);
79
+ const { getByText } = render(<Row itemRefs={{ current: {} }} item={updateObj} />);
80
80
  expect(getByText('ribbon_text')).toBeTruthy();
81
81
  expect(getByText('pro1')).toBeTruthy();
82
82
  });
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-nested-ternary */
1
2
  /* eslint-disable import/no-extraneous-dependencies */
2
3
  import React, { useContext } from 'react';
3
4
  import PropTypes from 'prop-types';
@@ -79,10 +80,9 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
79
80
 
80
81
  const template = pageContext && pageContext?.page?.template;
81
82
  const type = pageContext && pageContext?.page?.type;
82
- return (
83
- (module.module_title ||
84
- (module.title && (module.name === 'cards' || module.name === 'top_list'))) &&
85
- (module.link_label ? (
83
+ return module.module_title ||
84
+ (module.title && (module.name === 'cards' || module.name === 'top_list')) ? (
85
+ module.link_label ? (
86
86
  <div
87
87
  className={`${styles.moduleTitle} ${styles[type]} ${styles[template]} ${
88
88
  module?.style && styles[module.style]
@@ -104,7 +104,9 @@ const ModuleTitle = ({ module, viewMoreIcon = <FaAngleRight />, pageContext = nu
104
104
  styles.toplistTitle
105
105
  } ${tabsToplist ? styles.tabsToplist : null}`
106
106
  )
107
- ))
107
+ )
108
+ ) : (
109
+ <></>
108
110
  );
109
111
  };
110
112
 
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ // eslint-disable-next-line import/no-extraneous-dependencies
2
3
  import PropTypes from 'prop-types';
3
4
  import LinkList from 'gatsby-core-theme/src/components/molecules/link-list';
4
5
  import { getExtraField, copyrightText } from 'gatsby-core-theme/src/helpers/getters';
@@ -17,6 +18,7 @@ const Footer = ({
17
18
  page,
18
19
  hasFooterLinks = false,
19
20
  hasDisclaimer = true,
21
+ showCopyright = true,
20
22
  }) => {
21
23
  const TopSection = footerTopCustom;
22
24
  const BottomSection = footerBottomCustom;
@@ -33,18 +35,19 @@ const Footer = ({
33
35
 
34
36
  return (
35
37
  <footer className={`${styles.footer} ${hasFooterLinks && styles.hasFooterLinks}`}>
36
- <div className={styles.topPart}>
37
- <div className={styles.links}>
38
+ {((footerMenu && showLinks) || footerTopCustom) && (
39
+ <div className={styles.topPart}>
38
40
  {footerMenu && showLinks && (
39
- <LinkList
40
- lists={getExtraField(section?.extra_fields, footerMenu)}
41
- gtmClass="mobile-menu-gtm"
42
- />
41
+ <div className={styles.links}>
42
+ <LinkList
43
+ lists={getExtraField(section?.extra_fields, footerMenu)}
44
+ gtmClass="mobile-menu-gtm"
45
+ />
46
+ </div>
43
47
  )}
48
+ <TopSection section={section} page={page} />
44
49
  </div>
45
-
46
- {footerTopCustom && <TopSection section={section} page={page} />}
47
- </div>
50
+ )}
48
51
 
49
52
  <div className={styles.bottomPart}>
50
53
  {footerBottomCustom && <BottomSection section={section} page={page} />}
@@ -56,19 +59,22 @@ const Footer = ({
56
59
  }}
57
60
  />
58
61
  )}
59
- <p className={styles.copyrightText}>{copyrightText()}</p>
60
- <div className={styles.logos}>
61
- {footerLogos && getExtraField(section?.extra_fields, footerLogos) && (
62
- <LinkList
63
- showListTitle={false}
64
- imageOnly
65
- singleList
66
- lists={getExtraField(section?.extra_fields, footerLogos)}
67
- gtmClass="mobile-menu-gtm logo-cta"
68
- />
69
- )}
70
- {hasDisclaimer && <Disclaimer image={dmcaImg} />}
71
- </div>
62
+ {showCopyright && <p className={styles.copyrightText}>{copyrightText()}</p>}
63
+
64
+ {(footerLogos || hasDisclaimer) && (
65
+ <div className={styles.logos}>
66
+ {footerLogos && getExtraField(section?.extra_fields, footerLogos) && (
67
+ <LinkList
68
+ showListTitle={false}
69
+ imageOnly
70
+ singleList
71
+ lists={getExtraField(section?.extra_fields, footerLogos)}
72
+ gtmClass="mobile-menu-gtm logo-cta"
73
+ />
74
+ )}
75
+ {hasDisclaimer && <Disclaimer image={dmcaImg} />}
76
+ </div>
77
+ )}
72
78
  </div>
73
79
  </footer>
74
80
  );
@@ -97,4 +103,5 @@ Footer.propTypes = {
97
103
  page: PropTypes.object,
98
104
  hasFooterLinks: PropTypes.bool,
99
105
  hasDisclaimer: PropTypes.bool,
106
+ showCopyright: PropTypes.bool,
100
107
  };
@@ -114,7 +114,7 @@ const Modules = ({ module, page, pageContext }) => {
114
114
  const ModuleIntro =
115
115
  module.name !== 'top_list' &&
116
116
  module.module_introduction &&
117
- loadable(() => import('~molecules/content-intro'));
117
+ loadable(() => import('~molecules/content'));
118
118
 
119
119
  return (
120
120
  ModuleComponent && (
@@ -126,7 +126,7 @@ const Modules = ({ module, page, pageContext }) => {
126
126
  } ${styles.module} ${module?.style && styles[module.style]} module`}
127
127
  >
128
128
  {module.name !== 'top_list' && <ModuleTitle module={module} />}
129
- {ModuleIntro && <ModuleIntro content={module.module_introduction} />}
129
+ {ModuleIntro && <ModuleIntro module={{ value: module.module_introduction }} />}
130
130
  <ModuleComponent module={module} page={page} pageContext={pageContext} {...extraProps} />
131
131
  </div>
132
132
  )
@@ -33,29 +33,19 @@ export default function List({
33
33
  items = items.filter((res) => res.status !== 'inactive');
34
34
  }
35
35
 
36
- const addToRefs = (el, index) => {
37
- if (el) {
38
- elRefs.current[index] = el;
39
- }
40
- };
41
-
42
36
  const loadMoreBtn = useRef(React.createRef());
43
37
 
44
38
  const showLoadMoreButton =
45
39
  hasLoadMoreButton === '1' && Number(initItemsCount) < toplist.items.length;
46
40
 
47
41
  function handleClick() {
48
- const displayed = elRefs.current.filter((item) =>
49
- item.base.classList.contains(styles.show)
50
- ).length;
42
+ const displayed = elRefs.current.filter((item) => item.classList.contains(styles.show)).length;
51
43
 
52
44
  const nextItem = loadingItems + displayed;
53
45
  const lastItem =
54
46
  nextItem > elRefs.current.length ? elRefs.current.length + 1 : displayed + loadingItems;
55
47
 
56
- elRefs.current
57
- .slice(displayed, lastItem)
58
- .forEach((item) => item.base.classList.toggle(styles.show));
48
+ elRefs.current.slice(displayed, lastItem).forEach((item) => item.classList.toggle(styles.show));
59
49
  forceCheck();
60
50
 
61
51
  if (loadingItems + displayed >= elRefs.current.length) {
@@ -79,10 +69,15 @@ export default function List({
79
69
  index={index}
80
70
  className={index + 1 <= initLoadItems ? styles.show : null}
81
71
  key={keygen()}
82
- ref={(el) => addToRefs(el, index)}
72
+ itemRefs={elRefs}
83
73
  />
84
74
  ) : (
85
- <Row item={item} tracker={toplist.tracker} oneliner={toplist.one_liner} />
75
+ <Row
76
+ itemRefs={elRefs}
77
+ item={item}
78
+ tracker={toplist.tracker}
79
+ oneliner={toplist.one_liner}
80
+ />
86
81
  )
87
82
  )}
88
83
  </ul>
@@ -95,7 +90,7 @@ export default function List({
95
90
  onClick={handleClick}
96
91
  invertColors
97
92
  primaryColor={false}
98
- gtmClass="toplist-gtm btn-cta"
93
+ gtmClass="toplist-gtm-load-more btn-cta"
99
94
  />
100
95
  </div>
101
96
  )}
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { render, cleanup, fireEvent } from '@testing-library/react';
3
+ import '@testing-library/jest-dom/extend-expect';
4
+ import { singleToplistData } from 'gatsby-core-theme/tests/factories/modules/toplist.factory';
5
+ import List from './index';
6
+ import Row from '../../../../../components/molecules/toplist/row/variant-one';
7
+
8
+ const module = singleToplistData;
9
+
10
+ describe('List test component', () => {
11
+ test('render', () => {
12
+ const { container } = render(
13
+ <List
14
+ CustomRow={Row}
15
+ hasLoadMoreButton="1"
16
+ initItemsCount="2"
17
+ loadItemsCount="2"
18
+ toplist={module.items[0]}
19
+ />
20
+ );
21
+
22
+ expect(container.getElementsByClassName('show').length).toBe(2);
23
+ const loadMoreButton = container.querySelector('button.toplist-gtm-load-more');
24
+ fireEvent.click(loadMoreButton);
25
+
26
+ expect(container.getElementsByClassName('show').length).toBe(4);
27
+ });
28
+ });
29
+ afterEach(() => {
30
+ cleanup();
31
+ });
@@ -103,8 +103,7 @@ const Tabs = ({
103
103
  setTimeout(forceCheck);
104
104
  }
105
105
 
106
- const ModuleIntro =
107
- module.module_introduction && loadable(() => import('~molecules/content-intro'));
106
+ const ModuleIntro = module.module_introduction && loadable(() => import('~molecules/content'));
108
107
 
109
108
  return (
110
109
  <>
@@ -131,7 +130,7 @@ const Tabs = ({
131
130
 
132
131
  {HeaderComp && <div className={styles.headerComp}>{HeaderComp}</div>}
133
132
  </div>
134
- {ModuleIntro && <ModuleIntro content={module.module_introduction} />}
133
+ {ModuleIntro && <ModuleIntro module={{ value: module.module_introduction }} />}
135
134
  <div className="tab-content">
136
135
  {children.map((child, index) => {
137
136
  if (
package/storybook/.ci.yml CHANGED
@@ -16,9 +16,9 @@ Storybook Build:
16
16
  paths:
17
17
  - matrix-theme/storybook/public/
18
18
  rules:
19
- - if: '$CI_COMMIT_BRANCH == "master" && $PIPELINE == "automated"'
20
- - if: '$CI_PIPELINE_SOURCE == "push" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $PIPELINE == "automated"'
21
- - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $PIPELINE == "automated"'
19
+ - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "beta") && $PIPELINE == "automated"'
20
+ - if: '$CI_PIPELINE_SOURCE == "push" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta") && $PIPELINE == "automated"'
21
+ - if: '($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta") && $PIPELINE == "automated"'
22
22
  - if: '$PIPELINE == "development"'
23
23
 
24
24
 
@@ -42,9 +42,9 @@ Storybook Deploy:
42
42
  - matrix-theme/node_modules/
43
43
  policy: pull
44
44
  rules:
45
- - if: '$CI_COMMIT_BRANCH == "master" && $PIPELINE == "automated"'
46
- - if: '$CI_PIPELINE_SOURCE == "push" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $PIPELINE == "automated"'
47
- - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" && $PIPELINE == "automated"'
45
+ - if: '($CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "beta") && $PIPELINE == "automated"'
46
+ - if: '$CI_PIPELINE_SOURCE == "push" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta") && $PIPELINE == "automated"'
47
+ - if: '($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "beta") && $PIPELINE == "automated"'
48
48
  when: manual
49
49
  allow_failure: true
50
50
  - if: '$PIPELINE == "development"'