create-page.spec.ts 628 B

1234567891011121314151617181920212223242526272829
  1. context('Create page modal', () => {
  2. const ssPrefix = 'create-page';
  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. cy.visit('/');
  17. }
  18. });
  19. it("Page create modal is shown successfully", () => {
  20. cy.getByTestid('newPageBtn').click();
  21. cy.screenshot(`${ssPrefix}-opne-modal`)
  22. });
  23. });