gatsby-matrix-theme 13.0.12 → 13.0.14

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 (35) hide show
  1. package/.storybook/preview.js +3 -0
  2. package/CHANGELOG.md +37 -0
  3. package/package.json +2 -2
  4. package/src/components/atoms/rating/index.js +4 -9
  5. package/src/components/atoms/rating/rating.test.js +1 -1
  6. package/src/components/atoms/rating/ratings.module.scss +10 -0
  7. package/src/components/molecules/header/variants/operator/template-five/template-five.module.scss +1 -1
  8. package/src/components/molecules/header/variants/operator/template-four/template-four.module.scss +1 -0
  9. package/src/components/molecules/header/variants/operator/template-four/template-four.test.js +1 -1
  10. package/src/components/molecules/header/variants/operator/template-one-two/template-one-two.test.js +2 -2
  11. package/src/components/molecules/header/variants/operator/template-three/template-three.test.js +1 -1
  12. package/src/components/molecules/header/variants/payment/template-four/index.js +80 -0
  13. package/src/components/molecules/header/variants/payment/template-four/template-four.module.scss +195 -0
  14. package/src/components/molecules/header/variants/payment/template-four/template-four.stories.js +52 -0
  15. package/src/components/molecules/header/variants/payment/template-four/template-four.test.js +26 -0
  16. package/src/components/molecules/header/variants/payment/template-one-three/index.js +142 -0
  17. package/src/components/molecules/header/variants/payment/template-one-three/template-one-three.module.scss +291 -0
  18. package/src/components/molecules/header/variants/payment/template-one-three/template-one-three.stories.js +66 -0
  19. package/src/components/molecules/header/variants/payment/template-one-three/template-one-three.test.js +40 -0
  20. package/src/components/molecules/header/variants/payment/template-two/index.js +124 -0
  21. package/src/components/molecules/header/variants/payment/template-two/template-two.module.scss +162 -0
  22. package/src/components/molecules/header/variants/payment/template-two/template-two.stories.js +57 -0
  23. package/src/components/molecules/header/variants/payment/template-two/template-two.test.js +25 -0
  24. package/src/constants/ratings-constant.js +57 -18
  25. package/src/gatsby-core-theme/components/molecules/header/header.test.js +28 -0
  26. package/src/gatsby-core-theme/components/molecules/header/index.js +38 -4
  27. package/src/gatsby-core-theme/components/molecules/main/index.js +6 -2
  28. package/src/gatsby-core-theme/styles/utils/variables/_main.scss +4 -1
  29. package/storybook/public/{217.0b7293e4.iframe.bundle.js → 217.fac05c00.iframe.bundle.js} +3 -3
  30. package/storybook/public/{217.0b7293e4.iframe.bundle.js.map → 217.fac05c00.iframe.bundle.js.map} +1 -1
  31. package/storybook/public/iframe.html +1 -1
  32. package/storybook/public/main.d34ceb05.iframe.bundle.js +1 -0
  33. package/tests/factories/pages/payment.factory.js +54 -0
  34. package/storybook/public/main.c8584a64.iframe.bundle.js +0 -1
  35. /package/storybook/public/{217.0b7293e4.iframe.bundle.js.LICENSE.txt → 217.fac05c00.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -32,6 +32,9 @@ export const parameters = {
32
32
  ['Template One', 'Template Two', 'Template Three', 'Template Four'],
33
33
  'Operator',
34
34
  ['Template One-Two', 'Template Three', 'Template Four', 'Template Five'],
35
+ 'Games',
36
+ 'Payment',
37
+ ['Template One-Three', 'Template Two', 'Template Four'],
35
38
  ],
36
39
  ],
37
40
  'Atoms',
