| 1234567891011121314151617181920212223242526272829303132333435363738 |
- const ssPrefix = 'access-to-page-';
- context('Access to page', () => {
- let connectSid: string | undefined;
- before(() => {
- // login
- cy.fixture("user-admin.json").then(user => {
- cy.login(user.username, user.password);
- });
- cy.getCookie('connect.sid').then(cookie => {
- connectSid = cookie?.value;
- });
- });
- beforeEach(() => {
- if (connectSid != null) {
- cy.setCookie('connect.sid', connectSid);
- }
- });
- 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' });
- });
- it('/Draft page will be successfully shown', () => {
- cy.visit('/me/drafts');
- cy.screenshot(`${ssPrefix}-draft-page`, { capture: 'viewport' });
- });
- });
|