@comicrelief/component-library 7.20.0 → 7.22.0
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/cypress/{integration/components/atoms/button.spec.js → e2e/components/atoms/button.cy.js} +4 -15
- package/cypress/{integration/components/atoms/buttonWithStates.spec.js → e2e/components/atoms/buttonWithStates.cy.js} +5 -11
- package/cypress/{integration/components/atoms/checkbox.spec.js → e2e/components/atoms/checkbox.cy.js} +2 -0
- package/cypress/{integration/components/atoms/confetti.spec.js → e2e/components/atoms/confetti.cy.js} +2 -8
- package/cypress/{integration/components/atoms/errorText.spec.js → e2e/components/atoms/errorText.cy.js} +1 -7
- package/cypress/{integration/components/atoms/input.spec.js → e2e/components/atoms/input.cy.js} +4 -14
- package/cypress/{integration/components/atoms/label.spec.js → e2e/components/atoms/label.cy.js} +3 -14
- package/cypress/{integration/components/atoms/link.spec.js → e2e/components/atoms/link.cy.js} +4 -21
- package/cypress/{integration/components/atoms/logo.spec.js → e2e/components/atoms/logo.cy.js} +4 -21
- package/cypress/{integration/components/atoms/pagination.spec.js → e2e/components/atoms/pagination.cy.js} +5 -28
- package/cypress/{integration/components/atoms/picture.spec.js → e2e/components/atoms/picture.cy.js} +4 -21
- package/cypress/{integration/components/atoms/radioButton.spec.js → e2e/components/atoms/radioButton.cy.js} +2 -7
- package/cypress/{integration/components/atoms/richText.spec.js → e2e/components/atoms/richText.cy.js} +2 -7
- package/cypress/{integration/components/atoms/select.spec.js → e2e/components/atoms/select.cy.js} +2 -7
- package/cypress/{integration/components/atoms/socialIcons.spec.js → e2e/components/atoms/socialIcons.cy.js} +4 -21
- package/cypress/{integration/components/atoms/text.spec.js → e2e/components/atoms/text.cy.js} +3 -14
- package/cypress/{integration/components/atoms/textArea.spec.js → e2e/components/atoms/textArea.cy.js} +2 -4
- package/cypress/{integration/components/atoms/textInputWithDrop.spec.js → e2e/components/atoms/textInputWithDrop.cy.js} +2 -4
- package/cypress/{integration/components/molecules/accordion.spec.js → e2e/components/molecules/accordion.cy.js} +2 -7
- package/cypress/{integration/components/molecules/articleTeaser.spec.js → e2e/components/molecules/articleTeaser.cy.js} +2 -7
- package/cypress/{integration/components/molecules/banner.spec.js → e2e/components/molecules/banner.cy.js} +2 -7
- package/cypress/{integration/components/molecules/box.spec.js → e2e/components/molecules/box.cy.js} +3 -11
- package/cypress/{integration/components/molecules/card.spec.js → e2e/components/molecules/card.cy.js} +3 -11
- package/cypress/{integration/components/molecules/cardDs.spec.js → e2e/components/molecules/cardDs.cy.js} +5 -30
- package/cypress/{integration/components/molecules/chip.spec.js → e2e/components/molecules/chip.cy.js} +2 -4
- package/cypress/{integration/components/molecules/countdown.spec.js → e2e/components/molecules/countdown.cy.js} +2 -4
- package/cypress/{integration/components/molecules/descriptor.spec.js → e2e/components/molecules/descriptor.cy.js} +3 -8
- package/cypress/{integration/components/molecules/doubleCopy.spec.js → e2e/components/molecules/doubleCopy.cy.js} +2 -4
- package/cypress/{integration/components/molecules/heroBanner.spec.js → e2e/components/molecules/heroBanner.cy.js} +2 -4
- package/cypress/{integration/components/molecules/infoBanner.spec.js → e2e/components/molecules/infoBanner.cy.js} +2 -4
- package/cypress/{integration/components/molecules/partnerLink.spec.js → e2e/components/molecules/partnerLink.cy.js} +2 -4
- package/cypress/{integration/components/molecules/promo.spec.js → e2e/components/molecules/promo.cy.js} +2 -4
- package/cypress/{integration/components/molecules/schoolLookup.spec.js → e2e/components/molecules/schoolLookup.cy.js} +3 -4
- package/cypress/{integration/components/molecules/searchInput.spec.js → e2e/components/molecules/searchInput.cy.js} +2 -4
- package/cypress/{integration/components/molecules/searchResult.spec.js → e2e/components/molecules/searchResult.cy.js} +5 -16
- package/cypress/{integration/components/molecules/shareButton.spec.js → e2e/components/molecules/shareButton.cy.js} +2 -4
- package/cypress/{integration/components/molecules/simpleSchoolLookup.spec.js → e2e/components/molecules/simpleSchoolLookup.cy.js} +3 -4
- package/cypress/{integration/components/molecules/singleMessage.spec.js → e2e/components/molecules/singleMessage.cy.js} +14 -49
- package/cypress/{integration/components/molecules/singleMessageDs.spec.js → e2e/components/molecules/singleMessageDs.cy.js} +6 -20
- package/cypress/{integration/components/molecules/typeahead.spec.js → e2e/components/molecules/typeahead.cy.js} +3 -4
- package/cypress/{integration/components/molecules/videoBanner.spec.js → e2e/components/molecules/videoBanner.cy.js} +4 -12
- package/cypress/{integration/components/organisms/cookieBanner.spec.js → e2e/components/organisms/cookieBanner.cy.js} +2 -4
- package/cypress/{integration/components/organisms/donate.spec.js → e2e/components/organisms/donate.cy.js} +5 -16
- package/cypress/{integration/components/organisms/emailSignUp.spec.js → e2e/components/organisms/emailSignUp.cy.js} +1 -4
- package/cypress/{integration/components/organisms/footer.spec.js → e2e/components/organisms/footer.cy.js} +2 -0
- package/cypress/{integration/components/organisms/header.spec.js → e2e/components/organisms/header.cy.js} +3 -8
- package/cypress/{integration/components/organisms/marketingPreferencesDSForm.spec.js → e2e/components/organisms/marketingPreferencesDSForm.cy.js} +44 -56
- package/cypress/{integration/components/organisms/membership.spec.js → e2e/components/organisms/membership.cy.js} +3 -8
- package/cypress.config.js +15 -0
- package/dist/components/Atoms/Link/Link.js +5 -5
- package/dist/components/Molecules/Promo/Promo.js +87 -12
- package/dist/components/Molecules/Promo/Promo.md +266 -4
- package/dist/components/Molecules/Promo/Promo.style.js +24 -6
- package/dist/components/Molecules/Promo/Promo.test.js +2 -2
- package/dist/components/Molecules/Promo/_ProgressRing.js +57 -0
- package/dist/components/Molecules/Promo/_PromoVideo.js +116 -0
- package/dist/components/Molecules/Promo/_PromoVideoButton.js +31 -0
- package/dist/components/Molecules/Promo/_PromoVideoButton.style.js +110 -0
- package/dist/components/Molecules/Promo/assets/Pause--black.svg +3 -0
- package/dist/components/Molecules/Promo/assets/Pause--white.svg +3 -0
- package/dist/components/Molecules/Promo/assets/Play--black.svg +3 -0
- package/dist/components/Molecules/Promo/assets/Play--white.svg +3 -0
- package/dist/components/Organisms/Footer/Footer.js +1 -1
- package/dist/components/Organisms/Footer/Footer.md +2 -2
- package/dist/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +2 -2
- package/dist/components/Organisms/Footer/data/data.js +2 -2
- package/dist/components/Organisms/Header/Nav/Nav.js +2 -2
- package/dist/components/Organisms/Header/data/data.js +2 -2
- package/dist/index.js +3 -3
- package/dist/styleguide/assets/mobileVideoPosterImage.png +0 -0
- package/dist/utils/{whiteListed.js → allowListed.js} +4 -4
- package/dist/utils/allowListed.test.js +12 -0
- package/docs/utils.md +4 -4
- package/package.json +2 -2
- package/src/components/Atoms/Link/Link.js +5 -5
- package/src/components/Molecules/Promo/Promo.js +89 -13
- package/src/components/Molecules/Promo/Promo.md +266 -4
- package/src/components/Molecules/Promo/Promo.style.js +23 -2
- package/src/components/Molecules/Promo/Promo.test.js +2 -2
- package/src/components/Molecules/Promo/_ProgressRing.js +43 -0
- package/src/components/Molecules/Promo/_PromoVideo.js +105 -0
- package/src/components/Molecules/Promo/_PromoVideoButton.js +26 -0
- package/src/components/Molecules/Promo/_PromoVideoButton.style.js +121 -0
- package/src/components/Molecules/Promo/assets/Pause--black.svg +3 -0
- package/src/components/Molecules/Promo/assets/Pause--white.svg +3 -0
- package/src/components/Molecules/Promo/assets/Play--black.svg +3 -0
- package/src/components/Molecules/Promo/assets/Play--white.svg +3 -0
- package/src/components/Organisms/Footer/Footer.js +2 -2
- package/src/components/Organisms/Footer/Footer.md +2 -2
- package/src/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +2 -2
- package/src/components/Organisms/Footer/data/data.js +2 -2
- package/src/components/Organisms/Header/Nav/Nav.js +2 -2
- package/src/components/Organisms/Header/data/data.js +2 -2
- package/src/index.js +1 -1
- package/src/styleguide/assets/mobileVideoPosterImage.png +0 -0
- package/src/utils/{whiteListed.js → allowListed.js} +6 -5
- package/src/utils/allowListed.test.js +9 -0
- package/cypress.json +0 -6
- package/dist/utils/whiteListed.test.js +0 -12
- package/src/utils/whiteListed.test.js +0 -9
- /package/cypress/support/{index.js → e2e.js} +0 -0
|
@@ -6,6 +6,7 @@ describe('SocialIcons component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#socialicons');
|
|
9
10
|
cy.get('[data-testid="SocialIcons-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('SocialIcons component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Comic Relief social icons section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#socialicons');
|
|
38
40
|
cy.get('[data-testid="SocialIcons-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="SocialIcons"]')
|
|
@@ -72,17 +74,11 @@ describe('SocialIcons component', () => {
|
|
|
72
74
|
.find('textarea')
|
|
73
75
|
.should('exist');
|
|
74
76
|
});
|
|
75
|
-
|
|
76
|
-
it('closes code on click', () => {
|
|
77
|
-
cy.get('@viewCodeBtn').click();
|
|
78
|
-
cy.get('@container')
|
|
79
|
-
.find('textarea')
|
|
80
|
-
.should('not.exist');
|
|
81
|
-
});
|
|
82
77
|
});
|
|
83
78
|
|
|
84
79
|
describe('Red Nose Day social icons section', () => {
|
|
85
80
|
beforeEach(() => {
|
|
81
|
+
cy.visit('/#socialicons');
|
|
86
82
|
cy.get('[data-testid="SocialIcons-example-3"]')
|
|
87
83
|
.as('container')
|
|
88
84
|
.find('[data-preview="SocialIcons"]')
|
|
@@ -120,17 +116,11 @@ describe('SocialIcons component', () => {
|
|
|
120
116
|
.find('textarea')
|
|
121
117
|
.should('exist');
|
|
122
118
|
});
|
|
123
|
-
|
|
124
|
-
it('closes code on click', () => {
|
|
125
|
-
cy.get('@viewCodeBtn').click();
|
|
126
|
-
cy.get('@container')
|
|
127
|
-
.find('textarea')
|
|
128
|
-
.should('not.exist');
|
|
129
|
-
});
|
|
130
119
|
});
|
|
131
120
|
|
|
132
121
|
describe('Sport Relief social icons section', () => {
|
|
133
122
|
beforeEach(() => {
|
|
123
|
+
cy.visit('/#socialicons');
|
|
134
124
|
cy.get('[data-testid="SocialIcons-example-5"]')
|
|
135
125
|
.as('container')
|
|
136
126
|
.find('[data-preview="SocialIcons"]')
|
|
@@ -168,12 +158,5 @@ describe('SocialIcons component', () => {
|
|
|
168
158
|
.find('textarea')
|
|
169
159
|
.should('exist');
|
|
170
160
|
});
|
|
171
|
-
|
|
172
|
-
it('closes code on click', () => {
|
|
173
|
-
cy.get('@viewCodeBtn').click();
|
|
174
|
-
cy.get('@container')
|
|
175
|
-
.find('textarea')
|
|
176
|
-
.should('not.exist');
|
|
177
|
-
});
|
|
178
161
|
});
|
|
179
162
|
});
|
package/cypress/{integration/components/atoms/text.spec.js → e2e/components/atoms/text.cy.js}
RENAMED
|
@@ -6,6 +6,7 @@ describe('Text component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#text');
|
|
9
10
|
cy.get('[data-testid="Text-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Text component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Text section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#text');
|
|
38
40
|
cy.get('[data-testid="Text-example-0"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Text"]')
|
|
@@ -94,17 +96,11 @@ describe('Text component', () => {
|
|
|
94
96
|
.find('textarea')
|
|
95
97
|
.should('exist');
|
|
96
98
|
});
|
|
97
|
-
|
|
98
|
-
it('closes code on click', () => {
|
|
99
|
-
cy.get('@viewCodeBtn').click();
|
|
100
|
-
cy.get('@container')
|
|
101
|
-
.find('textarea')
|
|
102
|
-
.should('not.exist');
|
|
103
|
-
});
|
|
104
99
|
});
|
|
105
100
|
|
|
106
101
|
describe('Text section', () => {
|
|
107
102
|
beforeEach(() => {
|
|
103
|
+
cy.visit('/#text');
|
|
108
104
|
cy.get('[data-testid="Text-example-2"]')
|
|
109
105
|
.as('container')
|
|
110
106
|
.find('[data-preview="Text"]')
|
|
@@ -169,12 +165,5 @@ describe('Text component', () => {
|
|
|
169
165
|
.find('textarea')
|
|
170
166
|
.should('exist');
|
|
171
167
|
});
|
|
172
|
-
|
|
173
|
-
it('closes code on click', () => {
|
|
174
|
-
cy.get('@viewCodeBtn').click();
|
|
175
|
-
cy.get('@container')
|
|
176
|
-
.find('textarea')
|
|
177
|
-
.should('not.exist');
|
|
178
|
-
});
|
|
179
168
|
});
|
|
180
169
|
});
|
|
@@ -6,6 +6,7 @@ describe('TextArea component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#textarea');
|
|
9
10
|
cy.get('[data-testid="TextArea-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('TextArea component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Text Area section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#textarea');
|
|
38
40
|
cy.get('[data-testid="TextArea-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="TextArea"]')
|
|
@@ -83,9 +85,5 @@ describe('TextArea component', () => {
|
|
|
83
85
|
.find('textarea')
|
|
84
86
|
.should('exist');
|
|
85
87
|
});
|
|
86
|
-
|
|
87
|
-
it('closes code on click', () => {
|
|
88
|
-
cy.get('@viewCodeBtn').click();
|
|
89
|
-
});
|
|
90
88
|
});
|
|
91
89
|
});
|
|
@@ -6,6 +6,7 @@ describe('Text Input With Dropdown component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#textinputwithdropdown');
|
|
9
10
|
cy.get('[data-testid="TextInputWithDropdown-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Text Input With Dropdown component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('TextInputWithDropdown section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#textinputwithdropdown');
|
|
38
40
|
cy.get('[data-testid="TextInputWithDropdown-examples"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="TextInputWithDropdown"]')
|
|
@@ -70,9 +72,5 @@ describe('Text Input With Dropdown component', () => {
|
|
|
70
72
|
.find('textarea')
|
|
71
73
|
.should('exist');
|
|
72
74
|
});
|
|
73
|
-
|
|
74
|
-
it('closes code on click', () => {
|
|
75
|
-
cy.get('@viewCodeBtn').click();
|
|
76
|
-
});
|
|
77
75
|
});
|
|
78
76
|
});
|
|
@@ -6,6 +6,7 @@ describe('Accordion component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#accordion');
|
|
9
10
|
cy.get('[data-testid="Accordion-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Accordion component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Accordion section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#accordion');
|
|
38
40
|
cy.get('[data-testid="Accordion-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Accordion"]')
|
|
@@ -61,12 +63,5 @@ describe('Accordion component', () => {
|
|
|
61
63
|
.find('textarea')
|
|
62
64
|
.should('exist');
|
|
63
65
|
});
|
|
64
|
-
|
|
65
|
-
it('closes code on click', () => {
|
|
66
|
-
cy.get('@viewCodeBtn').click();
|
|
67
|
-
cy.get('@container')
|
|
68
|
-
.find('textarea')
|
|
69
|
-
.should('not.exist');
|
|
70
|
-
});
|
|
71
66
|
});
|
|
72
67
|
});
|
|
@@ -6,6 +6,7 @@ describe('ArticleTeaser component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#articleteaser');
|
|
9
10
|
cy.get('[data-testid="ArticleTeaser-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('ArticleTeaser component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Article Teaser section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#articleteaser');
|
|
38
40
|
cy.get('[data-testid="ArticleTeaser-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="ArticleTeaser"]')
|
|
@@ -99,12 +101,5 @@ describe('ArticleTeaser component', () => {
|
|
|
99
101
|
.find('textarea')
|
|
100
102
|
.should('exist');
|
|
101
103
|
});
|
|
102
|
-
|
|
103
|
-
it('closes code on click', () => {
|
|
104
|
-
cy.get('@viewCodeBtn').click();
|
|
105
|
-
cy.get('@container')
|
|
106
|
-
.find('textarea')
|
|
107
|
-
.should('not.exist');
|
|
108
|
-
});
|
|
109
104
|
});
|
|
110
105
|
});
|
|
@@ -6,6 +6,7 @@ describe('Banner component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#banner');
|
|
9
10
|
cy.get('[data-testid="Banner-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Banner component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Banner section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#banner');
|
|
38
40
|
cy.get('[data-testid="Banner-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Banner"]')
|
|
@@ -61,12 +63,5 @@ describe('Banner component', () => {
|
|
|
61
63
|
.find('textarea')
|
|
62
64
|
.should('exist');
|
|
63
65
|
});
|
|
64
|
-
|
|
65
|
-
it('closes code on click', () => {
|
|
66
|
-
cy.get('@viewCodeBtn').click();
|
|
67
|
-
cy.get('@container')
|
|
68
|
-
.find('textarea')
|
|
69
|
-
.should('not.exist');
|
|
70
|
-
});
|
|
71
66
|
});
|
|
72
67
|
});
|
package/cypress/{integration/components/molecules/box.spec.js → e2e/components/molecules/box.cy.js}
RENAMED
|
@@ -6,6 +6,7 @@ describe('Box component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#box');
|
|
9
10
|
cy.get('[data-testid="Box-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Box component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Box example 1 section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#box');
|
|
38
40
|
cy.get('[data-testid="Box-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Box"]')
|
|
@@ -67,14 +69,11 @@ describe('Box component', () => {
|
|
|
67
69
|
.find('textarea')
|
|
68
70
|
.should('exist');
|
|
69
71
|
});
|
|
70
|
-
|
|
71
|
-
it('closes code on click', () => {
|
|
72
|
-
cy.get('@viewCodeBtn').click();
|
|
73
|
-
});
|
|
74
72
|
});
|
|
75
73
|
|
|
76
74
|
describe('Box example 3 section', () => {
|
|
77
75
|
beforeEach(() => {
|
|
76
|
+
cy.visit('/#box');
|
|
78
77
|
cy.get('[data-testid="Box-example-3"]')
|
|
79
78
|
.as('container')
|
|
80
79
|
.find('[data-preview="Box"]')
|
|
@@ -101,12 +100,5 @@ describe('Box component', () => {
|
|
|
101
100
|
.find('textarea')
|
|
102
101
|
.should('exist');
|
|
103
102
|
});
|
|
104
|
-
|
|
105
|
-
it('closes code on click', () => {
|
|
106
|
-
cy.get('@viewCodeBtn').click();
|
|
107
|
-
cy.get('@container')
|
|
108
|
-
.find('textarea')
|
|
109
|
-
.should('not.exist');
|
|
110
|
-
});
|
|
111
103
|
});
|
|
112
104
|
});
|
|
@@ -7,6 +7,7 @@ describe('Card component', () => {
|
|
|
7
7
|
|
|
8
8
|
describe('props and methods section', () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
cy.visit('/#card');
|
|
10
11
|
cy.get('[data-testid="Card-container"] button[name="rsg-usage"]')
|
|
11
12
|
.contains('Props & methods')
|
|
12
13
|
.as('propsBtn');
|
|
@@ -36,6 +37,7 @@ describe('Card component', () => {
|
|
|
36
37
|
|
|
37
38
|
describe('Card example 1 section', () => {
|
|
38
39
|
beforeEach(() => {
|
|
40
|
+
cy.visit('/#card');
|
|
39
41
|
cy.get('[data-testid="Card-example-1"]')
|
|
40
42
|
.as('container')
|
|
41
43
|
.find('[data-preview="Card"]')
|
|
@@ -68,14 +70,11 @@ describe('Card component', () => {
|
|
|
68
70
|
.find('textarea')
|
|
69
71
|
.should('exist');
|
|
70
72
|
});
|
|
71
|
-
|
|
72
|
-
it('closes code on click', () => {
|
|
73
|
-
cy.get('@viewCodeBtn').click();
|
|
74
|
-
});
|
|
75
73
|
});
|
|
76
74
|
|
|
77
75
|
describe('Card no body section', () => {
|
|
78
76
|
beforeEach(() => {
|
|
77
|
+
cy.visit('/#card');
|
|
79
78
|
cy.get('[data-testid="Card-example-3"]')
|
|
80
79
|
.as('container')
|
|
81
80
|
.find('[data-preview="Card"]')
|
|
@@ -102,12 +101,5 @@ describe('Card component', () => {
|
|
|
102
101
|
.find('textarea')
|
|
103
102
|
.should('exist');
|
|
104
103
|
});
|
|
105
|
-
|
|
106
|
-
it('closes code on click', () => {
|
|
107
|
-
cy.get('@viewCodeBtn').click();
|
|
108
|
-
cy.get('@container')
|
|
109
|
-
.find('textarea')
|
|
110
|
-
.should('not.exist');
|
|
111
|
-
});
|
|
112
104
|
});
|
|
113
105
|
});
|
|
@@ -7,6 +7,7 @@ describe('CardDs component', () => {
|
|
|
7
7
|
|
|
8
8
|
describe('props and methods section', () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
cy.visit('/#cardds');
|
|
10
11
|
cy.get('[data-testid="CardDs-container"] button[name="rsg-usage"]')
|
|
11
12
|
.contains('Props & methods')
|
|
12
13
|
.as('propsBtn');
|
|
@@ -36,6 +37,7 @@ describe('CardDs component', () => {
|
|
|
36
37
|
|
|
37
38
|
describe('CardDs image and CTA section', () => {
|
|
38
39
|
beforeEach(() => {
|
|
40
|
+
cy.visit('/#cardds');
|
|
39
41
|
cy.get('[data-testid="CardDs-example-1"]')
|
|
40
42
|
.as('container')
|
|
41
43
|
.find('[data-preview="CardDs"]')
|
|
@@ -75,14 +77,11 @@ describe('CardDs component', () => {
|
|
|
75
77
|
.find('textarea')
|
|
76
78
|
.should('exist');
|
|
77
79
|
});
|
|
78
|
-
|
|
79
|
-
it('closes code on click', () => {
|
|
80
|
-
cy.get('@viewCodeBtn').click();
|
|
81
|
-
});
|
|
82
80
|
});
|
|
83
81
|
|
|
84
82
|
describe('CardDs no Image with link section', () => {
|
|
85
83
|
beforeEach(() => {
|
|
84
|
+
cy.visit('/#cardds');
|
|
86
85
|
cy.get('[data-testid="CardDs-example-3"]')
|
|
87
86
|
.as('container')
|
|
88
87
|
.find('[data-preview="CardDs"]')
|
|
@@ -122,17 +121,11 @@ describe('CardDs component', () => {
|
|
|
122
121
|
.find('textarea')
|
|
123
122
|
.should('exist');
|
|
124
123
|
});
|
|
125
|
-
|
|
126
|
-
it('closes code on click', () => {
|
|
127
|
-
cy.get('@viewCodeBtn').click();
|
|
128
|
-
cy.get('@container')
|
|
129
|
-
.find('textarea')
|
|
130
|
-
.should('not.exist');
|
|
131
|
-
});
|
|
132
124
|
});
|
|
133
125
|
|
|
134
126
|
describe('CardDs no image no link section', () => {
|
|
135
127
|
beforeEach(() => {
|
|
128
|
+
cy.visit('/#cardds');
|
|
136
129
|
cy.get('[data-testid="CardDs-example-5"]')
|
|
137
130
|
.as('container')
|
|
138
131
|
.find('[data-preview="CardDs"]')
|
|
@@ -161,25 +154,11 @@ describe('CardDs component', () => {
|
|
|
161
154
|
it('has view code button', () => {
|
|
162
155
|
cy.get('@viewCodeBtn').should('exist');
|
|
163
156
|
});
|
|
164
|
-
|
|
165
|
-
it('shows code on click', () => {
|
|
166
|
-
cy.get('@viewCodeBtn').click();
|
|
167
|
-
cy.get('@container')
|
|
168
|
-
.find('textarea')
|
|
169
|
-
.should('exist');
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
it('closes code on click', () => {
|
|
173
|
-
cy.get('@viewCodeBtn').click();
|
|
174
|
-
cy.get('@container')
|
|
175
|
-
.find('textarea')
|
|
176
|
-
.should('not.exist');
|
|
177
|
-
});
|
|
178
157
|
});
|
|
179
158
|
|
|
180
159
|
describe('CardDs image, text, no link', () => {
|
|
181
160
|
beforeEach(() => {
|
|
182
|
-
|
|
161
|
+
cy.visit('/#cardds');
|
|
183
162
|
cy.get('[data-testid="CardDs-example-7"]')
|
|
184
163
|
.as('container')
|
|
185
164
|
.find('[data-preview="CardDs"]')
|
|
@@ -215,9 +194,5 @@ describe('CardDs component', () => {
|
|
|
215
194
|
.find('textarea')
|
|
216
195
|
.should('exist');
|
|
217
196
|
});
|
|
218
|
-
|
|
219
|
-
it('closes code on click', () => {
|
|
220
|
-
cy.get('@viewCodeBtn').click();
|
|
221
|
-
});
|
|
222
197
|
});
|
|
223
198
|
});
|
|
@@ -7,6 +7,7 @@ describe('Chip component', () => {
|
|
|
7
7
|
|
|
8
8
|
describe('props and methods section', () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
cy.visit('/#chip');
|
|
10
11
|
cy.get('[data-testid="Chip-container"] button[name="rsg-usage"]')
|
|
11
12
|
.contains('Props & methods')
|
|
12
13
|
.as('propsBtn');
|
|
@@ -36,6 +37,7 @@ describe('Chip component', () => {
|
|
|
36
37
|
|
|
37
38
|
describe('Chip section', () => {
|
|
38
39
|
beforeEach(() => {
|
|
40
|
+
cy.visit('/#chip');
|
|
39
41
|
cy.get('[data-testid="Chip-example-1"]')
|
|
40
42
|
.as('container')
|
|
41
43
|
.find('[data-preview="Chip"]')
|
|
@@ -62,9 +64,5 @@ describe('Chip component', () => {
|
|
|
62
64
|
.find('textarea')
|
|
63
65
|
.should('exist');
|
|
64
66
|
});
|
|
65
|
-
|
|
66
|
-
it('closes code on click', () => {
|
|
67
|
-
cy.get('@viewCodeBtn').click();
|
|
68
|
-
});
|
|
69
67
|
});
|
|
70
68
|
});
|
|
@@ -7,6 +7,7 @@ describe('Countdown component', () => {
|
|
|
7
7
|
|
|
8
8
|
describe('props and methods section', () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
cy.visit('/#countdown');
|
|
10
11
|
cy.get('[data-testid="Countdown-container"] button[name="rsg-usage"]')
|
|
11
12
|
.contains('Props & methods')
|
|
12
13
|
.as('propsBtn');
|
|
@@ -36,6 +37,7 @@ describe('Countdown component', () => {
|
|
|
36
37
|
|
|
37
38
|
describe('Countdown section', () => {
|
|
38
39
|
beforeEach(() => {
|
|
40
|
+
cy.visit('/#countdown');
|
|
39
41
|
cy.get('[data-testid="Countdown-examples"]')
|
|
40
42
|
.find('p')
|
|
41
43
|
.contains('Limit is 365 days');
|
|
@@ -65,9 +67,5 @@ describe('Countdown component', () => {
|
|
|
65
67
|
.find('textarea')
|
|
66
68
|
.should('exist');
|
|
67
69
|
});
|
|
68
|
-
|
|
69
|
-
it('closes code on click', () => {
|
|
70
|
-
cy.get('@viewCodeBtn').click();
|
|
71
|
-
});
|
|
72
70
|
});
|
|
73
71
|
});
|
|
@@ -7,6 +7,7 @@ describe('Descriptor component', () => {
|
|
|
7
7
|
|
|
8
8
|
describe('props and methods section', () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
cy.visit('/#descriptor');
|
|
10
11
|
cy.get('[data-testid="Descriptor-container"] button[name="rsg-usage"]')
|
|
11
12
|
.contains('Props & methods')
|
|
12
13
|
.as('propsBtn');
|
|
@@ -36,6 +37,7 @@ describe('Descriptor component', () => {
|
|
|
36
37
|
|
|
37
38
|
describe('Descriptor section: Descriptor-example-1', () => {
|
|
38
39
|
beforeEach(() => {
|
|
40
|
+
cy.visit('/#descriptor');
|
|
39
41
|
cy.get('[data-testid="Descriptor-examples"]')
|
|
40
42
|
.find('h3')
|
|
41
43
|
.contains('Descriptor Component');
|
|
@@ -82,14 +84,11 @@ describe('Descriptor component', () => {
|
|
|
82
84
|
.find('textarea')
|
|
83
85
|
.should('exist');
|
|
84
86
|
});
|
|
85
|
-
|
|
86
|
-
it('closes code on click', () => {
|
|
87
|
-
cy.get('@viewCodeBtn').click();
|
|
88
|
-
});
|
|
89
87
|
});
|
|
90
88
|
|
|
91
89
|
describe('Descriptor section: Descriptor-example-2', () => {
|
|
92
90
|
beforeEach(() => {
|
|
91
|
+
cy.visit('/#descriptor');
|
|
93
92
|
cy.get('[data-testid="Descriptor-examples"]')
|
|
94
93
|
.find('h3')
|
|
95
94
|
.contains('Descriptor Component');
|
|
@@ -139,9 +138,5 @@ describe('Descriptor component', () => {
|
|
|
139
138
|
.find('textarea')
|
|
140
139
|
.should('exist');
|
|
141
140
|
});
|
|
142
|
-
|
|
143
|
-
it('closes code on click', () => {
|
|
144
|
-
cy.get('@viewCodeBtn').click();
|
|
145
|
-
});
|
|
146
141
|
});
|
|
147
142
|
});
|
|
@@ -6,6 +6,7 @@ describe('DoubleCopy component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#doublecopy');
|
|
9
10
|
cy.get('[data-testid="DoubleCopy-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('DoubleCopy component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('DoubleCopy section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#doublecopy');
|
|
38
40
|
cy.get('[data-testid="DoubleCopy-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="DoubleCopy"]')
|
|
@@ -73,9 +75,5 @@ describe('DoubleCopy component', () => {
|
|
|
73
75
|
.find('textarea')
|
|
74
76
|
.should('exist');
|
|
75
77
|
});
|
|
76
|
-
|
|
77
|
-
it('closes code on click', () => {
|
|
78
|
-
cy.get('@viewCodeBtn').click();
|
|
79
|
-
});
|
|
80
78
|
});
|
|
81
79
|
});
|
|
@@ -6,6 +6,7 @@ describe('Herobanner component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#herobanner');
|
|
9
10
|
cy.get('[data-testid="HeroBanner-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Herobanner component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('HeroBanner section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#herobanner');
|
|
38
40
|
cy.get('[data-testid="HeroBanner-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="HeroBanner"]')
|
|
@@ -63,9 +65,5 @@ describe('Herobanner component', () => {
|
|
|
63
65
|
.find('textarea')
|
|
64
66
|
.should('exist');
|
|
65
67
|
});
|
|
66
|
-
|
|
67
|
-
it('closes code on click', () => {
|
|
68
|
-
cy.get('@viewCodeBtn').click();
|
|
69
|
-
});
|
|
70
68
|
});
|
|
71
69
|
});
|
|
@@ -6,6 +6,7 @@ describe('infobanner component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#infobanner');
|
|
9
10
|
cy.get('[data-testid="InfoBanner-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('infobanner component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Infobanner section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#infobanner');
|
|
38
40
|
cy.get('[data-testid="InfoBanner-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="InfoBanner"]')
|
|
@@ -63,9 +65,5 @@ describe('infobanner component', () => {
|
|
|
63
65
|
.find('textarea')
|
|
64
66
|
.should('exist');
|
|
65
67
|
});
|
|
66
|
-
|
|
67
|
-
it('closes code on click', () => {
|
|
68
|
-
cy.get('@viewCodeBtn').click();
|
|
69
|
-
});
|
|
70
68
|
});
|
|
71
69
|
});
|
|
@@ -6,6 +6,7 @@ describe('PartnerLink component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#partnerlink');
|
|
9
10
|
cy.get('[data-testid="PartnerLink-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('PartnerLink component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Partnerlink section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#partnerlink');
|
|
38
40
|
cy.get('[data-testid="PartnerLink-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="PartnerLink"]')
|
|
@@ -62,9 +64,5 @@ describe('PartnerLink component', () => {
|
|
|
62
64
|
.find('textarea')
|
|
63
65
|
.should('exist');
|
|
64
66
|
});
|
|
65
|
-
|
|
66
|
-
it('closes code on click', () => {
|
|
67
|
-
cy.get('@viewCodeBtn').click();
|
|
68
|
-
});
|
|
69
67
|
});
|
|
70
68
|
});
|
|
@@ -6,6 +6,7 @@ describe('Promo component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#promo');
|
|
9
10
|
cy.get('[data-testid="Promo-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Promo component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Promo section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#promo');
|
|
38
40
|
cy.get('[data-testid="Promo-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Promo"]')
|
|
@@ -68,9 +70,5 @@ describe('Promo component', () => {
|
|
|
68
70
|
.find('textarea')
|
|
69
71
|
.should('exist');
|
|
70
72
|
});
|
|
71
|
-
|
|
72
|
-
it('closes code on click', () => {
|
|
73
|
-
cy.get('@viewCodeBtn').click();
|
|
74
|
-
});
|
|
75
73
|
});
|
|
76
74
|
});
|