Skip to content

Commit

Permalink
chore(PPDSC-2458): chore/ppds-2458-release-fix (#398)
Browse files Browse the repository at this point in the history
* chore(PPDSC-2458): chore/ppds-2458-added-new-cookie

* chore(PPDSC-2458): chore/ppds-2458-added-new-acceptcookiebanner
  • Loading branch information
baburay23 authored Oct 5, 2022
1 parent e9ab1d5 commit fc8dec2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions cypress/site/functional/header-navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('Documentation Site - header-navigation component', () => {

it('should contain burger menu when on mobile', () => {
cy.mockConsentAndVisit('/about/introduction');
cy.acceptCookieBanner();
cy.get(sidebarTestID).should('exist').and('not.be.visible');
cy.get(hamburgerIconTestID).first().click();
cy.get(sidebarTestID).should('be.visible');
Expand Down
3 changes: 3 additions & 0 deletions cypress/site/functional/playground.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const playgroundElement = '[data-testid="playground-element"]';
describe('Documentation Site - playground', () => {
before(() => {
cy.mockConsentAndVisit('/components/tag');
cy.acceptCookieBanner();
});

it('Tag playground should update the content', () => {
Expand All @@ -22,6 +23,7 @@ describe('Documentation Site - playground', () => {
describe('Documentation Site - playground - Unordered List', () => {
before(() => {
cy.mockConsentAndVisit('/components/unordered-list');
cy.acceptCookieBanner();
});

const ulArrayKnob = '[data-testid="array-knob-list-data"]';
Expand All @@ -47,6 +49,7 @@ describe('Documentation Site - playground - Unordered List', () => {
describe('Documentation Site - playground', () => {
before(() => {
cy.mockConsentAndVisit('/components/flag');
cy.acceptCookieBanner();
});

it('Flag playground should update the content', () => {
Expand Down
1 change: 1 addition & 0 deletions cypress/site/functional/search.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const SEARCH_BTN_ICON = '[data-testid="search-icon-button"]';
describe('Documentation Site - search component', () => {
beforeEach(() => {
cy.mockConsentAndVisit('/');
cy.acceptCookieBanner();
});

describe('Desktop view', () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Cypress.Commands.add('mockConsentAndVisit', url => {
cy.setCookie('nukt_sp_consent', 'JABCDEFGHI');
cy.setCookie('consentUUID', '0714192a-0776-4b78-b462-41dde53d35e8_7');
cy.setCookie('consentUUID', 'b2cba40d-174a-4d06-9798-9a210c3a0c4f_12');
cy.visit(url);
});

Expand Down

0 comments on commit fc8dec2

Please sign in to comment.