Skip to content

Commit

Permalink
Fix all Atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyEPhipps committed Sep 27, 2023
1 parent 101d9dd commit 3a51f65
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cypress/e2e/components/atoms/label.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('Label component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#label');
cy.get('[data-testid="Label-container"]')
.as('container')
.find('[class^=rsg--preview]')
Expand All @@ -26,6 +27,7 @@ describe('Label component', () => {

describe('Wrapping a basic text input: Label-example-0', () => {
beforeEach(() => {
cy.visit('/#label');
cy.get('[data-testid="Label-example-0"')
.as('container')
.find('[class^=rsg--preview]')
Expand Down Expand Up @@ -58,6 +60,7 @@ describe('Label component', () => {

describe('Wrapping a styled input: Label-example-1', () => {
beforeEach(() => {
cy.visit('/#label');
cy.get('[data-testid="Label-example-1"]')
.as('container')
.find('[class^=rsg--preview]')
Expand Down
4 changes: 4 additions & 0 deletions cypress/e2e/components/atoms/link.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('Link component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#link');
cy.get('[data-testid="Link-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('Link component', () => {

describe('Link standard preview section', () => {
beforeEach(() => {
cy.visit('/#link');
cy.get('[data-testid="Link-example-0"]')
.as('container')
.find('[data-preview="Link"]')
Expand Down Expand Up @@ -78,6 +80,7 @@ describe('Link component', () => {

describe('Iconography section', () => {
beforeEach(() => {
cy.visit('/#link');
cy.get('[data-testid="Link-example-2"]')
.as('container')
.find('[data-preview="Link"]')
Expand Down Expand Up @@ -131,6 +134,7 @@ describe('Link component', () => {

describe('Link as button section', () => {
beforeEach(() => {
cy.visit('/#link');
cy.get('[data-testid="Link-example-3"]')
.as('container')
.find('[data-preview="Link"]')
Expand Down
4 changes: 4 additions & 0 deletions cypress/e2e/components/atoms/logo.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('Logo component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#logo');
cy.get('[data-testid="Logo-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('Logo component', () => {

describe('CR logo section', () => {
beforeEach(() => {
cy.visit('/#logo');
cy.get('[data-testid="Logo-example-1"]')
.as('container')
.find('[data-preview="Logo"]')
Expand Down Expand Up @@ -66,6 +68,7 @@ describe('Logo component', () => {

describe('SR logo section', () => {
beforeEach(() => {
cy.visit('/#logo');
cy.get('[data-testid="Logo-example-3"]')
.as('container')
.find('[data-preview="Logo"]')
Expand Down Expand Up @@ -97,6 +100,7 @@ describe('Logo component', () => {

describe('SR game on logo section', () => {
beforeEach(() => {
cy.visit('/#logo');
cy.get('[data-testid="Logo-example-5"]')
.as('container')
.find('[data-preview="Logo"]')
Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/components/atoms/pagination.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('Pagination component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#pagination');
cy.get('[data-testid="Pagination-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('Pagination component', () => {

describe('Pagination minimalist section', () => {
beforeEach(() => {
cy.visit('/#pagination');
cy.get('[data-testid="Pagination-example-1"]')
.as('container')
.find('[data-preview="Pagination"]')
Expand Down Expand Up @@ -67,6 +69,7 @@ describe('Pagination component', () => {

describe('Pagination full size section', () => {
beforeEach(() => {
cy.visit('/#pagination');
cy.get('[data-testid="Pagination-example-3"]')
.as('container')
.find('[data-preview="Pagination"]')
Expand Down Expand Up @@ -106,6 +109,7 @@ describe('Pagination component', () => {

describe('Pagination custom style section', () => {
beforeEach(() => {
cy.visit('/#pagination');
cy.get('[data-testid="Pagination-example-5"]')
.as('container')
.find('[data-preview="Pagination"]')
Expand Down Expand Up @@ -146,6 +150,7 @@ describe('Pagination component', () => {

describe('Pagination custom labels section', () => {
beforeEach(() => {
cy.visit('/#pagination');
cy.get('[data-testid="Pagination-example-7"]')
.as('container')
.find('[data-preview="Pagination"]')
Expand Down
4 changes: 4 additions & 0 deletions cypress/e2e/components/atoms/picture.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ describe('Picture component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#picture');
cy.get('[data-testid="Picture-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -36,6 +37,7 @@ describe('Picture component', () => {

describe('Picture section', () => {
beforeEach(() => {
cy.visit('/#picture');
cy.get('[data-testid="Picture-example-1"]')
.as('container')
.find('[data-preview="Picture"]')
Expand Down Expand Up @@ -66,6 +68,7 @@ describe('Picture component', () => {

describe('custom size picture section', () => {
beforeEach(() => {
cy.visit('/#picture');
cy.get('[data-testid="Picture-example-3"]')
.as('container')
.find('[data-preview="Picture"]')
Expand Down Expand Up @@ -96,6 +99,7 @@ describe('Picture component', () => {

describe('Single image section', () => {
beforeEach(() => {
cy.visit('/#picture');
cy.get('[data-testid="Picture-example-5"]')
.as('container')
.find('[data-preview="Picture"]')
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/components/atoms/radioButton.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ describe('Radio Button component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#radiobutton');
cy.get('[data-testid="RadioButton-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -36,6 +37,7 @@ describe('Radio Button component', () => {

describe('Radio button section', () => {
beforeEach(() => {
cy.visit('/#radiobutton');
cy.get('[data-testid="RadioButton-example-1"]')
.as('container')
.find('[data-preview="RadioButton"]')
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/components/atoms/richText.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ describe('RichText component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#richtext');
cy.get('[data-testid="RichText-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -36,6 +37,7 @@ describe('RichText component', () => {

describe('Rich text section', () => {
beforeEach(() => {
cy.visit('/#richtext');
cy.get('[data-testid="RichText-example-1"]')
.as('container')
.find('[data-preview="RichText"]')
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/components/atoms/select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('SelectField component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#selectfield');
cy.get('[data-testid="Select-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('SelectField component', () => {

describe('Select Field section', () => {
beforeEach(() => {
cy.visit('/#selectfield');
cy.get('[data-testid="Select-example-1"]')
.as('container')
.find('[data-preview="Select"]')
Expand Down
4 changes: 4 additions & 0 deletions cypress/e2e/components/atoms/socialIcons.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('SocialIcons component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#socialicons');
cy.get('[data-testid="SocialIcons-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('SocialIcons component', () => {

describe('Comic Relief social icons section', () => {
beforeEach(() => {
cy.visit('/#socialicons');
cy.get('[data-testid="SocialIcons-example-1"]')
.as('container')
.find('[data-preview="SocialIcons"]')
Expand Down Expand Up @@ -76,6 +78,7 @@ describe('SocialIcons component', () => {

describe('Red Nose Day social icons section', () => {
beforeEach(() => {
cy.visit('/#socialicons');
cy.get('[data-testid="SocialIcons-example-3"]')
.as('container')
.find('[data-preview="SocialIcons"]')
Expand Down Expand Up @@ -117,6 +120,7 @@ describe('SocialIcons component', () => {

describe('Sport Relief social icons section', () => {
beforeEach(() => {
cy.visit('/#socialicons');
cy.get('[data-testid="SocialIcons-example-5"]')
.as('container')
.find('[data-preview="SocialIcons"]')
Expand Down
3 changes: 3 additions & 0 deletions cypress/e2e/components/atoms/text.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('Text component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#text');
cy.get('[data-testid="Text-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('Text component', () => {

describe('Text section', () => {
beforeEach(() => {
cy.visit('/#text');
cy.get('[data-testid="Text-example-0"]')
.as('container')
.find('[data-preview="Text"]')
Expand Down Expand Up @@ -98,6 +100,7 @@ describe('Text component', () => {

describe('Text section', () => {
beforeEach(() => {
cy.visit('/#text');
cy.get('[data-testid="Text-example-2"]')
.as('container')
.find('[data-preview="Text"]')
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/components/atoms/textArea.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('TextArea component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#textarea');
cy.get('[data-testid="TextArea-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('TextArea component', () => {

describe('Text Area section', () => {
beforeEach(() => {
cy.visit('/#textarea');
cy.get('[data-testid="TextArea-example-1"]')
.as('container')
.find('[data-preview="TextArea"]')
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/components/atoms/textInputWithDrop.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe('Text Input With Dropdown component', () => {

describe('props and methods section', () => {
beforeEach(() => {
cy.visit('/#textinputwithdropdown');
cy.get('[data-testid="TextInputWithDropdown-container"] button[name="rsg-usage"]')
.contains('Props & methods')
.as('propsBtn');
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('Text Input With Dropdown component', () => {

describe('TextInputWithDropdown section', () => {
beforeEach(() => {
cy.visit('/#textinputwithdropdown');
cy.get('[data-testid="TextInputWithDropdown-examples"]')
.as('container')
.find('[data-preview="TextInputWithDropdown"]')
Expand Down

0 comments on commit 3a51f65

Please sign in to comment.