access-to-presentation.spec.ts 854 B

1234567891011121314151617181920212223242526272829303132
  1. context('Open presentation modal', () => {
  2. const ssPrefix = 'access-to-presentation-modal-';
  3. let connectSid: string | undefined;
  4. before(() => {
  5. // login
  6. cy.fixture("user-admin.json").then(user => {
  7. cy.login(user.username, user.password);
  8. });
  9. cy.getCookie('connect.sid').then(cookie => {
  10. connectSid = cookie?.value;
  11. });
  12. });
  13. beforeEach(() => {
  14. if (connectSid != null) {
  15. cy.setCookie('connect.sid', connectSid);
  16. }
  17. });
  18. it('Successfully loaded the presentation modal in /.', () => {
  19. cy.visit('/');
  20. cy.getByTestid('sub-nav-buttons-page-item-control').click();
  21. cy.getByTestid('open-presentation-modal-btn').click();
  22. // eslint-disable-next-line cypress/no-unnecessary-waiting
  23. cy.wait(1500);
  24. cy.screenshot(`${ssPrefix}-sandbox-headers`, { capture: 'viewport' });
  25. });
  26. });