-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cypress): add tests for legal pages
- Loading branch information
1 parent
ab0a40a
commit d392110
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
describe('legal-notice page', () => { | ||
context('page load', () => { | ||
it('loads the page successfully', () => { | ||
cy.request('/legal-notice').then((resp) => { | ||
expect(resp.status).to.equal(200) | ||
expect(resp.redirectedToUrl).to.equal(undefined) | ||
}) | ||
}) | ||
}) | ||
|
||
context('visual regression', () => { | ||
it('looks as before', () => { | ||
cy.setCookie('cookie_control_is_consent_given', 'true') | ||
cy.visit('/legal-notice') | ||
cy.get('[data-is-loading="false"]').should('be.visible') | ||
cy.get('[data-testid="nuxt-cookie-control-control-button"]').should( | ||
'be.visible' | ||
) | ||
cy.compareSnapshot('legal-notice') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
describe('privacy-policy page', () => { | ||
context('page load', () => { | ||
it('loads the page successfully', () => { | ||
cy.request('/privacy-policy').then((resp) => { | ||
expect(resp.status).to.equal(200) | ||
expect(resp.redirectedToUrl).to.equal(undefined) | ||
}) | ||
}) | ||
}) | ||
|
||
context('visual regression', () => { | ||
it('looks as before', () => { | ||
cy.setCookie('cookie_control_is_consent_given', 'true') | ||
cy.visit('/privacy-policy') | ||
cy.get('[data-is-loading="false"]').should('be.visible') | ||
cy.get('[data-testid="nuxt-cookie-control-control-button"]').should( | ||
'be.visible' | ||
) | ||
cy.compareSnapshot('privacy-policy') | ||
}) | ||
}) | ||
}) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.