Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
TEST Flemme (av il a test le front de la prod)
Browse files Browse the repository at this point in the history
  • Loading branch information
Capryc0rne committed Aug 22, 2024
1 parent 8e63018 commit 02d5106
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/cypress/e2e/cookies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import { waitAndClick } from './utils';

describe('Cookies', () => {
it("Check if the cookies consent is null when the user hasn't accepted or declined the cookies", () => {
cy.visit('http://frontend:3000');
cy.visit('http://91.108.112.237:3001');
cy.getCookie('cookieConsent').should('be.null');
}
);
it('Check if the cookies consent is set to "accepted" after clicking on the "Accept" button', () => {
cy.visit('http://frontend:3000');
cy.visit('http://91.108.112.237:3001');
waitAndClick('div > .ant-btn-primary > span');
cy.getCookie('cookieConsent').should("exist");
cy.getCookie('cookieConsent').should('have.property', 'value', 'true');
});

it('Check if the cookies consent is null after clicking on the "Decline" button. A session variable should exist with value false', () => {
cy.visit('http://frontend:3000');
cy.visit('http://91.108.112.237:3001');
cy.get('div > .ant-btn-default > span').should('be.visible').click();

// the cookie should not exist and the session storage should be set to 'false'
Expand Down

0 comments on commit 02d5106

Please sign in to comment.