open-presentation-modal.spec.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. context('Open presentation modal', () => {
  2. const ssPrefix = 'access-to-presentation-modal-';
  3. beforeEach(() => {
  4. // login
  5. cy.fixture("user-admin.json").then(user => {
  6. cy.login(user.username, user.password);
  7. });
  8. });
  9. it('PresentationModal for "/" is shown successfully', () => {
  10. cy.visit('/');
  11. cy.get('#grw-subnav-container').within(() => {
  12. cy.getByTestid('open-page-item-control-btn').click({force: true});
  13. cy.getByTestid('open-presentation-modal-btn').click({force: true});
  14. });
  15. // eslint-disable-next-line cypress/no-unnecessary-waiting
  16. cy.wait(1500);
  17. cy.screenshot(`${ssPrefix}-open-top`);
  18. });
  19. it('PresentationModal for "/Sandbox/Bootstrap4" is shown successfully', () => {
  20. cy.visit('/Sandbox/Bootstrap4');
  21. cy.get('#grw-subnav-container').within(() => {
  22. cy.getByTestid('open-page-item-control-btn').click({force: true});
  23. cy.getByTestid('open-presentation-modal-btn').click({force: true});
  24. });
  25. // eslint-disable-next-line cypress/no-unnecessary-waiting
  26. cy.wait(1500);
  27. cy.screenshot(`${ssPrefix}-open-bootstrap4`);
  28. });
  29. it('PresentationModal for /Sandbox/Bootstrap4#Cards" is shown successfully', () => {
  30. cy.visit('/Sandbox/Bootstrap4#Cards');
  31. cy.get('#grw-subnav-container').within(() => {
  32. cy.getByTestid('open-page-item-control-btn').click({force: true});
  33. cy.getByTestid('open-presentation-modal-btn').click({force: true});
  34. });
  35. // eslint-disable-next-line cypress/no-unnecessary-waiting
  36. cy.wait(1500);
  37. cy.screenshot(`${ssPrefix}-open-bootstrap4-with-ancker-link`);
  38. });
  39. });