const ssPrefix = 'access-to-page-'; context('Access to page', () => { before(() => { // login cy.fixture("user-admin.json").then(user => { cy.login(user.username, user.password); }); }); it('/Sandbox is successfully loaded', () => { cy.visit('/Sandbox'); cy.screenshot(`${ssPrefix}-sandbox`, { capture: 'viewport' }); }); it('/Sandbox with anchor hash is successfully loaded', () => { cy.visit('/Sandbox#Headers'); cy.screenshot(`${ssPrefix}-sandbox-headers`, { capture: 'viewport' }); }); });