package/CHANGELOG.md CHANGED
@@ -1,3 +1,40 @@
1
+ ## [13.0.14](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v13.0.13...v13.0.14) (2023-03-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * jest ([3ae9c95](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3ae9c95acb174b75f804b9c4e4967e633c9976f6))
7
+ * payment ([8afc208](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8afc208726ec807978b75c224a10ac5c75e8c952))
8
+ * payment header ([bdd6e76](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/bdd6e764b3bafb70c3974767ad17c522ddd26b9b))
9
+ * payment methods header ([3ea61a1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3ea61a11e1f10c9f061b87aefbe258e0b16cc5af))
10
+ * payment provider banner added ([fefe125](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fefe125aa4f46bf0a5158e6e0de7636adb7d42e0))
11
+ * ratings ([12afe60](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/12afe6044d55999cc7bfdebaaf350cf738f18543))
12
+ * storybook and jest ([e8d21f4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/e8d21f4d068e5119ca63faf51df8ba61016d35dd))
13
+ * storybook images ([b3c17d0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b3c17d0f018b2b7a251a7d5eda5d6a5e72480747))
14
+ * template two ([ffbad1f](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ffbad1f177ed3d5c8f81b0b14ec5e004f30fe4ba))
15
+ * test ([b6289e3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/b6289e30359348a2db19578e1014db6e3b2b0d46))
16
+ * test ([fc98594](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/fc985940c88e5498d6998d566bb14b88b7b187c9))
17
+ * update to the latest matrix changes ([4e52d3e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/4e52d3ef2a8f776b658d03532e7fd731e0c61b28))
18
+
19
+
20
+ * Merge branch 'payment-provider' into 'master' ([6014b26](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6014b26748457d2e2920e88e6d9b9add3d83b174))
21
+
22
+ ## [13.0.13](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v13.0.12...v13.0.13) (2023-03-01)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * add extraprop on module molecule component ([1bfc06a](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1bfc06ae104c7b30a1e199fbdd2dc4a8094453e6))
28
+ * resolve conflicts ([10c9101](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/10c9101eb8b193f214027406a0f36c235b97ff2b))
29
+ * update author date data ([83bbf5d](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/83bbf5d6c4cd03f016bbc894273b439fe90147dd))
30
+ * update author date data ([c2642e0](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c2642e0a4980864cc20fdc6e475a6f3e2bd69497))
31
+ * update core version ([2e8b516](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2e8b51672d3293d06f643e587696483ce0b0bb0d))
32
+ * update date props ([cecd8f2](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/cecd8f2541009bec27c3c624d4d2d81bd97842db))
33
+ * update main ([9c293db](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/9c293dbb6b134e5f78b7ea6c41017359b931d852))
34
+
35
+
36
+ * Merge branch 'tm-3307-enable-manual-publushed/updated-date' into 'master' ([6c8b847](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/6c8b8470a97e55e5c7e5038460edd9705915bf05))
37
+
1
38
  ## [13.0.12](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v13.0.11...v13.0.12) (2023-02-28)
2
39
 
3
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "13.0.12",
3
+ "version": "13.0.14",
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": "^4.20.0",
28
- "gatsby-core-theme": "18.0.18",
28
+ "gatsby-core-theme": "18.0.19",
29
29
  "gatsby-plugin-sharp": "^4.10.2",
30
30
  "gatsby-plugin-sitemap": "^3.3.0",
31
31
  "gatsby-transformer-sharp": "^4.10.0",
@@ -4,14 +4,12 @@ import PropTypes from 'prop-types';
4
4
  import { Context } from 'gatsby-core-theme/src/context/MainProvider';
5
5
  import { translate, getObjectValue } from 'gatsby-core-theme/src/helpers/getters';
6
6
  import keygen from 'gatsby-core-theme/src/helpers/keygen';
7
- import { isMobileDevice } from '../../../helpers/mobile-detect';
8
7
  import operatorRatings from '../../../constants/ratings-constant';
9
8
 
10
9
  import styles from './ratings.module.scss';
11
10
 
