@comicrelief/component-library 7.20.0 → 7.21.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/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/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/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/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
package/cypress/{integration/components/atoms/button.spec.js → e2e/components/atoms/button.cy.js}
RENAMED
|
@@ -6,6 +6,7 @@ describe('Button component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#button');
|
|
9
10
|
cy.get('[data-testid="Button-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Button component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Plain Button: Button-example-0', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#button');
|
|
38
40
|
cy.get('[data-testid="Button-example-0"')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[class^=rsg--preview]')
|
|
@@ -63,17 +65,11 @@ describe('Button component', () => {
|
|
|
63
65
|
.find('textarea')
|
|
64
66
|
.should('exist');
|
|
65
67
|
});
|
|
66
|
-
|
|
67
|
-
it('closes code on click', () => {
|
|
68
|
-
cy.get('@viewCodeBtn').click();
|
|
69
|
-
cy.get('@container')
|
|
70
|
-
.find('textarea')
|
|
71
|
-
.should('not.exist');
|
|
72
|
-
});
|
|
73
68
|
});
|
|
74
69
|
|
|
75
70
|
describe('Button as a span: Button-example-1', () => {
|
|
76
71
|
beforeEach(() => {
|
|
72
|
+
cy.visit('/#button');
|
|
77
73
|
cy.get('[data-testid="Button-example-1"]')
|
|
78
74
|
.as('container')
|
|
79
75
|
.find('[class^=rsg--preview]')
|
|
@@ -86,7 +82,7 @@ describe('Button component', () => {
|
|
|
86
82
|
});
|
|
87
83
|
|
|
88
84
|
it('renders button as a span', () => {
|
|
89
|
-
//verify button as a span
|
|
85
|
+
// verify button as a span
|
|
90
86
|
cy.get('[data-testid="Button-example-1"]')
|
|
91
87
|
.contains('My button as a span')
|
|
92
88
|
.should('exist');
|
|
@@ -102,12 +98,5 @@ describe('Button component', () => {
|
|
|
102
98
|
.find('textarea')
|
|
103
99
|
.should('exist');
|
|
104
100
|
});
|
|
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
101
|
});
|
|
113
102
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
describe('Button With States component', () => {
|
|
2
2
|
before(() => {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
// go to Button With States component
|
|
4
|
+
cy.visit('/#button');
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#button');
|
|
9
10
|
cy.get('[data-testid="ButtonWithStates-container"]')
|
|
10
11
|
.as('container')
|
|
11
12
|
.find('[class^=rsg--preview]')
|
|
@@ -26,10 +27,10 @@ describe('Button With States component', () => {
|
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
it('renders button as disabled', () => {
|
|
29
|
-
//verify button as a span
|
|
30
|
+
// verify button as a span
|
|
30
31
|
cy.get('[data-testid="ButtonWithStates-example-1"]')
|
|
31
32
|
.contains('Loading')
|
|
32
|
-
.should('be.disabled')
|
|
33
|
+
.should('be.disabled');
|
|
33
34
|
});
|
|
34
35
|
|
|
35
36
|
it('has view code button', () => {
|
|
@@ -42,12 +43,5 @@ describe('Button With States component', () => {
|
|
|
42
43
|
.find('textarea')
|
|
43
44
|
.should('exist');
|
|
44
45
|
});
|
|
45
|
-
|
|
46
|
-
it('closes code on click', () => {
|
|
47
|
-
cy.get('@viewCodeBtn').click();
|
|
48
|
-
cy.get('@container')
|
|
49
|
-
.find('textarea')
|
|
50
|
-
.should('not.exist');
|
|
51
|
-
});
|
|
52
46
|
});
|
|
53
47
|
});
|
|
@@ -6,6 +6,7 @@ describe('Checkbox component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#checkbox');
|
|
9
10
|
cy.get('[data-testid="Checkbox-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Checkbox component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Checkbox section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#checkbox');
|
|
38
40
|
cy.get('[data-preview="Checkbox"]')
|
|
39
41
|
.as('preview');
|
|
40
42
|
});
|
|
@@ -6,6 +6,7 @@ describe('Confetti component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#confetti');
|
|
9
10
|
cy.get('[data-testid="Confetti-container"]')
|
|
10
11
|
.as('container')
|
|
11
12
|
.find('[class^=rsg--preview]')
|
|
@@ -25,7 +26,7 @@ describe('Confetti component', () => {
|
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
it('renders confetti when "trigger confetti" is clicked', () => {
|
|
28
|
-
//verify button as a span
|
|
29
|
+
// verify button as a span
|
|
29
30
|
cy.get('[data-testid="Confetti-example-1"]')
|
|
30
31
|
.contains('trigger confetti')
|
|
31
32
|
.click()
|
|
@@ -41,12 +42,5 @@ describe('Confetti component', () => {
|
|
|
41
42
|
.find('textarea')
|
|
42
43
|
.should('exist');
|
|
43
44
|
});
|
|
44
|
-
|
|
45
|
-
it('closes code on click', () => {
|
|
46
|
-
cy.get('@viewCodeBtn').click();
|
|
47
|
-
cy.get('@container')
|
|
48
|
-
.find('textarea')
|
|
49
|
-
.should('not.exist');
|
|
50
|
-
});
|
|
51
45
|
});
|
|
52
46
|
});
|
|
@@ -6,6 +6,7 @@ describe('ErrorText component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#errortext');
|
|
9
10
|
cy.get('[data-testid="ErrorText-container"]')
|
|
10
11
|
.as('container')
|
|
11
12
|
.find('[class^=rsg--preview]')
|
|
@@ -40,12 +41,5 @@ describe('ErrorText component', () => {
|
|
|
40
41
|
.find('textarea')
|
|
41
42
|
.should('exist');
|
|
42
43
|
});
|
|
43
|
-
|
|
44
|
-
it('closes code on click', () => {
|
|
45
|
-
cy.get('@viewCodeBtn').click();
|
|
46
|
-
cy.get('@container')
|
|
47
|
-
.find('textarea')
|
|
48
|
-
.should('not.exist');
|
|
49
|
-
});
|
|
50
44
|
});
|
|
51
45
|
});
|
package/cypress/{integration/components/atoms/input.spec.js → e2e/components/atoms/input.cy.js}
RENAMED
|
@@ -6,6 +6,7 @@ describe('Input component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#input');
|
|
9
10
|
cy.get('[data-testid="Input-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Input component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Input preview section: required with label and hint', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#input');
|
|
38
40
|
cy.get('[data-testid="Input-example-0"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[class^=rsg--preview]')
|
|
@@ -69,17 +71,11 @@ describe('Input component', () => {
|
|
|
69
71
|
.find('textarea')
|
|
70
72
|
.should('exist');
|
|
71
73
|
});
|
|
72
|
-
|
|
73
|
-
it('closes code on click', () => {
|
|
74
|
-
cy.get('@viewCodeBtn').click();
|
|
75
|
-
cy.get('@container')
|
|
76
|
-
.find('textarea')
|
|
77
|
-
.should('not.exist');
|
|
78
|
-
});
|
|
79
74
|
});
|
|
80
75
|
|
|
81
76
|
describe('Input preview section: with error message', () => {
|
|
82
77
|
beforeEach(() => {
|
|
78
|
+
cy.visit('/#input');
|
|
83
79
|
cy.get('[data-testid="Input-example-1"]')
|
|
84
80
|
.as('container')
|
|
85
81
|
.find('[data-preview="Input"]')
|
|
@@ -126,6 +122,7 @@ describe('Input component', () => {
|
|
|
126
122
|
|
|
127
123
|
describe('Input preview section: with simple input(optional)', () => {
|
|
128
124
|
beforeEach(() => {
|
|
125
|
+
cy.visit('/#input');
|
|
129
126
|
cy.get('[data-testid="Input-example-2"]')
|
|
130
127
|
.as('container')
|
|
131
128
|
.find('[class^=rsg--preview]')
|
|
@@ -156,12 +153,5 @@ describe('Input component', () => {
|
|
|
156
153
|
.find('textarea')
|
|
157
154
|
.should('exist');
|
|
158
155
|
});
|
|
159
|
-
|
|
160
|
-
it('closes code on click', () => {
|
|
161
|
-
cy.get('@viewCodeBtn').click();
|
|
162
|
-
cy.get('@container')
|
|
163
|
-
.find('textarea')
|
|
164
|
-
.should('not.exist');
|
|
165
|
-
});
|
|
166
156
|
});
|
|
167
157
|
});
|
package/cypress/{integration/components/atoms/label.spec.js → e2e/components/atoms/label.cy.js}
RENAMED
|
@@ -6,6 +6,7 @@ describe('Label component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#label');
|
|
9
10
|
cy.get('[data-testid="Label-container"]')
|
|
10
11
|
.as('container')
|
|
11
12
|
.find('[class^=rsg--preview]')
|
|
@@ -26,6 +27,7 @@ describe('Label component', () => {
|
|
|
26
27
|
|
|
27
28
|
describe('Wrapping a basic text input: Label-example-0', () => {
|
|
28
29
|
beforeEach(() => {
|
|
30
|
+
cy.visit('/#label');
|
|
29
31
|
cy.get('[data-testid="Label-example-0"')
|
|
30
32
|
.as('container')
|
|
31
33
|
.find('[class^=rsg--preview]')
|
|
@@ -54,17 +56,11 @@ describe('Label component', () => {
|
|
|
54
56
|
.find('textarea')
|
|
55
57
|
.should('exist');
|
|
56
58
|
});
|
|
57
|
-
|
|
58
|
-
it('closes code on click', () => {
|
|
59
|
-
cy.get('@viewCodeBtn').click();
|
|
60
|
-
cy.get('@container')
|
|
61
|
-
.find('textarea')
|
|
62
|
-
.should('not.exist');
|
|
63
|
-
});
|
|
64
59
|
});
|
|
65
60
|
|
|
66
61
|
describe('Wrapping a styled input: Label-example-1', () => {
|
|
67
62
|
beforeEach(() => {
|
|
63
|
+
cy.visit('/#label');
|
|
68
64
|
cy.get('[data-testid="Label-example-1"]')
|
|
69
65
|
.as('container')
|
|
70
66
|
.find('[class^=rsg--preview]')
|
|
@@ -93,12 +89,5 @@ describe('Label component', () => {
|
|
|
93
89
|
.find('textarea')
|
|
94
90
|
.should('exist');
|
|
95
91
|
});
|
|
96
|
-
|
|
97
|
-
it('closes code on click', () => {
|
|
98
|
-
cy.get('@viewCodeBtn').click();
|
|
99
|
-
cy.get('@container')
|
|
100
|
-
.find('textarea')
|
|
101
|
-
.should('not.exist');
|
|
102
|
-
});
|
|
103
92
|
});
|
|
104
93
|
});
|
package/cypress/{integration/components/atoms/link.spec.js → e2e/components/atoms/link.cy.js}
RENAMED
|
@@ -6,6 +6,7 @@ describe('Link component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#link');
|
|
9
10
|
cy.get('[data-testid="Link-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Link component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Link standard preview section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#link');
|
|
38
40
|
cy.get('[data-testid="Link-example-0"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Link"]')
|
|
@@ -74,17 +76,11 @@ describe('Link component', () => {
|
|
|
74
76
|
.find('textarea')
|
|
75
77
|
.should('exist');
|
|
76
78
|
});
|
|
77
|
-
|
|
78
|
-
it('closes code on click', () => {
|
|
79
|
-
cy.get('@viewCodeBtn').click();
|
|
80
|
-
cy.get('@container')
|
|
81
|
-
.find('textarea')
|
|
82
|
-
.should('not.exist');
|
|
83
|
-
});
|
|
84
79
|
});
|
|
85
80
|
|
|
86
81
|
describe('Iconography section', () => {
|
|
87
82
|
beforeEach(() => {
|
|
83
|
+
cy.visit('/#link');
|
|
88
84
|
cy.get('[data-testid="Link-example-2"]')
|
|
89
85
|
.as('container')
|
|
90
86
|
.find('[data-preview="Link"]')
|
|
@@ -134,17 +130,11 @@ describe('Link component', () => {
|
|
|
134
130
|
.find('textarea')
|
|
135
131
|
.should('exist');
|
|
136
132
|
});
|
|
137
|
-
|
|
138
|
-
it('closes code on click', () => {
|
|
139
|
-
cy.get('@viewCodeBtn').click();
|
|
140
|
-
cy.get('@container')
|
|
141
|
-
.find('textarea')
|
|
142
|
-
.should('not.exist');
|
|
143
|
-
});
|
|
144
133
|
});
|
|
145
134
|
|
|
146
135
|
describe('Link as button section', () => {
|
|
147
136
|
beforeEach(() => {
|
|
137
|
+
cy.visit('/#link');
|
|
148
138
|
cy.get('[data-testid="Link-example-3"]')
|
|
149
139
|
.as('container')
|
|
150
140
|
.find('[data-preview="Link"]')
|
|
@@ -196,12 +186,5 @@ describe('Link component', () => {
|
|
|
196
186
|
.find('textarea')
|
|
197
187
|
.should('exist');
|
|
198
188
|
});
|
|
199
|
-
|
|
200
|
-
it('closes code on click', () => {
|
|
201
|
-
cy.get('@viewCodeBtn').click();
|
|
202
|
-
cy.get('@container')
|
|
203
|
-
.find('textarea')
|
|
204
|
-
.should('not.exist');
|
|
205
|
-
});
|
|
206
189
|
});
|
|
207
190
|
});
|
package/cypress/{integration/components/atoms/logo.spec.js → e2e/components/atoms/logo.cy.js}
RENAMED
|
@@ -6,6 +6,7 @@ describe('Logo component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#logo');
|
|
9
10
|
cy.get('[data-testid="Logo-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Logo component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('CR logo section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#logo');
|
|
38
40
|
cy.get('[data-testid="Logo-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Logo"]')
|
|
@@ -62,17 +64,11 @@ describe('Logo component', () => {
|
|
|
62
64
|
.find('textarea')
|
|
63
65
|
.should('exist');
|
|
64
66
|
});
|
|
65
|
-
|
|
66
|
-
it('closes code on click', () => {
|
|
67
|
-
cy.get('@viewCodeBtn').click();
|
|
68
|
-
cy.get('@container')
|
|
69
|
-
.find('textarea')
|
|
70
|
-
.should('not.exist');
|
|
71
|
-
});
|
|
72
67
|
});
|
|
73
68
|
|
|
74
69
|
describe('SR logo section', () => {
|
|
75
70
|
beforeEach(() => {
|
|
71
|
+
cy.visit('/#logo');
|
|
76
72
|
cy.get('[data-testid="Logo-example-3"]')
|
|
77
73
|
.as('container')
|
|
78
74
|
.find('[data-preview="Logo"]')
|
|
@@ -100,17 +96,11 @@ describe('Logo component', () => {
|
|
|
100
96
|
.find('textarea')
|
|
101
97
|
.should('exist');
|
|
102
98
|
});
|
|
103
|
-
|
|
104
|
-
it('closes code on click', () => {
|
|
105
|
-
cy.get('@viewCodeBtn').click();
|
|
106
|
-
cy.get('@container')
|
|
107
|
-
.find('textarea')
|
|
108
|
-
.should('not.exist');
|
|
109
|
-
});
|
|
110
99
|
});
|
|
111
100
|
|
|
112
101
|
describe('SR game on logo section', () => {
|
|
113
102
|
beforeEach(() => {
|
|
103
|
+
cy.visit('/#logo');
|
|
114
104
|
cy.get('[data-testid="Logo-example-5"]')
|
|
115
105
|
.as('container')
|
|
116
106
|
.find('[data-preview="Logo"]')
|
|
@@ -138,12 +128,5 @@ describe('Logo component', () => {
|
|
|
138
128
|
.find('textarea')
|
|
139
129
|
.should('exist');
|
|
140
130
|
});
|
|
141
|
-
|
|
142
|
-
it('closes code on click', () => {
|
|
143
|
-
cy.get('@viewCodeBtn').click();
|
|
144
|
-
cy.get('@container')
|
|
145
|
-
.find('textarea')
|
|
146
|
-
.should('not.exist');
|
|
147
|
-
});
|
|
148
131
|
});
|
|
149
132
|
});
|
|
@@ -6,6 +6,7 @@ describe('Pagination component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#pagination');
|
|
9
10
|
cy.get('[data-testid="Pagination-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('Pagination component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Pagination minimalist section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#pagination');
|
|
38
40
|
cy.get('[data-testid="Pagination-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Pagination"]')
|
|
@@ -63,17 +65,11 @@ describe('Pagination component', () => {
|
|
|
63
65
|
.find('textarea')
|
|
64
66
|
.should('exist');
|
|
65
67
|
});
|
|
66
|
-
|
|
67
|
-
it('closes code on click', () => {
|
|
68
|
-
cy.get('@viewCodeBtn').click();
|
|
69
|
-
cy.get('@container')
|
|
70
|
-
.find('textarea')
|
|
71
|
-
.should('not.exist');
|
|
72
|
-
});
|
|
73
68
|
});
|
|
74
69
|
|
|
75
70
|
describe('Pagination full size section', () => {
|
|
76
71
|
beforeEach(() => {
|
|
72
|
+
cy.visit('/#pagination');
|
|
77
73
|
cy.get('[data-testid="Pagination-example-3"]')
|
|
78
74
|
.as('container')
|
|
79
75
|
.find('[data-preview="Pagination"]')
|
|
@@ -109,17 +105,11 @@ describe('Pagination component', () => {
|
|
|
109
105
|
.find('textarea')
|
|
110
106
|
.should('exist');
|
|
111
107
|
});
|
|
112
|
-
|
|
113
|
-
it('closes code on click', () => {
|
|
114
|
-
cy.get('@viewCodeBtn').click();
|
|
115
|
-
cy.get('@container')
|
|
116
|
-
.find('textarea')
|
|
117
|
-
.should('not.exist');
|
|
118
|
-
});
|
|
119
108
|
});
|
|
120
109
|
|
|
121
110
|
describe('Pagination custom style section', () => {
|
|
122
111
|
beforeEach(() => {
|
|
112
|
+
cy.visit('/#pagination');
|
|
123
113
|
cy.get('[data-testid="Pagination-example-5"]')
|
|
124
114
|
.as('container')
|
|
125
115
|
.find('[data-preview="Pagination"]')
|
|
@@ -156,17 +146,11 @@ describe('Pagination component', () => {
|
|
|
156
146
|
.find('textarea')
|
|
157
147
|
.should('exist');
|
|
158
148
|
});
|
|
159
|
-
|
|
160
|
-
it('closes code on click', () => {
|
|
161
|
-
cy.get('@viewCodeBtn').click();
|
|
162
|
-
cy.get('@container')
|
|
163
|
-
.find('textarea')
|
|
164
|
-
.should('not.exist');
|
|
165
|
-
});
|
|
166
149
|
});
|
|
167
150
|
|
|
168
151
|
describe('Pagination custom labels section', () => {
|
|
169
152
|
beforeEach(() => {
|
|
153
|
+
cy.visit('/#pagination');
|
|
170
154
|
cy.get('[data-testid="Pagination-example-7"]')
|
|
171
155
|
.as('container')
|
|
172
156
|
.find('[data-preview="Pagination"]')
|
|
@@ -203,12 +187,5 @@ describe('Pagination component', () => {
|
|
|
203
187
|
.find('textarea')
|
|
204
188
|
.should('exist');
|
|
205
189
|
});
|
|
206
|
-
|
|
207
|
-
it('closes code on click', () => {
|
|
208
|
-
cy.get('@viewCodeBtn').click();
|
|
209
|
-
cy.get('@container')
|
|
210
|
-
.find('textarea')
|
|
211
|
-
.should('not.exist');
|
|
212
|
-
});
|
|
213
190
|
});
|
|
214
191
|
});
|
package/cypress/{integration/components/atoms/picture.spec.js → e2e/components/atoms/picture.cy.js}
RENAMED
|
@@ -7,6 +7,7 @@ describe('Picture component', () => {
|
|
|
7
7
|
|
|
8
8
|
describe('props and methods section', () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
cy.visit('/#picture');
|
|
10
11
|
cy.get('[data-testid="Picture-container"] button[name="rsg-usage"]')
|
|
11
12
|
.contains('Props & methods')
|
|
12
13
|
.as('propsBtn');
|
|
@@ -36,6 +37,7 @@ describe('Picture component', () => {
|
|
|
36
37
|
|
|
37
38
|
describe('Picture section', () => {
|
|
38
39
|
beforeEach(() => {
|
|
40
|
+
cy.visit('/#picture');
|
|
39
41
|
cy.get('[data-testid="Picture-example-1"]')
|
|
40
42
|
.as('container')
|
|
41
43
|
.find('[data-preview="Picture"]')
|
|
@@ -62,17 +64,11 @@ describe('Picture component', () => {
|
|
|
62
64
|
.find('textarea')
|
|
63
65
|
.should('exist');
|
|
64
66
|
});
|
|
65
|
-
|
|
66
|
-
it('closes code on click', () => {
|
|
67
|
-
cy.get('@viewCodeBtn').click();
|
|
68
|
-
cy.get('@container')
|
|
69
|
-
.find('textarea')
|
|
70
|
-
.should('not.exist');
|
|
71
|
-
});
|
|
72
67
|
});
|
|
73
68
|
|
|
74
69
|
describe('custom size picture section', () => {
|
|
75
70
|
beforeEach(() => {
|
|
71
|
+
cy.visit('/#picture');
|
|
76
72
|
cy.get('[data-testid="Picture-example-3"]')
|
|
77
73
|
.as('container')
|
|
78
74
|
.find('[data-preview="Picture"]')
|
|
@@ -99,17 +95,11 @@ describe('Picture component', () => {
|
|
|
99
95
|
.find('textarea')
|
|
100
96
|
.should('exist');
|
|
101
97
|
});
|
|
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
98
|
});
|
|
110
99
|
|
|
111
100
|
describe('Single image section', () => {
|
|
112
101
|
beforeEach(() => {
|
|
102
|
+
cy.visit('/#picture');
|
|
113
103
|
cy.get('[data-testid="Picture-example-5"]')
|
|
114
104
|
.as('container')
|
|
115
105
|
.find('[data-preview="Picture"]')
|
|
@@ -136,12 +126,5 @@ describe('Picture component', () => {
|
|
|
136
126
|
.find('textarea')
|
|
137
127
|
.should('exist');
|
|
138
128
|
});
|
|
139
|
-
|
|
140
|
-
it('closes code on click', () => {
|
|
141
|
-
cy.get('@viewCodeBtn').click();
|
|
142
|
-
cy.get('@container')
|
|
143
|
-
.find('textarea')
|
|
144
|
-
.should('not.exist');
|
|
145
|
-
});
|
|
146
129
|
});
|
|
147
130
|
});
|
|
@@ -7,6 +7,7 @@ describe('Radio Button component', () => {
|
|
|
7
7
|
|
|
8
8
|
describe('props and methods section', () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
cy.visit('/#radiobutton');
|
|
10
11
|
cy.get('[data-testid="RadioButton-container"] button[name="rsg-usage"]')
|
|
11
12
|
.contains('Props & methods')
|
|
12
13
|
.as('propsBtn');
|
|
@@ -36,6 +37,7 @@ describe('Radio Button component', () => {
|
|
|
36
37
|
|
|
37
38
|
describe('Radio button section', () => {
|
|
38
39
|
beforeEach(() => {
|
|
40
|
+
cy.visit('/#radiobutton');
|
|
39
41
|
cy.get('[data-testid="RadioButton-example-1"]')
|
|
40
42
|
.as('container')
|
|
41
43
|
.find('[data-preview="RadioButton"]')
|
|
@@ -70,12 +72,5 @@ describe('Radio Button component', () => {
|
|
|
70
72
|
.find('textarea')
|
|
71
73
|
.should('exist');
|
|
72
74
|
});
|
|
73
|
-
|
|
74
|
-
it('closes code on click', () => {
|
|
75
|
-
cy.get('@viewCodeBtn').click();
|
|
76
|
-
cy.get('@container')
|
|
77
|
-
.find('textarea')
|
|
78
|
-
.should('not.exist');
|
|
79
|
-
});
|
|
80
75
|
});
|
|
81
76
|
});
|
|
@@ -7,6 +7,7 @@ describe('RichText component', () => {
|
|
|
7
7
|
|
|
8
8
|
describe('props and methods section', () => {
|
|
9
9
|
beforeEach(() => {
|
|
10
|
+
cy.visit('/#richtext');
|
|
10
11
|
cy.get('[data-testid="RichText-container"] button[name="rsg-usage"]')
|
|
11
12
|
.contains('Props & methods')
|
|
12
13
|
.as('propsBtn');
|
|
@@ -36,6 +37,7 @@ describe('RichText component', () => {
|
|
|
36
37
|
|
|
37
38
|
describe('Rich text section', () => {
|
|
38
39
|
beforeEach(() => {
|
|
40
|
+
cy.visit('/#richtext');
|
|
39
41
|
cy.get('[data-testid="RichText-example-1"]')
|
|
40
42
|
.as('container')
|
|
41
43
|
.find('[data-preview="RichText"]')
|
|
@@ -64,12 +66,5 @@ describe('RichText component', () => {
|
|
|
64
66
|
.find('textarea')
|
|
65
67
|
.should('exist');
|
|
66
68
|
});
|
|
67
|
-
|
|
68
|
-
it('closes code on click', () => {
|
|
69
|
-
cy.get('@viewCodeBtn').click();
|
|
70
|
-
cy.get('@container')
|
|
71
|
-
.find('textarea')
|
|
72
|
-
.should('not.exist');
|
|
73
|
-
});
|
|
74
69
|
});
|
|
75
70
|
});
|
package/cypress/{integration/components/atoms/select.spec.js → e2e/components/atoms/select.cy.js}
RENAMED
|
@@ -6,6 +6,7 @@ describe('SelectField component', () => {
|
|
|
6
6
|
|
|
7
7
|
describe('props and methods section', () => {
|
|
8
8
|
beforeEach(() => {
|
|
9
|
+
cy.visit('/#selectfield');
|
|
9
10
|
cy.get('[data-testid="Select-container"] button[name="rsg-usage"]')
|
|
10
11
|
.contains('Props & methods')
|
|
11
12
|
.as('propsBtn');
|
|
@@ -35,6 +36,7 @@ describe('SelectField component', () => {
|
|
|
35
36
|
|
|
36
37
|
describe('Select Field section', () => {
|
|
37
38
|
beforeEach(() => {
|
|
39
|
+
cy.visit('/#selectfield');
|
|
38
40
|
cy.get('[data-testid="Select-example-1"]')
|
|
39
41
|
.as('container')
|
|
40
42
|
.find('[data-preview="Select"]')
|
|
@@ -78,12 +80,5 @@ describe('SelectField component', () => {
|
|
|
78
80
|
.find('textarea')
|
|
79
81
|
.should('exist');
|
|
80
82
|
});
|
|
81
|
-
|
|
82
|
-
it('closes code on click', () => {
|
|
83
|
-
cy.get('@viewCodeBtn').click();
|
|
84
|
-
cy.get('@container')
|
|
85
|
-
.find('textarea')
|
|
86
|
-
.should('not.exist');
|
|
87
|
-
});
|
|
88
83
|
});
|
|
89
84
|
});
|