gatsby-matrix-theme 23.0.3 → 23.0.5

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 (20) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/package.json +1 -1
  3. package/src/components/atoms/cards/operator-card/template-four/index.js +3 -1
  4. package/src/components/atoms/cards/operator-card/template-one/index.js +3 -1
  5. package/src/components/atoms/cards/operator-card/template-three/index.js +3 -1
  6. package/src/components/atoms/cards/operator-card/template-two/index.js +3 -1
  7. package/src/components/atoms/operator-score-gauge/index.js +0 -12
  8. package/src/components/atoms/operator-score-gauge/operator-score-gauge.module.scss +1 -18
  9. package/src/components/molecules/wagering-calculator/index.js +96 -0
  10. package/src/components/molecules/wagering-calculator/wagering-calculator.module.scss +202 -0
  11. package/src/components/molecules/wagering-calculator/wagering-calculator.stories.js +56 -0
  12. package/src/components/molecules/wagering-calculator/wagering-calculator.test.js +54 -0
  13. package/src/gatsby-core-theme/components/molecules/module/index.js +2 -0
  14. package/src/gatsby-core-theme/styles/utils/variables/_colors.scss +1 -0
  15. package/storybook/public/{522.f6eff369.iframe.bundle.js → 134.f050c17b.iframe.bundle.js} +3 -3
  16. package/storybook/public/{522.f6eff369.iframe.bundle.js.map → 134.f050c17b.iframe.bundle.js.map} +1 -1
  17. package/storybook/public/iframe.html +1 -1
  18. package/storybook/public/main.b202a57c.iframe.bundle.js +1 -0
  19. package/storybook/public/main.92859cc5.iframe.bundle.js +0 -1
  20. /package/storybook/public/{522.f6eff369.iframe.bundle.js.LICENSE.txt → 134.f050c17b.iframe.bundle.js.LICENSE.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ## [23.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v23.0.4...v23.0.5) (2023-05-24)
2
+
3
+
4
+ ### Code Refactoring
5
+
6
+ * update wagering calculator calculations and scroll ([5a883e1](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/5a883e1f74a5ca285ec0c7fc1398c35959d2e664))
7
+ * update wagering calculator with classes ([7ec5203](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/7ec5203b05342b1a54c7e2c330da76471fc94736))
8
+
9
+
10
+ * Merge branch 'tm-3094-wagering-calculator' into 'master' ([1b8f484](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1b8f4849e0c0115e6571215092ee8cb6b2165bfa))
11
+
12
+ ## [23.0.4](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v23.0.3...v23.0.4) (2023-05-23)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * added results in wagering calculator ([3813c82](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/3813c829cfc71775ea374179bff698ac4751dcd7))
18
+ * operator cards bug ([a4ebaf7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a4ebaf75f0c8990876bf009f21fa7e81986235e5))
19
+ * wagering fixes ([1f0579b](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/1f0579b73ca7902db9cbd132f67e7479e28aadd0))
20
+ * welcome bonus ([ed68600](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/ed686003b4c87f0099bfe8991845cfed9b4586c5))
21
+
22
+
23
+ ### Code Refactoring
24
+
25
+ * add wagering calculator into modules ([95eaf0e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/95eaf0e6da046854c0d0edc8dc7994f094242d70))
26
+ * update matrix theme with wagering calculator ([d39170e](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/d39170e6832854c137b9b8ceddbb14830bd29cec))
27
+ * update wagering calculator with styles ([79db240](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/79db240bc423d23ee65c70dbef70d50a07c73bc9))
28
+
29
+
30
+ * Merge branch 'welcome-bonus' into 'master' ([0003199](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/0003199313c259058d55c9e3d8cf07590682599d))
31
+ * Merge branch 'tm-3094-wagering-calculator' into 'master' ([00500e9](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/00500e9c9890b910b011dc5e4ef0625911ed94f4))
32
+ * Merge branch 'master' into tm-3094-wagering-calculator ([a25c655](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/a25c655f130ae2733401e48ed83dd417cd5288bd))
33
+
1
34
  ## [23.0.3](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v23.0.2...v23.0.3) (2023-05-18)
2
35
 
3
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "23.0.3",
3
+ "version": "23.0.5",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -57,7 +57,9 @@ const TemplateFour = ({
57
57
  src={imagePrettyUrl(relation?.standardised_logo_url_object?.filename, 88, 88)}
58
58
  alt={getAltText(relation?.standardised_logo_url_object, name)}
59
59
  />
60
- {showRibbon && ribbons.length > 0 && <span className={styles.ribbon}>{ribbons[0]}</span>}
60
+ {showRibbon && ribbons && ribbons.length > 0 && (
61
+ <span className={styles.ribbon}>{ribbons[0]}</span>
62
+ )}
61
63
  </Link>
62
64
  <Link to={reviewPath} title={name} className="operator-card-gtm">
63
65
  {name}
@@ -68,7 +68,9 @@ const TemplateOne = ({
68
68
  src={imagePrettyUrl(relation?.standardised_logo_url_object?.filename, 88, 88)}
69
69
  alt={getAltText(relation?.standardised_logo_url_object, name)}
70
70
  />
71
- {showRibbon && ribbons.length > 0 && <span className={styles.ribbon}>{ribbons[0]}</span>}
71
+ {showRibbon && ribbons && ribbons.length > 0 && (
72
+ <span className={styles.ribbon}>{ribbons[0]}</span>
73
+ )}
72
74
  </Link>
73
75
  <Link to={reviewPath} title={name} className="operator-card-gtm">
74
76
  {name}
@@ -56,7 +56,9 @@ const TemplateThree = ({
56
56
  src={imagePrettyUrl(relation?.standardised_logo_url_object?.filename, 88, 88)}
57
57
  alt={getAltText(relation?.standardised_logo_url_object, name)}
58
58
  />
59
- {showRibbon && ribbons.length > 0 && <span className={styles.ribbon}>{ribbons[0]}</span>}
59
+ {showRibbon && ribbons && ribbons.length > 0 && (
60
+ <span className={styles.ribbon}>{ribbons[0]}</span>
61
+ )}
60
62
  </Link>
61
63
  <Link to={reviewPath} title={name} className="operator-card-gtm">
62
64
  {name}
@@ -63,7 +63,9 @@ const TemplateTwo = ({
63
63
  alt={getAltText(relation?.standardised_logo_url_object, name)}
64
64
  />
65
65
  </Link>
66
- {showRibbon && ribbons.length > 0 && <span className={styles.ribbon}>{ribbons[0]}</span>}
66
+ {showRibbon && ribbons && ribbons.length > 0 && (
67
+ <span className={styles.ribbon}>{ribbons[0]}</span>
68
+ )}
67
69
  </div>
68
70
  <div className={styles?.cardContentTop || ''}>
69
71
  <Link to={reviewPath} title={name} className="operator-card-gtm">
@@ -15,18 +15,6 @@ const OperatorScoreGauge = ({ operator, onHeader = false }) => {
15
15
  startGradientColor={onHeader ? '#4ecdc4' : '#ccced9'}
16
16
  endGradientColor={onHeader ? '#1a535c' : '#4ecdc4'}
17
17
  />
18
- <div className={`${styles?.backCircle || ''} ${styles?.textCircle || ''}`}>
19
- <CircleRating
20
- rating={rating}
21
- radius={onHeader ? 150 : 230}
22
- strokeWidth={onHeader ? '22' : '45'}
23
- gradientId={onHeader ? 'diagonal-gradient' : 'white-diagonal'}
24
- backgroundColor={onHeader ? '' : '#082030'}
25
- />
26
- <span className={styles?.ratingText || ''}>
27
- <span>{rating}</span>/10
28
- </span>
29
- </div>
30
18
  <div className={`${styles?.frontCircle || ''} ${styles?.textCircle || ''}`}>
31
19
  <CircleRating
32
20
  rating={rating}
@@ -21,24 +21,7 @@
21
21
  position: absolute;
22
22
  }
23
23
 
24
- .backCircle {
25
- opacity: 0.1;
26
- position: absolute;
27
- display: none;
28
- svg {
29
- height: 50rem;
30
- width: 50rem;
31
-
32
- circle {
33
- cx: 260;
34
- }
35
- }
36
-
37
- .ratingText {
38
- font-size: 10rem;
39
- color: #ccced9;
40
- }
41
- }
24
+
42
25
  .frontCircle {
43
26
  width: 18rem;
44
27
  height: 18rem;
@@ -0,0 +1,96 @@
1
+ /* eslint-disable no-nested-ternary */
2
+ import React, { useState, useContext } from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import { MdClose } from '@react-icons/all-files/md/MdClose';
5
+ import { AiOutlineQuestionCircle } from '@react-icons/all-files/ai/AiOutlineQuestionCircle';
6
+ import { Context } from 'gatsby-core-theme/src/context/MainProvider';
7
+ import { translate } from 'gatsby-core-theme/src/helpers/getters';
8
+ import Button from 'gatsby-core-theme/src/components/atoms/button';
9
+ import styles from './wagering-calculator.module.scss';
10
+
11
+ const WageringCalculator = ({
12
+ mainTitle = 'Wagering Requirement Calculator',
13
+ infoIcon,
14
+ infoTitle,
15
+ infoText,
16
+ }) => {
17
+ const [isInfoOpen, setIsInfoOpen] = useState(false);
18
+ const [result, setResult] = useState(null);
19
+ const { translations } = useContext(Context);
20
+ const InfoIcon = infoIcon || AiOutlineQuestionCircle;
21
+
22
+ const Calculate = ({ target: { elements } }) => {
23
+ setResult(
24
+ Math.round(
25
+ (Number(elements.bonus.value) +
26
+ (elements.calc_select.value !== 'bonus' ? Number(elements.deposit.value) : 0)) *
27
+ Number(elements.wagering.value) *
28
+ (100 / (Number(elements.contribution.value) || 1))
29
+ )
30
+ );
31
+ };
32
+
33
+ return (
34
+ <form
35
+ className={styles.container}
36
+ onSubmit={Calculate}
37
+ // eslint-disable-next-line
38
+ action="javascript:void(0);"
39
+ target="_self"
40
+ >
41
+ <h2 className={styles.mainTitle}>
42
+ {mainTitle}
43
+ {infoTitle && infoText && <InfoIcon onClick={() => setIsInfoOpen(true)} />}
44
+ </h2>
45
+ <label className={styles.label} htmlFor="deposit">
46
+ {translate(translations, 'wagecalc_deposit_amount', 'Deposit amount')}
47
+ </label>
48
+ <input className={styles.input} id="deposit" type="number" />
49
+ <label className={styles.label} htmlFor="bonus">
50
+ {translate(translations, 'wagecalc_bonus_amount', 'Bonus amount')}
51
+ </label>
52
+ <input className={styles.input} id="bonus" type="number" />
53
+ <label className={styles.label} htmlFor="wagering">
54
+ {translate(translations, 'wagecalc_wagering', 'Wagering')}
55
+ </label>
56
+ <input className={styles.input} id="wagering" type="number" />
57
+ <select className={styles.select} id="calc_select">
58
+ <option value="bonus">{translate(translations, 'wagecalc_bonus', 'Bonus')}</option>
59
+ <option value="bonus_deposit">
60
+ {translate(translations, 'wagecalc_deposit_bonus', 'Deposit + Bonus')}
61
+ </option>
62
+ </select>
63
+ <label className={styles.label} htmlFor="contribution">
64
+ {translate(translations, 'wagecalc_contribution', 'Contribution %')}
65
+ </label>
66
+ <input className={styles.input} id="contribution" type="number" max="100" />
67
+ <Button
68
+ isButton
69
+ primaryColor
70
+ btnText={translate(translations, 'wagecalc_calculate', 'Calculate')}
71
+ />
72
+ {isInfoOpen && (
73
+ <div className={styles.container}>
74
+ <h2 className={styles.infoTitle}>{infoTitle}</h2>
75
+ <MdClose onClick={() => setIsInfoOpen(false)} />
76
+ <p className={styles.infoText}>{infoText}</p>
77
+ </div>
78
+ )}
79
+ {typeof result === 'number' && (
80
+ <div className={styles.resultContainer}>
81
+ <span>{translate(translations, 'wagecalc_result', 'Result')}</span>
82
+ <span>{result}</span>
83
+ </div>
84
+ )}
85
+ </form>
86
+ );
87
+ };
88
+
89
+ WageringCalculator.propTypes = {
90
+ mainTitle: PropTypes.string,
91
+ infoTitle: PropTypes.string,
92
+ infoText: PropTypes.string,
93
+ infoIcon: PropTypes.element,
94
+ };
95
+
96
+ export default WageringCalculator;
@@ -0,0 +1,202 @@
1
+ .container {
2
+ margin: 0 auto;
3
+ padding: 1.6rem;
4
+ max-width: 34.3rem;
5
+ display: flex;
6
+ flex-direction: column;
7
+ border-radius: 1.2rem;
8
+ box-shadow: 0px -3px 14px rgba(0, 0, 0, 0.09);
9
+ background-color: var(--color-4);
10
+ @include min(tablet) {
11
+ padding: 2.4rem;
12
+ max-width: 96rem;
13
+ }
14
+ }
15
+
16
+ form.container {
17
+ position: relative;
18
+ svg {
19
+ margin-left: 1.2rem;
20
+ height: 2.67rem;
21
+ width: 2.67rem;
22
+ vertical-align: text-bottom;
23
+ cursor: pointer;
24
+ }
25
+ button[type='submit'] {
26
+ margin-top: 1.6rem;
27
+ padding: 1.6rem;
28
+ @include min(tablet) {
29
+ width: calc(50% - 1.2rem);
30
+ }
31
+ }
32
+ @include min(tablet) {
33
+ display: flex;
34
+ flex-direction: row;
35
+ flex-wrap: wrap;
36
+ justify-content: space-between;
37
+ }
38
+ }
39
+
40
+ div.container {
41
+ height: 100%;
42
+ position: absolute;
43
+ top: 0;
44
+ left: 0;
45
+ z-index: 3;
46
+ svg {
47
+ position: absolute;
48
+ top: 1.99rem;
49
+ right: 1.99rem;
50
+ cursor: pointer;
51
+ }
52
+ }
53
+
54
+ .mainTitle {
55
+ line-height: 3.4rem;
56
+ font-size: 2.4rem;
57
+ }
58
+
59
+ .infoTitle {
60
+ font-size: 2rem;
61
+ line-height: 3rem;
62
+ }
63
+
64
+ .mainTitle,
65
+ .infoTitle,
66
+ .label {
67
+ font-weight: 700;
68
+ text-transform: capitalize;
69
+ color: var(--color-71);
70
+ }
71
+
72
+ .mainTitle,
73
+ .infoTitle {
74
+ margin-top: 0;
75
+ margin-bottom: 2.4rem;
76
+ width: 100%;
77
+ }
78
+
79
+ .label {
80
+ line-height: 2.6rem;
81
+ font-size: 1.6rem;
82
+ @include min(tablet) {
83
+ margin-top: 1.6rem;
84
+ }
85
+ }
86
+
87
+ .input,
88
+ .select {
89
+ padding: 16px;
90
+ height: 5.9rem;
91
+ background: var(--color-63);
92
+ border-radius: 4px;
93
+ }
94
+
95
+ .input {
96
+ margin: 0.8rem 0;
97
+ }
98
+
99
+ .select {
100
+ margin-top: 3.4rem;
101
+ margin-bottom: 2.4rem;
102
+ }
103
+
104
+ .infoText {
105
+ padding-right: 1.6rem;
106
+ overflow-y: auto;
107
+ text-align: justify;
108
+ }
109
+
110
+ .label,
111
+ .input,
112
+ .select {
113
+ @include min(tablet) {
114
+ width: calc(50% - 1.2rem);
115
+ }
116
+ }
117
+
118
+ @include min(tablet) {
119
+ .label:nth-child(2) {
120
+ order: 1;
121
+ }
122
+ .label:nth-child(4) {
123
+ order: 2;
124
+ }
125
+ .label:nth-child(6) {
126
+ width: 100%;
127
+ order: 5;
128
+ }
129
+ .label:nth-child(9) {
130
+ width: 100%;
131
+ order: 8;
132
+ }
133
+ .input:nth-child(3) {
134
+ order: 3;
135
+ }
136
+ .input:nth-child(5) {
137
+ order: 4;
138
+ }
139
+ .input:nth-child(7) {
140
+ order: 6;
141
+ }
142
+ .input:nth-child(10) {
143
+ margin-bottom: 0;
144
+ order: 9;
145
+ }
146
+ .select {
147
+ margin: 0.8rem 0;
148
+ order: 7;
149
+ }
150
+ form.container button[type='submit'] {
151
+ margin-top: 0.8rem;
152
+ order: 10;
153
+ }
154
+ }
155
+
156
+ .resultContainer {
157
+ position: relative;
158
+ order: 11;
159
+ margin-top: 3.2rem;
160
+ width: 100%;
161
+ @include flex-align(center, space-between);
162
+ padding: 1.6rem;
163
+ color: #090e13;
164
+ font-weight: 700;
165
+ font-size: 24px;
166
+ line-height: 34px;
167
+ flex-direction: column;
168
+ gap: 1rem;
169
+
170
+ @include min(tablet) {
171
+ flex-direction: row;
172
+ gap: 0;
173
+ }
174
+
175
+ &:before {
176
+ content: '';
177
+ border-radius: 12px;
178
+ display: block;
179
+ background-color: var(--primary-color);
180
+ opacity: 0.6;
181
+ position: absolute;
182
+ top: 0;
183
+ right: 0;
184
+ bottom: 0;
185
+ left: 0;
186
+ }
187
+
188
+ > span {
189
+ z-index: 2;
190
+ }
191
+
192
+ > span:last-child {
193
+ flex-basis: 50%;
194
+ background: #ffffff;
195
+ border-radius: 8px;
196
+ font-weight: 700;
197
+ font-size: 28px;
198
+ line-height: 38px;
199
+ padding: 0.8rem;
200
+ @include flex-align(center, center);
201
+ }
202
+ }
@@ -0,0 +1,56 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
2
+ import React from 'react';
3
+ import { Context } from 'gatsby-core-theme/src/context/MainProvider';
4
+ import { AiOutlineQuestionCircle } from '@react-icons/all-files/ai/AiOutlineQuestionCircle';
5
+ import WageringCalculator from '.';
6
+
7
+ export default {
8
+ title: 'Matrix-Theme/Modules/Template Blocks/Wagering Calculator',
9
+ component: WageringCalculator,
10
+ argTypes: {
11
+ mainTitle: {
12
+ name: 'mainTitle',
13
+ type: { name: 'string', required: false },
14
+ description: 'Main Block Title',
15
+ defaultValue: 'Wagering Requirement Calculator',
16
+ },
17
+ infoIcon: {
18
+ name: 'infoIcon',
19
+ type: { name: 'object', required: false },
20
+ description: 'Info Block Icon',
21
+ defaultValue: AiOutlineQuestionCircle,
22
+ },
23
+ infoTitle: {
24
+ name: 'infoTitle',
25
+ type: { name: 'string', required: false },
26
+ description: 'Info Block Title',
27
+ defaultValue: 'Example: 20x wagering requirement',
28
+ },
29
+ infoText: {
30
+ name: 'infoText',
31
+ type: { name: 'string', required: false },
32
+ description: 'Info Block Text',
33
+ defaultValue:
34
+ 'Lorem ipsum dolor sit amet consectetur. Pharetra sed etiam placerat interdum ut. Pretium ipsum ultrices interdum condimentum nullam. Suscipit augue placerat laoreet hendrerit dui euismod quam rutrum. Magna in luctus egestas massa erat. Lorem ipsum dolor sit amet consectetur. Pharetra sed etiam placerat interdum ut. Pretium ipsum ultrices interdum condimentum nullam. Suscipit augue placerat laoreet hendrerit dui euismod quam rutrum. Magna in luctus egestas massa erat. Lorem ipsum dolor sit amet consectetur. Pharetra sed etiam placerat interdum ut. Pretium ipsum ultrices interdum condimentum nullam. Suscipit augue placerat laoreet hendrerit dui euismod quam rutrum. Magna in luctus egestas massa erat. Lorem ipsum dolor sit amet consectetur. Pharetra sed etiam placerat interdum ut. Pretium ipsum ultrices interdum condimentum nullam. Suscipit augue placerat laoreet hendrerit dui euismod quam rutrum. Magna in luctus egestas massa erat.',
35
+ },
36
+ },
37
+ };
38
+
39
+ const Template = (args) => (
40
+ <Context.Provider value={{}}>
41
+ <WageringCalculator {...args} />
42
+ </Context.Provider>
43
+ );
44
+
45
+ export const Default = Template.bind({});
46
+ Default.args = {
47
+ translations: {
48
+ wagecalc_deposit_amount: 'Deposit amount',
49
+ wagecalc_bonus_amount: 'Bonus amount',
50
+ wagecalc_wagering: 'Wagering',
51
+ wagecalc_bonus: 'Bonus',
52
+ wagecalc_deposit_bonus: 'Deposit + Bonus',
53
+ wagecalc_contribution: 'Contribution %',
54
+ wagecalc_calculate: 'Calculate',
55
+ },
56
+ };
@@ -0,0 +1,54 @@
1
+ /* eslint-disable no-multi-assign */
2
+ import React from 'react';
3
+ import { render, cleanup, fireEvent, waitFor } from '@testing-library/react';
4
+ import '@testing-library/jest-dom/extend-expect';
5
+ import { MdInfo } from '@react-icons/all-files/md/MdInfo';
6
+ import MainProvider from '~context/MainProvider';
7
+ import WageringCalculator from '.';
8
+
9
+ const props = {
10
+ mainTitle: 'Test Main Title',
11
+ infoTitle: 'Test Info Title',
12
+ infoText: 'Test Info Text',
13
+ infoIcon: MdInfo,
14
+ };
15
+
16
+ describe('Wagering Calculator', () => {
17
+ test('Template Block', async () => {
18
+ const { container, getByText, queryByText } = render(
19
+ <MainProvider value={{}}>
20
+ <WageringCalculator {...props} />
21
+ </MainProvider>
22
+ );
23
+
24
+ expect(getByText('Test Main Title')).toBeTruthy();
25
+
26
+ const infoIcon = container.querySelector('svg');
27
+ fireEvent.click(infoIcon);
28
+ expect(getByText('Test Info Title')).toBeTruthy();
29
+ expect(getByText('Test Info Text')).toBeTruthy();
30
+
31
+ const icons = container.querySelectorAll('svg');
32
+ fireEvent.click(icons[1]);
33
+ expect(queryByText('Test Info Title')).not.toBeInTheDocument();
34
+ expect(queryByText('Test Info Text')).not.toBeInTheDocument();
35
+
36
+ const inputs = container.querySelectorAll('input');
37
+ inputs.forEach((input, i) => {
38
+ input.value = i + 1;
39
+ });
40
+ expect(container.querySelector('.resultContainer')).toBeFalsy();
41
+ const calculate = container.querySelector('button');
42
+ fireEvent.click(calculate);
43
+ const select = container.querySelector('select');
44
+ select.selectedIndex = 1;
45
+ fireEvent.click(calculate);
46
+ await waitFor(() => {
47
+ expect(container.querySelector('.resultContainer')).toBeTruthy();
48
+ });
49
+ });
50
+ });
51
+
52
+ afterEach(() => {
53
+ cleanup();
54
+ });
@@ -94,6 +94,8 @@ const Modules = ({ module, page, pageContext, index, exclOperator }) => {
94
94
  return loadable(() => import('../../../../components/molecules/game-score-gauge'));
95
95
  case 'newsletter_optin':
96
96
  return loadable(() => import('../../../../components/molecules/newsletter-optin'));
97
+ case 'wagering_calculator':
98
+ return loadable(() => import('../../../../components/molecules/wagering-calculator'));
97
99
  default:
98
100
  return null;
99
101
  }
@@ -61,6 +61,7 @@
61
61
  --color-60: var(--color-58);
62
62
  --color-61: #5545A9;
63
63
  --color-62: #131313;
64
+ --color-63: #f8f7f5;
64
65
 
65
66
  //feedback-module
66
67
  --color-70: #9747ff;