12
- export default function Ratings({ item, type, numOfStars = 5 }) {
11
+ export default function Ratings({ item, type, numOfStars = 5, currency = '€' }) {
13
12
  const { translations } = useContext(Context) || {};
14
- const isMobile = isMobileDevice();
15
13
 
16
14
  const ratings = operatorRatings[type] || [];
17
15
  const rangeText = { 0: 'Low', 1: 'Medium', 2: 'High' };
@@ -21,17 +19,13 @@ export default function Ratings({ item, type, numOfStars = 5 }) {
21
19
  }
22
20
 
23
21
  return (
24
- <ul className={styles.ratingList}>
22
+ <ul className={`${styles.ratingList} ${type && styles[type]}`}>
25
23
  {ratings?.map((rating) => {
26
- if (rating?.showOnlyMobile && !isMobile) {
27
- return null;
28
- }
29
-
30
24
  const { fieldValue, translationKey, fieldLabel, componentToUse } = rating || {};
31
25
 
32
26
  let valueDiplayed;
33
27
  const value = getObjectValue(item, fieldValue);
34
- const component = componentToUse ? componentToUse(numOfStars, value) : false;
28
+ const component = componentToUse ? componentToUse(numOfStars, value, currency) : false;
35
29
 
36
30
  if (component && value) {
37
31
  valueDiplayed = component || '-';
@@ -67,4 +61,5 @@ Ratings.propTypes = {
67
61
  }),
68
62
  type: PropTypes.string,
69
63
  numOfStars: PropTypes.string,
64
+ currency: PropTypes.string,
70
65
  };
@@ -31,7 +31,7 @@ describe('Rating component', () => {
31
31
  test('Rating', () => {
32
32
  const { container } = render(<Ratings item={page()} type="operator" />);
33
33
  expect(container.querySelectorAll('ul')).toHaveLength(1);
34
- expect(container.querySelectorAll('li')).toHaveLength(5);
34
+ expect(container.querySelectorAll('li')).toHaveLength(6);
35
35
  });
36
36
 
37
37
  test('Rating with diferent data text', () => {
@@ -60,6 +60,7 @@
60
60
  font-size: 18px;
61
61
  line-height: 28px;
62
62
  color: #1C1A28;
63
+ display: flex;
63
64
 
64
65
 
65
66
  >div {
@@ -109,4 +110,13 @@
109
110
  font-size: 14px;
110
111
  line-height: 22px;
111
112
 
113
+ }
114
+
115
+ .operator,
116
+ .payment_method {
117
+ >li:nth-child(1) {
118
+ @include min(tablet) {
119
+ display: none;
120
+ }
121
+ }
112
122
  }
@@ -286,7 +286,7 @@
286
286
  display: flex;
287
287
  flex-direction: row;
288
288
  overflow-x: auto;
289
- width: 85vw;
289
+ width: 75vw;
290
290
  gap: 0.8rem;
291
291
  margin-top: 3.2rem;
292
292
 
@@ -121,6 +121,7 @@
121
121
  display: flex;
122
122
  flex-direction: column;
123
123
  gap: 2.3rem;
124
+ padding: 2rem;
124
125
  padding-left: 0rem;
125
126
  margin-left: 2rem;
126
127
  }
@@ -17,7 +17,7 @@ describe('Operator template four component', () => {
17
17
  expect(getByText('100% Bonus')).toBeTruthy();
18
18
  expect(getByText('+ Big Promotions')).toBeTruthy();
19
19
  expect(container.querySelectorAll('ul')).toHaveLength(1);
20
- expect(container.querySelectorAll('li')).toHaveLength(5);
20
+ expect(container.querySelectorAll('li')).toHaveLength(6);
21
21
  });
22
22
  });
23
23
 
@@ -17,7 +17,7 @@ describe('Operator template one two component', () => {
17
17
  expect(getByText('100% Bonus')).toBeTruthy();
18
18
  expect(getByText('+ Big Promotions')).toBeTruthy();
19
19
  expect(container.querySelectorAll('ul')).toHaveLength(1);
20
- expect(container.querySelectorAll('li')).toHaveLength(5);
20
+ expect(container.querySelectorAll('li')).toHaveLength(6);
21
21
  });
22
22
 
23
23
  test('Template Two Status Active', () => {
@@ -29,7 +29,7 @@ describe('Operator template one two component', () => {
29
29
  expect(getByText('100% Bonus')).toBeTruthy();
30
30
  expect(getByText('+ Big Promotions')).toBeTruthy();
31
31
  expect(container.querySelectorAll('ul')).toHaveLength(1);
32
- expect(container.querySelectorAll('li')).toHaveLength(5);
32
+ expect(container.querySelectorAll('li')).toHaveLength(6);
33
33
  });
34
34
  });
35
35
 
@@ -17,7 +17,7 @@ describe('Operator template three component', () => {
17
17
  expect(getByText('100% Bonus')).toBeTruthy();
18
18
  expect(getByText('+ Big Promotions')).toBeTruthy();
19
19
  expect(container.querySelectorAll('ul')).toHaveLength(1);
20
- expect(container.querySelectorAll('li')).toHaveLength(5);
20
+ expect(container.querySelectorAll('li')).toHaveLength(6);
21
21
  });
22
22
  });
23
23
 
@@ -0,0 +1,80 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { imagePrettyUrl, getAltText } from 'gatsby-core-theme/src/helpers/getters';
4
+ import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
5
+ import Rating from '../../../../../atoms/rating';
6
+ import OperatorBanner from '../../../../../atoms/header-operator-bannner';
7
+ import styles from './template-four.module.scss';
8
+
9
+ const TemplateFour = ({
10
+ relation,
11
+ type,
12
+ image,
13
+ name,
14
+ sections = {},
15
+ pageTemplate,
16
+ icon,
17
+ numOfStars = 5,
18
+ }) => {
19
+ const headerBonus = sections?.header?.modules?.find((bonus) => bonus?.name === 'bonus');
20
+
21
+ return (
22
+ <div className={styles.container}>
23
+ <div className={styles.topSection}>
24
+ <LazyImage
25
+ loading="eager"
26
+ src={imagePrettyUrl(image?.filename, 300, 300)}
27
+ width={300}
28
+ height={300}
29
+ alt={getAltText(image, relation?.name)}
30
+ />
31
+ </div>
32
+ <div className={styles.bottomSection}>
33
+ <div className={styles.name}>
34
+ <h1>{name}</h1>
35
+ <LazyImage
36
+ src={icon || '../../../../../../images/verify.svg'}
37
+ loading="eager"
38
+ alt="Verified"
39
+ width={24}
40
+ height={24}
41
+ />
42
+ </div>
43
+ <div className={styles.ratings}>
44
+ <Rating item={relation} type={type} numOfStars={numOfStars} />
45
+ </div>
46
+ {headerBonus && (
47
+ <OperatorBanner
48
+ logo={
49
+ headerBonus?.value?.standardised_logo_url_object ||
50
+ headerBonus?.value?.logo_url_object
51
+ }
52
+ operator={headerBonus?.value}
53
+ template={pageTemplate}
54
+ />
55
+ )}
56
+ </div>
57
+ </div>
58
+ );
59
+ };
60
+
61
+ TemplateFour.propTypes = {
62
+ relation: PropTypes.shape({
63
+ type: PropTypes.string,
64
+ template: PropTypes.string,
65
+ name: PropTypes.string,
66
+ rating: PropTypes.string,
67
+ status: PropTypes.string,
68
+ }),
69
+ sections: PropTypes.shape({}),
70
+ name: PropTypes.string,
71
+ type: PropTypes.string,
72
+ image: PropTypes.shape({
73
+ filename: PropTypes.string,
74
+ }),
75
+ pageTemplate: PropTypes.string,
76
+ numOfStars: PropTypes.number,
77
+ icon: PropTypes.node,
78
+ };
79
+
80
+ export default TemplateFour;
@@ -0,0 +1,195 @@
1
+ .container {
2
+ display: grid;
3
+ grid-template-columns: 1fr;
4
+ position: relative;
5
+ background: #FFFFFF;
6
+ border: 1.5px solid #E9E9E9;
7
+ border-radius: 1.6rem;
8
+ max-width: var(--main-container-max, 96rem);
9
+
10
+ @include min(tablet) {
11
+ margin-top: auto;
12
+ grid-template-columns: auto 1fr;
13
+ min-height: 36.4rem;
14
+ }
15
+
16
+ @include min(laptop) {
17
+ margin: 0 auto;
18
+ margin-top: var(--operator-template-four-margin-top-desktop, 1.6rem);
19
+ margin-bottom: var(--operator-template-four-margin-bottom-desktop, 1.6rem);
20
+ }
21
+ }
22
+
23
+ .topSection {
24
+ display: flex;
25
+ justify-content: center;
26
+ position: relative;
27
+
28
+ >img {
29
+ position: relative;
30
+ bottom: 2.4rem;
31
+ width: 14rem;
32
+ height: 14rem;
33
+ background-color: white;
34
+ border: 1.5px solid #E9E9E9;
35
+ filter: drop-shadow(4px 4px 12px rgba(0, 0, 0, 0.1));
36
+ border-radius: 1.6rem;
37
+
38
+ @include min(tablet) {
39
+ width: 25rem;
40
+ height: 25rem;
41
+ right: 0rem;
42
+ bottom: unset;
43
+ }
44
+
45
+
46
+ @include min(laptop) {
47
+ width: 30rem;
48
+ height: 30rem;
49
+ right: 4rem;
50
+ }
51
+ }
52
+
53
+ @include min(tablet) {
54
+ justify-content: unset;
55
+ align-items: center;
56
+ padding-left: 1rem;
57
+ }
58
+
59
+ @include min(laptop) {
60
+ padding-left: 0rem;
61
+ }
62
+ }
63
+
64
+ .bottomSection {
65
+ padding: 2.4rem 1.6rem;
66
+ padding-top: 0rem;
67
+ margin-top: -0.8rem;
68
+
69
+ >div:nth-child(3) {
70
+ margin-top: 1.6rem;
71
+
72
+ >a>svg {
73
+ display: none;
74
+ height: 1.4rem;
75
+ width: 1.4rem;
76
+
77
+ @include min(tablet) {
78
+ display: inline;
79
+ }
80
+ }
81
+
82
+ @include min(tablet) {
83
+ grid-template-columns: 2fr 1fr;
84
+
85
+ >img {
86
+ display: none;
87
+ }
88
+
89
+ margin-top: 0rem;
90
+ }
91
+
92
+ }
93
+
94
+ @include min(tablet) {
95
+ display: flex;
96
+ flex-direction: column;
97
+ gap: 2.3rem;
98
+ padding: 1.6rem;
99
+ padding-left: 0rem;
100
+ margin-left: 2rem;
101
+ margin-top: 0rem;
102
+ }
103
+
104
+ @include min(laptop) {
105
+ padding: 3.2rem;
106
+ padding-left: 0.8rem;
107
+ margin-left: 0rem;
108
+ }
109
+ }
110
+
111
+ .name {
112
+ display: flex;
113
+ justify-content: center;
114
+ padding-bottom: 1.6rem;
115
+
116
+ >h1 {
117
+ margin: 0;
118
+ font-weight: 700;
119
+ font-size: 2.4rem;
120
+ line-height: 3.4rem;
121
+ color: #1C1A28;
122
+ text-align: center;
123
+ text-transform: capitalize;
124
+
125
+ @include min(tablet) {
126
+ font-size: 3.2rem;
127
+ line-height: 4.2rem;
128
+ text-align: start;
129
+ }
130
+ }
131
+
132
+ >img {
133
+ margin-left: 0.8rem;
134
+ color: #165AF8;
135
+ flex: none;
136
+ width: 1.6rem;
137
+ height: 1.6rem;
138
+ margin-left: .4rem;
139
+
140
+ @include min(tablet) {
141
+ width: 2.4rem;
142
+ height: 2.4rem;
143
+ margin-left: .8rem;
144
+
145
+ }
146
+ }
147
+
148
+ @include min(tablet) {
149
+ padding-bottom: 0rem;
150
+ margin-top: 1.8rem;
151
+ justify-content: flex-start;
152
+ width: 70%;
153
+ }
154
+ }
155
+
156
+ .ratings {
157
+ display: grid;
158
+ overflow-x: auto;
159
+
160
+ >ul {
161
+ display: flex;
162
+ overflow: scroll;
163
+
164
+ grid-gap: 0.8rem;
165
+
166
+ >li>p:nth-child(2) {
167
+ font-weight: 700;
168
+ font-size: 1.6rem;
169
+ line-height: 2.7rem;
170
+ color: #33313D;
171
+ }
172
+
173
+ @include min(tablet) {
174
+ grid-gap: 1.6rem;
175
+ display: grid;
176
+ overflow: hidden;
177
+ grid-template-columns: 1fr 1fr 1fr;
178
+ }
179
+ }
180
+ }
181
+
182
+ .ratingInactive {
183
+ display: flex;
184
+ align-items: center;
185
+ background-color: #FBFBFB !important;
186
+ color: #6B6A72 !important;
187
+ font-weight: 800;
188
+ font-size: 1.4rem !important;
189
+ line-height: 2.2rem !important;
190
+
191
+ >svg {
192
+ margin-right: 6.32px;
193
+ color: var(--icons-rating-color, #FFDB20);
194
+ }
195
+ }
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import TemplateFour from '.';
3
+ import getPaymentData from '../../../../../../../tests/factories/pages/payment.factory';
4
+ import checkMark from '../../../../../../../storybook-images/verify.svg';
5
+
6
+ const pagePayment = getPaymentData();
7
+
8
+ export default {
9
+ title: 'Matrix-Theme/Layout/Header/Payment/Template Four',
10
+ component: TemplateFour,
11
+ argTypes: {
12
+ type: {
13
+ name: 'Type',
14
+ type: { name: 'String' },
15
+ defaultValue: pagePayment?.type,
16
+ },
17
+ sections: {
18
+ name: 'Sections',
19
+ defaultValue: pagePayment?.sections,
20
+ },
21
+ image: {
22
+ name: 'Image',
23
+ type: { name: 'img' },
24
+ defaultValue: pagePayment?.standardised_logo_filename_object,
25
+ },
26
+ name: {
27
+ name: 'Operator Name',
28
+ type: { name: 'String' },
29
+ defaultValue: pagePayment?.name,
30
+ },
31
+ numOfStars: {
32
+ name: 'Number of Stars',
33
+ type: { name: 'number' },
34
+ defaultValue: pagePayment?.numOfStars,
35
+ },
36
+ relation: {
37
+ name: 'Relation',
38
+ type: { name: 'object' },
39
+ defaultValue: pagePayment?.relation,
40
+ },
41
+ icon: {
42
+ name: 'Icon',
43
+ defaultValue: checkMark,
44
+ },
45
+ },
46
+ };
47
+
48
+ const Template = (args) => <TemplateFour {...args} />;
49
+
50
+ export const Default = Template.bind({});
51
+
52
+ Default.args = {};
@@ -0,0 +1,26 @@
1
+ /* eslint-disable no-multi-assign */
2
+ import React from 'react';
3
+ import { render, cleanup } from '@testing-library/react';
4
+ import '@testing-library/jest-dom/extend-expect';
5
+ import getPaymentData from '../../../../../../../tests/factories/pages/payment.factory';
6
+ import TemplateFour from '.';
7
+
8
+ describe('Payment template four component', () => {
9
+ const data = getPaymentData();
10
+
11
+ test('Template Four Active', () => {
12
+ const { container, getByText } = render(<TemplateFour {...data} />);
13
+ expect(getByText('Next')).toBeTruthy();
14
+ expect(container.querySelectorAll('h1')).toHaveLength(1);
15
+ expect(getByText('20 Free Spins No Deposit Bonus')).toBeTruthy();
16
+ expect(getByText('+ 300% & 555 Spins Welcome Bonus')).toBeTruthy();
17
+ expect(getByText('Play now')).toBeTruthy();
18
+ expect(container.querySelectorAll('a')).toHaveLength(1);
19
+ expect(container.getElementsByClassName('desc')).toBeTruthy();
20
+ expect(container.querySelectorAll('li')).toHaveLength(4);
21
+ });
22
+ });
23
+
24
+ afterEach(() => {
25
+ cleanup();
26
+ });