diff --git a/cypress/e2e/components/molecules/accordion.cy.js b/cypress/e2e/components/molecules/accordion.cy.js index 9db9a96e4..bf90f0bea 100644 --- a/cypress/e2e/components/molecules/accordion.cy.js +++ b/cypress/e2e/components/molecules/accordion.cy.js @@ -6,6 +6,7 @@ describe('Accordion component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#accordion'); cy.get('[data-testid="Accordion-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Accordion component', () => { describe('Accordion section', () => { beforeEach(() => { + cy.visit('/#accordion'); cy.get('[data-testid="Accordion-example-1"]') .as('container') .find('[data-preview="Accordion"]') diff --git a/cypress/e2e/components/molecules/articleTeaser.cy.js b/cypress/e2e/components/molecules/articleTeaser.cy.js index 16e3d6157..2c8ce70a6 100644 --- a/cypress/e2e/components/molecules/articleTeaser.cy.js +++ b/cypress/e2e/components/molecules/articleTeaser.cy.js @@ -6,6 +6,7 @@ describe('ArticleTeaser component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#articleteaser'); cy.get('[data-testid="ArticleTeaser-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('ArticleTeaser component', () => { describe('Article Teaser section', () => { beforeEach(() => { + cy.visit('/#articleteaser'); cy.get('[data-testid="ArticleTeaser-example-1"]') .as('container') .find('[data-preview="ArticleTeaser"]') diff --git a/cypress/e2e/components/molecules/banner.cy.js b/cypress/e2e/components/molecules/banner.cy.js index 8781084f2..914df5fb1 100644 --- a/cypress/e2e/components/molecules/banner.cy.js +++ b/cypress/e2e/components/molecules/banner.cy.js @@ -6,6 +6,7 @@ describe('Banner component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#banner'); cy.get('[data-testid="Banner-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Banner component', () => { describe('Banner section', () => { beforeEach(() => { + cy.visit('/#banner'); cy.get('[data-testid="Banner-example-1"]') .as('container') .find('[data-preview="Banner"]') diff --git a/cypress/e2e/components/molecules/box.cy.js b/cypress/e2e/components/molecules/box.cy.js index 91dc433b2..d39d6ff55 100644 --- a/cypress/e2e/components/molecules/box.cy.js +++ b/cypress/e2e/components/molecules/box.cy.js @@ -6,6 +6,7 @@ describe('Box component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#box'); cy.get('[data-testid="Box-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Box component', () => { describe('Box example 1 section', () => { beforeEach(() => { + cy.visit('/#box'); cy.get('[data-testid="Box-example-1"]') .as('container') .find('[data-preview="Box"]') @@ -71,6 +73,7 @@ describe('Box component', () => { describe('Box example 3 section', () => { beforeEach(() => { + cy.visit('/#box'); cy.get('[data-testid="Box-example-3"]') .as('container') .find('[data-preview="Box"]') diff --git a/cypress/e2e/components/molecules/card.cy.js b/cypress/e2e/components/molecules/card.cy.js index ee769380e..8c73e8f86 100644 --- a/cypress/e2e/components/molecules/card.cy.js +++ b/cypress/e2e/components/molecules/card.cy.js @@ -7,6 +7,7 @@ describe('Card component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#card'); cy.get('[data-testid="Card-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -36,6 +37,7 @@ describe('Card component', () => { describe('Card example 1 section', () => { beforeEach(() => { + cy.visit('/#card'); cy.get('[data-testid="Card-example-1"]') .as('container') .find('[data-preview="Card"]') @@ -72,6 +74,7 @@ describe('Card component', () => { describe('Card no body section', () => { beforeEach(() => { + cy.visit('/#card'); cy.get('[data-testid="Card-example-3"]') .as('container') .find('[data-preview="Card"]') diff --git a/cypress/e2e/components/molecules/cardDs.cy.js b/cypress/e2e/components/molecules/cardDs.cy.js index 14a7c1bd0..3b43f3a6d 100644 --- a/cypress/e2e/components/molecules/cardDs.cy.js +++ b/cypress/e2e/components/molecules/cardDs.cy.js @@ -7,6 +7,7 @@ describe('CardDs component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#cardds'); cy.get('[data-testid="CardDs-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -36,6 +37,7 @@ describe('CardDs component', () => { describe('CardDs image and CTA section', () => { beforeEach(() => { + cy.visit('/#cardds'); cy.get('[data-testid="CardDs-example-1"]') .as('container') .find('[data-preview="CardDs"]') @@ -79,6 +81,7 @@ describe('CardDs component', () => { describe('CardDs no Image with link section', () => { beforeEach(() => { + cy.visit('/#cardds'); cy.get('[data-testid="CardDs-example-3"]') .as('container') .find('[data-preview="CardDs"]') @@ -122,6 +125,7 @@ describe('CardDs component', () => { describe('CardDs no image no link section', () => { beforeEach(() => { + cy.visit('/#cardds'); cy.get('[data-testid="CardDs-example-5"]') .as('container') .find('[data-preview="CardDs"]') @@ -154,7 +158,7 @@ describe('CardDs component', () => { describe('CardDs image, text, no link', () => { beforeEach(() => { - // Here + cy.visit('/#cardds'); cy.get('[data-testid="CardDs-example-7"]') .as('container') .find('[data-preview="CardDs"]') diff --git a/cypress/e2e/components/molecules/chip.cy.js b/cypress/e2e/components/molecules/chip.cy.js index 944d17224..3f788e323 100644 --- a/cypress/e2e/components/molecules/chip.cy.js +++ b/cypress/e2e/components/molecules/chip.cy.js @@ -7,6 +7,7 @@ describe('Chip component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#chip'); cy.get('[data-testid="Chip-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -36,6 +37,7 @@ describe('Chip component', () => { describe('Chip section', () => { beforeEach(() => { + cy.visit('/#chip'); cy.get('[data-testid="Chip-example-1"]') .as('container') .find('[data-preview="Chip"]') diff --git a/cypress/e2e/components/molecules/countdown.cy.js b/cypress/e2e/components/molecules/countdown.cy.js index 65038c471..496feb750 100644 --- a/cypress/e2e/components/molecules/countdown.cy.js +++ b/cypress/e2e/components/molecules/countdown.cy.js @@ -7,6 +7,7 @@ describe('Countdown component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#countdown'); cy.get('[data-testid="Countdown-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -36,6 +37,7 @@ describe('Countdown component', () => { describe('Countdown section', () => { beforeEach(() => { + cy.visit('/#countdown'); cy.get('[data-testid="Countdown-examples"]') .find('p') .contains('Limit is 365 days'); diff --git a/cypress/e2e/components/molecules/descriptor.cy.js b/cypress/e2e/components/molecules/descriptor.cy.js index a075d8c03..cedfcf43f 100644 --- a/cypress/e2e/components/molecules/descriptor.cy.js +++ b/cypress/e2e/components/molecules/descriptor.cy.js @@ -7,6 +7,7 @@ describe('Descriptor component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#descriptor'); cy.get('[data-testid="Descriptor-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -36,6 +37,7 @@ describe('Descriptor component', () => { describe('Descriptor section: Descriptor-example-1', () => { beforeEach(() => { + cy.visit('/#descriptor'); cy.get('[data-testid="Descriptor-examples"]') .find('h3') .contains('Descriptor Component'); @@ -86,6 +88,7 @@ describe('Descriptor component', () => { describe('Descriptor section: Descriptor-example-2', () => { beforeEach(() => { + cy.visit('/#descriptor'); cy.get('[data-testid="Descriptor-examples"]') .find('h3') .contains('Descriptor Component'); diff --git a/cypress/e2e/components/molecules/doubleCopy.cy.js b/cypress/e2e/components/molecules/doubleCopy.cy.js index c4b3a7d73..f8125dc58 100644 --- a/cypress/e2e/components/molecules/doubleCopy.cy.js +++ b/cypress/e2e/components/molecules/doubleCopy.cy.js @@ -6,6 +6,7 @@ describe('DoubleCopy component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#doublecopy'); cy.get('[data-testid="DoubleCopy-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('DoubleCopy component', () => { describe('DoubleCopy section', () => { beforeEach(() => { + cy.visit('/#doublecopy'); cy.get('[data-testid="DoubleCopy-example-1"]') .as('container') .find('[data-preview="DoubleCopy"]') diff --git a/cypress/e2e/components/molecules/heroBanner.cy.js b/cypress/e2e/components/molecules/heroBanner.cy.js index 6e113508c..38c3b1486 100644 --- a/cypress/e2e/components/molecules/heroBanner.cy.js +++ b/cypress/e2e/components/molecules/heroBanner.cy.js @@ -6,6 +6,7 @@ describe('Herobanner component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#herobanner'); cy.get('[data-testid="HeroBanner-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Herobanner component', () => { describe('HeroBanner section', () => { beforeEach(() => { + cy.visit('/#herobanner'); cy.get('[data-testid="HeroBanner-example-1"]') .as('container') .find('[data-preview="HeroBanner"]') diff --git a/cypress/e2e/components/molecules/infoBanner.cy.js b/cypress/e2e/components/molecules/infoBanner.cy.js index bb61dfd3d..b719ebc89 100644 --- a/cypress/e2e/components/molecules/infoBanner.cy.js +++ b/cypress/e2e/components/molecules/infoBanner.cy.js @@ -6,6 +6,7 @@ describe('infobanner component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#infobanner'); cy.get('[data-testid="InfoBanner-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('infobanner component', () => { describe('Infobanner section', () => { beforeEach(() => { + cy.visit('/#infobanner'); cy.get('[data-testid="InfoBanner-example-1"]') .as('container') .find('[data-preview="InfoBanner"]') diff --git a/cypress/e2e/components/molecules/partnerLink.cy.js b/cypress/e2e/components/molecules/partnerLink.cy.js index 405731113..efae69c0a 100644 --- a/cypress/e2e/components/molecules/partnerLink.cy.js +++ b/cypress/e2e/components/molecules/partnerLink.cy.js @@ -6,6 +6,7 @@ describe('PartnerLink component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#partnerlink'); cy.get('[data-testid="PartnerLink-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('PartnerLink component', () => { describe('Partnerlink section', () => { beforeEach(() => { + cy.visit('/#partnerlink'); cy.get('[data-testid="PartnerLink-example-1"]') .as('container') .find('[data-preview="PartnerLink"]') diff --git a/cypress/e2e/components/molecules/promo.cy.js b/cypress/e2e/components/molecules/promo.cy.js index 84f4f7c05..5ef061932 100644 --- a/cypress/e2e/components/molecules/promo.cy.js +++ b/cypress/e2e/components/molecules/promo.cy.js @@ -6,6 +6,7 @@ describe('Promo component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#promo'); cy.get('[data-testid="Promo-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Promo component', () => { describe('Promo section', () => { beforeEach(() => { + cy.visit('/#promo'); cy.get('[data-testid="Promo-example-1"]') .as('container') .find('[data-preview="Promo"]') diff --git a/cypress/e2e/components/molecules/schoolLookup.cy.js b/cypress/e2e/components/molecules/schoolLookup.cy.js index d3f1260f1..a0c2e18fb 100644 --- a/cypress/e2e/components/molecules/schoolLookup.cy.js +++ b/cypress/e2e/components/molecules/schoolLookup.cy.js @@ -6,6 +6,7 @@ describe('School Lookup component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#schoollookup'); cy.get('[data-testid="SchoolLookup-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('School Lookup component', () => { describe('view code section', () => { beforeEach(() => { + cy.visit('/#schoollookup'); cy.get('[data-testid="SchoolLookup-example-1"]') .as('container') .find('[data-preview="SchoolLookup"]') @@ -60,6 +62,7 @@ describe('School Lookup component', () => { describe('School lookup functionality', () => { beforeEach(() => { + cy.visit('/#schoollookup'); cy.get('[data-testid="SchoolLookup-example-1"]') .as('container') .find('[data-preview="SchoolLookup"]') diff --git a/cypress/e2e/components/molecules/searchInput.cy.js b/cypress/e2e/components/molecules/searchInput.cy.js index e8a34d946..bdc1af01f 100644 --- a/cypress/e2e/components/molecules/searchInput.cy.js +++ b/cypress/e2e/components/molecules/searchInput.cy.js @@ -6,6 +6,7 @@ describe('Search Input component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#searchinput'); cy.get('[data-testid="SearchInput-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Search Input component', () => { describe('Search Input section', () => { beforeEach(() => { + cy.visit('/#searchinput'); cy.get('[data-testid="SearchInput-example-1"]') .as('container') .find('[data-preview="SearchInput"]') diff --git a/cypress/e2e/components/molecules/searchResult.cy.js b/cypress/e2e/components/molecules/searchResult.cy.js index bf45068a1..696f5cf8d 100644 --- a/cypress/e2e/components/molecules/searchResult.cy.js +++ b/cypress/e2e/components/molecules/searchResult.cy.js @@ -6,6 +6,7 @@ describe('Search Result component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#searchresult'); cy.get('[data-testid="SearchResult-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Search Result component', () => { describe('Search Result Minimalist section', () => { beforeEach(() => { + cy.visit('/#searchresult'); cy.get('[data-testid="SearchResult-example-1"]') .as('container') .find('[data-preview="SearchResult"]') @@ -69,6 +71,7 @@ describe('Search Result component', () => { describe('Search Result with copy section', () => { beforeEach(() => { + cy.visit('/#searchresult'); cy.get('[data-testid="SearchResult-example-3"]') .as('container') .find('[data-preview="SearchResult"]') @@ -106,6 +109,7 @@ describe('Search Result component', () => { describe('Search Result with date section', () => { beforeEach(() => { + cy.visit('/#searchresult'); cy.get('[data-testid="SearchResult-example-5"]') .as('container') .find('[data-preview="SearchResult"]') @@ -146,6 +150,7 @@ describe('Search Result component', () => { describe('Search Result with date and type section', () => { beforeEach(() => { + cy.visit('/#searchresult'); cy.get('[data-testid="SearchResult-example-5"]') .as('container') .find('[data-preview="SearchResult"]') diff --git a/cypress/e2e/components/molecules/shareButton.cy.js b/cypress/e2e/components/molecules/shareButton.cy.js index ee3946df9..0beac00a9 100644 --- a/cypress/e2e/components/molecules/shareButton.cy.js +++ b/cypress/e2e/components/molecules/shareButton.cy.js @@ -6,6 +6,7 @@ describe('Share Button component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#sharebutton'); cy.get('[data-testid="ShareButton-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Share Button component', () => { describe('Share Button section', () => { beforeEach(() => { + cy.visit('/#sharebutton'); cy.get('[data-testid="ShareButton-example-0"]') .as('container') .find('[data-preview="ShareButton"]') diff --git a/cypress/e2e/components/molecules/simpleSchoolLookup.cy.js b/cypress/e2e/components/molecules/simpleSchoolLookup.cy.js index d97996922..412e51c52 100644 --- a/cypress/e2e/components/molecules/simpleSchoolLookup.cy.js +++ b/cypress/e2e/components/molecules/simpleSchoolLookup.cy.js @@ -6,6 +6,7 @@ describe('SimpleSchoolLookup component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#simpleschoollookup'); cy.get('[data-testid="SimpleSchoolLookup-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('SimpleSchoolLookup component', () => { describe('view code section', () => { beforeEach(() => { + cy.visit('/#simpleschoollookup'); cy.get('[data-testid="SimpleSchoolLookup-examples"]') .as('container'); @@ -58,6 +60,7 @@ describe('SimpleSchoolLookup component', () => { describe('Simple School lookup functionality', () => { beforeEach(() => { + cy.visit('/#simpleschoollookup'); cy.get('[data-testid="SimpleSchoolLookup-example-0"]') .as('container') .find('[data-preview="SimpleSchoolLookup"]') diff --git a/cypress/e2e/components/molecules/singleMessage.cy.js b/cypress/e2e/components/molecules/singleMessage.cy.js index 1377928f7..49003c068 100644 --- a/cypress/e2e/components/molecules/singleMessage.cy.js +++ b/cypress/e2e/components/molecules/singleMessage.cy.js @@ -6,6 +6,7 @@ describe('Single Message component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Single Message component', () => { describe('Single message section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-1"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -75,6 +77,7 @@ describe('Single Message component', () => { describe('Single Message fullImage section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-3"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -115,6 +118,7 @@ describe('Single Message component', () => { describe('Single Message fullImage no copy section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-5"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -152,6 +156,7 @@ describe('Single Message component', () => { describe('Single Message fullImage no image section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-7"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -189,6 +194,7 @@ describe('Single Message component', () => { describe('Single Message vertical height 100% section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-9"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -226,6 +232,7 @@ describe('Single Message component', () => { describe('Single Message double image section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-11"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -267,6 +274,7 @@ describe('Single Message component', () => { describe('Single Message with 16:9 video section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-13"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -306,6 +314,7 @@ describe('Single Message component', () => { describe('Single Message with 16:9 video left section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-14"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -345,6 +354,7 @@ describe('Single Message component', () => { describe('Single Message with portrait video section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-16"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -384,6 +394,7 @@ describe('Single Message component', () => { describe('Single Message with portrait video, 100VH section', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-18"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -419,6 +430,7 @@ describe('Single Message component', () => { describe('Single Message with landscape video, 100VH, fullwidth image', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-20"]') .as('container') .find('[data-preview="SingleMessage"]') @@ -454,6 +466,7 @@ describe('Single Message component', () => { describe('Single Message with landscape video, 50VH, fullwidth image', () => { beforeEach(() => { + cy.visit('/#singlemessage'); cy.get('[data-testid="SingleMessage-example-22"]') .as('container') .find('[data-preview="SingleMessage"]') diff --git a/cypress/e2e/components/molecules/singleMessageDs.cy.js b/cypress/e2e/components/molecules/singleMessageDs.cy.js index dae109204..ddff86c15 100644 --- a/cypress/e2e/components/molecules/singleMessageDs.cy.js +++ b/cypress/e2e/components/molecules/singleMessageDs.cy.js @@ -6,6 +6,7 @@ describe('Single Message Ds component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#singlemessageds'); cy.get('[data-testid="SingleMessageDs-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Single Message Ds component', () => { describe('SingleMessageDs-example-1: Image align left and CTA are clickable', () => { beforeEach(() => { + cy.visit('/#singlemessageds'); cy.get('[data-testid="SingleMessageDs-example-1"]') .as('container') .find('[data-preview="SingleMessageDs"]') @@ -76,6 +78,7 @@ describe('Single Message Ds component', () => { describe('SingleMessageDs-example-3: Image align right and CTA are clickable', () => { beforeEach(() => { + cy.visit('/#singlemessageds'); cy.get('[data-testid="SingleMessageDs-example-3"]') .as('container') .find('[data-preview="SingleMessageDs"]') @@ -116,6 +119,7 @@ describe('Single Message Ds component', () => { describe('SingleMessageDs-example-5: SingleMessageDs-example-5', () => { beforeEach(() => { + cy.visit('/#singlemessageds'); cy.get('[data-testid="SingleMessageDs-example-5"]') .as('container') .find('[data-preview="SingleMessageDs"]') @@ -154,6 +158,7 @@ describe('Single Message Ds component', () => { describe('SingleMessageDs-example-7: Using the linkIcon prop', () => { beforeEach(() => { + cy.visit('/#singlemessageds'); cy.get('[data-testid="SingleMessageDs-example-7"]') .as('container') .find('[data-preview="SingleMessageDs"]') @@ -191,6 +196,7 @@ describe('Single Message Ds component', () => { describe('SingleMessageDs-example-9: Video with no CTA', () => { beforeEach(() => { + cy.visit('/#singlemessageds'); cy.get('[data-testid="SingleMessageDs-example-9"]') .as('container') .find('[data-preview="SingleMessageDs"]') diff --git a/cypress/e2e/components/molecules/typeahead.cy.js b/cypress/e2e/components/molecules/typeahead.cy.js index 243b8db1a..a7a7e8eaf 100644 --- a/cypress/e2e/components/molecules/typeahead.cy.js +++ b/cypress/e2e/components/molecules/typeahead.cy.js @@ -6,6 +6,7 @@ describe('Typeahead component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#typeahead'); cy.get('[data-testid="Typeahead-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Typeahead component', () => { describe('view code section', () => { beforeEach(() => { + cy.visit('/#typeahead'); cy.get('[data-testid="Typeahead-example-1"]') .as('container') .find('[data-preview="Typeahead"]') @@ -60,6 +62,7 @@ describe('Typeahead component', () => { describe('Typeahead functionality', () => { beforeEach(() => { + cy.visit('/#typeahead'); cy.get('[data-testid="Typeahead-example-1"]') .as('container') .find('[data-preview="Typeahead"]') diff --git a/cypress/e2e/components/molecules/videoBanner.cy.js b/cypress/e2e/components/molecules/videoBanner.cy.js index 0f9dcb1b3..f00f009d4 100644 --- a/cypress/e2e/components/molecules/videoBanner.cy.js +++ b/cypress/e2e/components/molecules/videoBanner.cy.js @@ -6,6 +6,7 @@ describe('Video Banner component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#videobanner'); cy.get('[data-testid="VideoBanner-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Video Banner component', () => { describe('VideoBanner-example-1: Default Video Banner', () => { beforeEach(() => { + cy.visit('/#videobanner'); cy.get('[data-testid="VideoBanner-example-1"]') .as('container') .find('[data-preview="VideoBanner"]') @@ -66,6 +68,7 @@ describe('Video Banner component', () => { describe('VideoBanner-example-3: Looping Video Banner With Controls', () => { beforeEach(() => { + cy.visit('/#videobanner'); cy.get('[data-testid="VideoBanner-example-3"]') .as('container') .find('[data-preview="VideoBanner"]') @@ -97,6 +100,7 @@ describe('Video Banner component', () => { describe('VideoBanner-example-5: Non-autoplay Video Banner', () => { beforeEach(() => { + cy.visit('/#videobanner'); cy.get('[data-testid="VideoBanner-example-5"]') .as('container') .find('[data-preview="VideoBanner"]') diff --git a/cypress/e2e/components/organisms/cookieBanner.cy.js b/cypress/e2e/components/organisms/cookieBanner.cy.js index f681e57c8..67766446d 100644 --- a/cypress/e2e/components/organisms/cookieBanner.cy.js +++ b/cypress/e2e/components/organisms/cookieBanner.cy.js @@ -6,6 +6,7 @@ describe('Cookie Banner component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#cookiebanner'); cy.get('[data-testid="CookieBanner-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Cookie Banner component', () => { describe('Cookie Banner section', () => { beforeEach(() => { + cy.visit('/#cookiebanner'); cy.get('[data-testid="CookieBanner-example-1"]') .as('container') .find('[data-preview="CookieBanner"]') diff --git a/cypress/e2e/components/organisms/donate.cy.js b/cypress/e2e/components/organisms/donate.cy.js index 4a0e6f209..e84ee268d 100644 --- a/cypress/e2e/components/organisms/donate.cy.js +++ b/cypress/e2e/components/organisms/donate.cy.js @@ -6,6 +6,7 @@ describe('Donate component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#donate'); cy.get('[data-testid="Donate-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Donate component', () => { describe('Donate Form align right section', () => { beforeEach(() => { + cy.visit('/#donate'); cy.get('[data-testid="Donate-example-1"]') .as('container') .find('[data-preview="Donate"]') @@ -101,6 +103,7 @@ describe('Donate component', () => { describe('Donate Form align left section', () => { beforeEach(() => { + cy.visit('/#donate'); cy.get('[data-testid="Donate-example-3"]') .as('container') .find('[data-preview="Donate"]') @@ -163,6 +166,7 @@ describe('Donate component', () => { describe('Single Giving section', () => { beforeEach(() => { + cy.visit('/#donate'); cy.get('[data-testid="Donate-example-5"]') .as('container') .find('[data-preview="Donate"]') @@ -224,6 +228,7 @@ describe('Donate component', () => { describe('Single Giving "No Money Buys" section', () => { beforeEach(() => { + cy.visit('/#donate'); cy.get('[data-testid="Donate-example-7"]') .as('container') .find('[data-preview="Donate"]') diff --git a/cypress/e2e/components/organisms/emailSignUp.cy.js b/cypress/e2e/components/organisms/emailSignUp.cy.js index 04fa9f209..bcf56e10e 100644 --- a/cypress/e2e/components/organisms/emailSignUp.cy.js +++ b/cypress/e2e/components/organisms/emailSignUp.cy.js @@ -7,6 +7,7 @@ describe('Email Sign Up component', () => { describe('Email Sign Up section', () => { beforeEach(() => { + cy.visit('/#emailsignupform'); cy.get('[data-testid="EmailSignUpForm-example-1"]') .as('container') .find('[data-preview="EmailSignUpForm"]') diff --git a/cypress/e2e/components/organisms/footer.cy.js b/cypress/e2e/components/organisms/footer.cy.js index 532d7e623..e2b89f92e 100644 --- a/cypress/e2e/components/organisms/footer.cy.js +++ b/cypress/e2e/components/organisms/footer.cy.js @@ -6,6 +6,7 @@ describe('Footer component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#footer'); cy.get('[data-testid="Footer-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Footer component', () => { describe('Footer section', () => { beforeEach(() => { + cy.visit('/#footer'); cy.get('[data-testid="Footer-example-1"]') .as('container') .find('[data-preview="Footer"]') diff --git a/cypress/e2e/components/organisms/header.cy.js b/cypress/e2e/components/organisms/header.cy.js index cd8642f04..386c40150 100644 --- a/cypress/e2e/components/organisms/header.cy.js +++ b/cypress/e2e/components/organisms/header.cy.js @@ -6,6 +6,7 @@ describe('Header component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#header'); cy.get('[data-testid="Header-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Header component', () => { describe('CR Header section', () => { beforeEach(() => { + cy.visit('/#header'); cy.get('[data-testid="Header-example-1"]') .as('container') .find('[data-preview="Header"]') @@ -80,6 +82,7 @@ describe('Header component', () => { describe('CR Header with search and ESU section', () => { beforeEach(() => { + cy.visit('/#header'); cy.get('[data-testid="Header-example-7"]') .as('container') .find('[data-preview="Header"]') diff --git a/cypress/e2e/components/organisms/marketingPreferencesDSForm.cy.js b/cypress/e2e/components/organisms/marketingPreferencesDSForm.cy.js index e0447bf96..7f82be230 100644 --- a/cypress/e2e/components/organisms/marketingPreferencesDSForm.cy.js +++ b/cypress/e2e/components/organisms/marketingPreferencesDSForm.cy.js @@ -4,6 +4,7 @@ describe('MarketingPreferencesDSForm component', () => { }); beforeEach(() => { + cy.visit('/#!/MarketingPreferencesDSForm/1'); cy.window().then(win => { cy.spy(win.console, 'log').as('consoleLog'); }); diff --git a/cypress/e2e/components/organisms/membership.cy.js b/cypress/e2e/components/organisms/membership.cy.js index 0f62d76c5..a48de5ed7 100644 --- a/cypress/e2e/components/organisms/membership.cy.js +++ b/cypress/e2e/components/organisms/membership.cy.js @@ -6,6 +6,7 @@ describe('Membership component', () => { describe('props and methods section', () => { beforeEach(() => { + cy.visit('/#membership'); cy.get('[data-testid="Membership-container"] button[name="rsg-usage"]') .contains('Props & methods') .as('propsBtn'); @@ -35,6 +36,7 @@ describe('Membership component', () => { describe('Membership form align right section', () => { beforeEach(() => { + cy.visit('/#membership'); cy.get('[data-testid="Membership-example-1"]') .as('container') .find('[data-preview="Membership"]') @@ -77,6 +79,7 @@ describe('Membership component', () => { describe('Membership form align left section', () => { beforeEach(() => { + cy.visit('/#membership'); cy.get('[data-testid="Membership-example-3"]') .as('container') .find('[data-preview="Membership"]')