open-page-delete-modal.spec.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. context('Access to page', () => {
  2. const ssPrefix = 'open-page-create-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. // collapse sidebar
  13. cy.collapseSidebar(true);
  14. });
  15. beforeEach(() => {
  16. if (connectSid != null) {
  17. cy.setCookie('connect.sid', connectSid);
  18. }
  19. });
  20. it('/Sandbox is successfully loaded', () => {
  21. cy.visit('/Sandbox', { });
  22. cy.screenshot(`${ssPrefix}-Sandbox`,{ capture: 'viewport' });
  23. });
  24. // it('PageDeleteModal is shown successfully', () => {
  25. // cy.visit('/Sandbox');
  26. // cy.getByTestid('open-page-item-control-btn')[0].click();
  27. // cy.contains('Delete').click();
  28. // cy.screenshot(`${ssPrefix}-open`,{ capture: 'viewport' });
  29. // });
  30. // it('PageDeleteModal Search is shown successfully', () => {
  31. // cy.visit('/_search?q=tag:we');
  32. // cy.getByTestid('open-page-item-control-btn')[0].click();
  33. // cy.contains('Delete').click();
  34. // cy.screenshot(`${ssPrefix}_search?q=tag:we`,{ capture: 'viewport' });
  35. // });
  36. });