Yuki Takei 3 лет назад
Родитель
Сommit
221228f2f4

+ 120 - 258
packages/app/test/cypress/integration/20-basic-features/20-basic-features--use-tools.spec.ts

@@ -1,25 +1,3 @@
-context('Switch Sidebar content', { scrollBehavior: false }, () => {
-  const ssPrefix = 'switch-sidebar-content';
-
-  beforeEach(() => {
-    // login
-    cy.fixture("user-admin.json").then(user => {
-      cy.login(user.username, user.password);
-    });
-  });
-
-  it('PageTree is successfully shown', () => {
-    cy.visit('/page');
-    cy.collapseSidebar(false);
-    cy.waitUntilSkeletonDisappear();
-
-    cy.getByTestid('grw-sidebar-nav-primary-page-tree').click();
-    // eslint-disable-next-line cypress/no-unnecessary-waiting
-    cy.wait(1500);
-    cy.screenshot(`${ssPrefix}-pagetree-after-load`);
-  });
-});
-
 context('Modal for page operation', () => {
 context('Modal for page operation', () => {
 
 
   const ssPrefix = 'modal-for-page-operation-';
   const ssPrefix = 'modal-for-page-operation-';
@@ -33,28 +11,33 @@ context('Modal for page operation', () => {
 
 
   it("PageCreateModal is shown and closed successfully", () => {
   it("PageCreateModal is shown and closed successfully", () => {
     cy.visit('/');
     cy.visit('/');
-    cy.waitUntilSkeletonDisappear();
 
 
-    cy.getByTestid('newPageBtn').click();
-
-    // eslint-disable-next-line cypress/no-unnecessary-waiting
-    cy.wait(1000) // Wait for animation to finish when the Create Page button is pressed
+    cy.waitUntil(() => {
+      // do
+      cy.getByTestid('newPageBtn').click({force: true});
+      // wait until
+      return cy.getByTestid('page-create-modal').then($elem => $elem.is(':visible'));
+    });
 
 
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
       cy.screenshot(`${ssPrefix}new-page-modal-opened`);
       cy.screenshot(`${ssPrefix}new-page-modal-opened`);
       cy.get('button.close').click();
       cy.get('button.close').click();
     });
     });
 
 
-    cy.collapseSidebar(true, true);
+    cy.collapseSidebar(true);
     cy.screenshot(`${ssPrefix}page-create-modal-closed`);
     cy.screenshot(`${ssPrefix}page-create-modal-closed`);
   });
   });
 
 
   it("Successfully Create Today's page", () => {
   it("Successfully Create Today's page", () => {
     const pageName = "Today's page";
     const pageName = "Today's page";
     cy.visit('/');
     cy.visit('/');
-    cy.waitUntilSkeletonDisappear();
 
 
-    cy.getByTestid('newPageBtn').click();
+    cy.waitUntil(() => {
+      // do
+      cy.getByTestid('newPageBtn').click({force: true});
+      // wait until
+      return cy.getByTestid('page-create-modal').then($elem => $elem.is(':visible'));
+    });
 
 
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
       cy.get('.page-today-input2').type(pageName);
       cy.get('.page-today-input2').type(pageName);
@@ -67,10 +50,7 @@ context('Modal for page operation', () => {
 
 
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
 
 
-    // eslint-disable-next-line cypress/no-unnecessary-waiting
-    cy.wait(300);
-
-    cy.collapseSidebar(true, true);
+    cy.collapseSidebar(true);
     cy.waitUntilSkeletonDisappear();
     cy.waitUntilSkeletonDisappear();
     cy.screenshot(`${ssPrefix}create-today-page`);
     cy.screenshot(`${ssPrefix}create-today-page`);
   });
   });
@@ -78,16 +58,17 @@ context('Modal for page operation', () => {
   it('Successfully create page under specific path', () => {
   it('Successfully create page under specific path', () => {
     const pageName = 'child';
     const pageName = 'child';
 
 
-    cy.visit('/Sandbox');
-    cy.waitUntilSkeletonDisappear();
-
-    // eslint-disable-next-line cypress/no-unnecessary-waiting
-    cy.wait(1000);
+    cy.visit('/foo/bar');
 
 
-    cy.getByTestid('newPageBtn').click();
+    cy.waitUntil(() => {
+      // do
+      cy.getByTestid('newPageBtn').click({force: true});
+      // wait until
+      return cy.getByTestid('page-create-modal').then($elem => $elem.is(':visible'));
+    });
 
 
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
-      cy.get('.rbt-input-main').should('have.value', '/Sandbox/');
+      cy.get('.rbt-input-main').should('have.value', '/foo/bar/');
       cy.get('.rbt-input-main').type(pageName);
       cy.get('.rbt-input-main').type(pageName);
       cy.screenshot(`${ssPrefix}under-path-add-page-name`);
       cy.screenshot(`${ssPrefix}under-path-add-page-name`);
       cy.getByTestid('btn-create-page-under-below').click();
       cy.getByTestid('btn-create-page-under-below').click();
@@ -98,9 +79,6 @@ context('Modal for page operation', () => {
 
 
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
 
 
-    // eslint-disable-next-line cypress/no-unnecessary-waiting
-    cy.wait(300);
-
     cy.waitUntilSkeletonDisappear();
     cy.waitUntilSkeletonDisappear();
     cy.collapseSidebar(true);
     cy.collapseSidebar(true);
     cy.screenshot(`${ssPrefix}create-page-under-specific-page`);
     cy.screenshot(`${ssPrefix}create-page-under-specific-page`);
@@ -108,12 +86,15 @@ context('Modal for page operation', () => {
 
 
   it('Trying to create template page under the root page fail', () => {
   it('Trying to create template page under the root page fail', () => {
     cy.visit('/');
     cy.visit('/');
-    cy.waitUntilSkeletonDisappear();
 
 
-    cy.getByTestid('newPageBtn').click();
+    cy.waitUntil(() => {
+      // do
+      cy.getByTestid('newPageBtn').click({force: true});
+      // wait until
+      return cy.getByTestid('page-create-modal').then($elem => $elem.is(':visible'));
+    });
 
 
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
-
       cy.getByTestid('grw-page-create-modal-path-name').should('have.text', '/');
       cy.getByTestid('grw-page-create-modal-path-name').should('have.text', '/');
 
 
       cy.get('#template-type').click();
       cy.get('#template-type').click();
@@ -138,7 +119,6 @@ context('Modal for page operation', () => {
 
 
   it('Page Deletion and PutBack is executed successfully', { scrollBehavior: false }, () => {
   it('Page Deletion and PutBack is executed successfully', { scrollBehavior: false }, () => {
     cy.visit('/Sandbox/Bootstrap4');
     cy.visit('/Sandbox/Bootstrap4');
-    cy.waitUntilSkeletonDisappear();
 
 
     cy.get('#grw-subnav-container').within(() => {
     cy.get('#grw-subnav-container').within(() => {
       cy.getByTestid('open-page-item-control-btn').click({force: true});
       cy.getByTestid('open-page-item-control-btn').click({force: true});
@@ -229,58 +209,56 @@ context('Page Accessories Modal', () => {
     cy.fixture("user-admin.json").then(user => {
     cy.fixture("user-admin.json").then(user => {
       cy.login(user.username, user.password);
       cy.login(user.username, user.password);
     });
     });
+
+    cy.visit('/Sandbox/Bootstrap4');
+
+    cy.getByTestid('grw-contextual-sub-nav').as('subnav').should('be.visible').within(() => {
+      cy.getByTestid('open-page-item-control-btn').as('pageItemControlBtn').should('be.visible');
+    });
+    cy.waitUntil(() => {
+      // do
+      cy.get('@pageItemControlBtn').click();
+      // wait until
+      return cy.get('.dropdown-menu.show').then($elem => $elem.is(':visible'));
+    });
+
   });
   });
 
 
   it('Page History is shown successfully', () => {
   it('Page History is shown successfully', () => {
-     cy.visit('/Sandbox/Bootstrap4');
-     cy.waitUntilSkeletonDisappear();
-
-     cy.get('#grw-subnav-container').within(() => {
-      cy.getByTestid('open-page-item-control-btn').within(() => {
-        cy.get('button.btn-page-item-control').click({force: true});
-      });
+    cy.get('.dropdown-menu.show').should('be.visible').within(() => {
       cy.getByTestid('open-page-accessories-modal-btn-with-history-tab').click({force: true});
       cy.getByTestid('open-page-accessories-modal-btn-with-history-tab').click({force: true});
     });
     });
 
 
-     cy.getByTestid('page-history').should('be.visible');
-     cy.collapseSidebar(true);
-     cy.screenshot(`${ssPrefix}-open-page-history-bootstrap4`);
+    cy.getByTestid('page-history').should('be.visible');
+
+    cy.collapseSidebar(true);
+    cy.waitUntilSpinnerDisappear();
+    cy.screenshot(`${ssPrefix}-open-page-history-bootstrap4`);
   });
   });
 
 
   it('Page Attachment Data is shown successfully', () => {
   it('Page Attachment Data is shown successfully', () => {
-     cy.visit('/Sandbox/Bootstrap4');
-     cy.waitUntilSkeletonDisappear();
-
-     cy.get('#grw-subnav-container').within(() => {
-      cy.getByTestid('open-page-item-control-btn').within(() => {
-        cy.get('button.btn-page-item-control').click({force: true});
-      });
+    cy.get('.dropdown-menu.show').should('be.visible').within(() => {
       cy.getByTestid('open-page-accessories-modal-btn-with-attachment-data-tab').click({force: true});
       cy.getByTestid('open-page-accessories-modal-btn-with-attachment-data-tab').click({force: true});
     });
     });
 
 
-     cy.getByTestid('page-attachment').should('be.visible').contains('No attachments yet.');
+    cy.waitUntilSpinnerDisappear();
+    cy.getByTestid('page-attachment').should('be.visible').contains('No attachments yet.');
 
 
-     cy.collapseSidebar(true);
-     cy.screenshot(`${ssPrefix}-open-page-attachment-data-bootstrap4`);
+    cy.collapseSidebar(true);
+    cy.screenshot(`${ssPrefix}-open-page-attachment-data-bootstrap4`);
   });
   });
 
 
   it('Share Link Management is shown successfully', () => {
   it('Share Link Management is shown successfully', () => {
-    cy.visit('/Sandbox/Bootstrap4');
-    cy.waitUntilSkeletonDisappear();
-
-    cy.get('#grw-subnav-container').within(() => {
-      cy.getByTestid('open-page-item-control-btn').within(() => {
-        cy.get('button.btn-page-item-control').click({force: true});
-      });
-      cy.getByTestid('open-page-accessories-modal-btn-with-share-link-management-data-tab').should('be.visible');
-      cy.getByTestid('open-page-accessories-modal-btn-with-share-link-management-data-tab').click();
-   });
+    cy.get('.dropdown-menu.show').should('be.visible').within(() => {
+      cy.getByTestid('open-page-accessories-modal-btn-with-share-link-management-data-tab').click({force: true});
+    });
 
 
-   cy.getByTestid('page-accessories-modal').should('be.visible');
-   cy.getByTestid('share-link-management').should('be.visible');
+    cy.waitUntilSpinnerDisappear();
+    cy.getByTestid('page-accessories-modal').should('be.visible');
+    cy.getByTestid('share-link-management').should('be.visible');
 
 
-   cy.collapseSidebar(true);
-   cy.screenshot(`${ssPrefix}-open-share-link-management-bootstrap4`);
+    cy.collapseSidebar(true);
+    cy.screenshot(`${ssPrefix}-open-share-link-management-bootstrap4`);
   });
   });
 });
 });
 
 
@@ -297,209 +275,93 @@ context('Tag Oprations', { scrollBehavior: false }, () =>{
     const ssPrefix = 'tag-operations-add-new-tag-'
     const ssPrefix = 'tag-operations-add-new-tag-'
     const tag = 'we';
     const tag = 'we';
 
 
-    cy.visit('/Sandbox');
-    cy.waitUntilSkeletonDisappear();
+    cy.visit('/Sandbox/Bootstrap4');
 
 
-    cy.get('#edit-tags-btn-wrapper-for-tooltip > a').should('be.visible');
-    // eslint-disable-next-line cypress/no-unnecessary-waiting
-    cy.wait(200);
-    cy.get('#edit-tags-btn-wrapper-for-tooltip > a').click();
-    cy.get('#edit-tag-modal').should('be.visible').screenshot(`${ssPrefix}1-edit-tag-input`);
+    // Add tag
+    cy.get('#edit-tags-btn-wrapper-for-tooltip').as('edit-tag-tooltip').should('be.visible');
 
 
-    cy.get('#edit-tag-modal').within(() => {
-      cy.get('.rbt-input-main').type(tag, {force: true});
-      cy.get('#tag-typeahead-asynctypeahead').should('be.visible');
-      cy.get('#tag-typeahead-asynctypeahead-item-0').should('be.visible');
-      cy.screenshot(`${ssPrefix}2-type-tag-name`);
+    // open Edit Tags Modal
+    cy.waitUntil(() => {
+      // do
+      cy.get('@edit-tag-tooltip').find('a').click({force: true});
+      // wait until
+      return cy.get('#edit-tag-modal').then($elem => $elem.is(':visible'));
     });
     });
 
 
-    cy.get('#edit-tag-modal').within(() => {
+    cy.collapseSidebar(true);
+    cy.get('#edit-tag-modal').should('be.visible').screenshot(`${ssPrefix}1-edit-tag-input`);
+
+    cy.get('#edit-tag-modal').should('be.visible').within(() => {
+      cy.get('.rbt-input-main').type(tag);
       cy.get('#tag-typeahead-asynctypeahead').should('be.visible');
       cy.get('#tag-typeahead-asynctypeahead').should('be.visible');
       cy.get('#tag-typeahead-asynctypeahead-item-0').should('be.visible');
       cy.get('#tag-typeahead-asynctypeahead-item-0').should('be.visible');
-      cy.get('a#tag-typeahead-asynctypeahead-item-0').click({force: true})
-      cy.screenshot(`${ssPrefix}3-insert-tag-name`);
-    });
-
-    cy.get('#edit-tag-modal').within(() => {
+      // select
+      cy.get('a#tag-typeahead-asynctypeahead-item-0').click();
+      // save
       cy.get('div.modal-footer > button').click();
       cy.get('div.modal-footer > button').click();
     });
     });
 
 
     cy.get('.toast').should('be.visible').trigger('mouseover');
     cy.get('.toast').should('be.visible').trigger('mouseover');
     cy.get('.grw-taglabels-container > .grw-tag-labels > a').contains(tag).should('exist');
     cy.get('.grw-taglabels-container > .grw-tag-labels > a').contains(tag).should('exist');
-    /* eslint-disable cypress/no-unnecessary-waiting */
-    cy.wait(150); // wait for toastr to change its color occured by mouseover
-    cy.collapseSidebar(true);
-    cy.screenshot(`${ssPrefix}4-click-done`);
-  });
 
 
-  it('Successfully duplicate page by generated tag', () => {
-    const ssPrefix = 'tag-operations-page-duplicate-';
-    const tag = 'we';
-    const newPageName = 'our';
+    cy.screenshot(`${ssPrefix}2-click-done`);
+  });
 
 
-    cy.visit('/Sandbox');
-    cy.waitUntilSkeletonDisappear();
+});
 
 
-    cy.get('.grw-tag-label').should('be.visible').contains(tag).click();
+context('Shortcuts', () => {
+  const ssPrefix = 'shortcuts';
 
 
-    // Search result page
-    cy.getByTestid('search-result-base').should('be.visible');
-    cy.getByTestid('search-result-list').should('be.visible');
-    cy.getByTestid('search-result-content', { timeout: 60000 }).should('be.visible');
-    cy.get('#revision-loader', { timeout: 60000 }).contains('Table of Contents', { timeout: 60000 });
+  beforeEach(() => {
+    // login
+    cy.fixture("user-admin.json").then(user => {
+      cy.login(user.username, user.password);
+    });
+  });
 
 
-    // force to add 'active' to pass VRT: https://github.com/weseek/growi/pull/6603
-    cy.getByTestid('page-list-item-L').first().invoke('addClass', 'active');
-    cy.collapseSidebar(true);
-    cy.screenshot(`${ssPrefix}1-click-tag-name`);
-    cy.getByTestid('search-result-list').should('be.visible').then(($el)=>{
-      cy.wrap($el).within(()=>{
-        cy.getByTestid('open-page-item-control-btn').first().click();
-      });
+  it('Successfully updating a page using a shortcut on a previously created page', { scrollBehavior: false }, () => {
+    const body1 = 'hello';
+    const body2 = ' world!';
+    const savePageShortcutKey = '{ctrl+s}';
 
 
-      // eslint-disable-next-line cypress/no-unnecessary-waiting
-      cy.wait(1500); // for wait rendering pagelist info
-      cy.collapseSidebar(true);
-      cy.screenshot(`${ssPrefix}2-click-three-dots-menu`);
+    cy.visit('/Sandbox/child');
 
 
-      cy.wrap($el).within(()=>{
-        cy.getByTestid('open-page-item-control-btn').first().within(()=>{
-          cy.getByTestid('open-page-duplicate-modal-btn').click();
-        })
+    cy.get('#grw-page-editor-mode-manager').as('pageEditorModeManager').should('be.visible');
+    cy.waitUntil(() => {
+      // do
+      cy.get('@pageEditorModeManager').within(() => {
+        cy.get('button:nth-child(2)').click();
       });
       });
+      // until
+      return cy.get('.layout-root').then($elem => $elem.hasClass('editing'));
     })
     })
 
 
-    cy.getByTestid('page-duplicate-modal').should('be.visible').within(() => {
-      cy.get('.rbt-input-main').type(`-${newPageName}`, {force: true});
-    }).screenshot(`${ssPrefix}3-duplicate-page`);
-
-    cy.getByTestid('page-duplicate-modal').within(() => {
-      cy.intercept('POST', '/_api/v3/pages/duplicate').as('duplicate');
-      cy.get('.modal-footer > button.btn').click();
-      // Wait for completion of request to '/_api/v3/pages/duplicate'
-      cy.wait('@duplicate')
-    });
-
-    cy.visit(`Sandbox-${newPageName}`);
-    cy.waitUntilSkeletonDisappear();
-    cy.collapseSidebar(true);
-    cy.screenshot(`${ssPrefix}4-duplicated-page`);
-  });
-
-  it('Successfully rename page from generated tag', () => {
-    const ssPrefix = 'tag-operations-page-rename-';
-    const tag = 'we';
-    const oldPageName = '/Sandbox-our';
-    const newPageName = '/Sandbox-us';
-
-    cy.visit(oldPageName);
-    cy.waitUntilSkeletonDisappear();
-
-    cy.get('.grw-tag-label').should('be.visible').contains(tag).click();
+    cy.get('.grw-editor-navbar-bottom').should('be.visible');
 
 
-    // Search result page
-    cy.getByTestid('search-result-base').should('be.visible');
-    cy.getByTestid('search-result-list').should('be.visible');
-    cy.getByTestid('search-result-content', { timeout: 60000 }).should('be.visible');
-    cy.get('#revision-loader', { timeout: 60000 }).contains('Table of Contents', { timeout: 60000 });
+    // 1st
+    cy.get('.CodeMirror').type(body1);
+    cy.get('.CodeMirror').contains(body1);
+    cy.get('.page-editor-preview-body').contains(body1);
+    cy.get('.CodeMirror').type(savePageShortcutKey);
 
 
-    // eslint-disable-next-line cypress/no-unnecessary-waiting
-    cy.wait(300);
-    cy.collapseSidebar(true);
-    cy.screenshot(`${ssPrefix}1-click-tag-name`);
-
-    cy.getByTestid('search-result-list').within(() => {
-      cy.get('.list-group-item').each(($row) => {
-        if($row.find('a').text() === oldPageName){
-          cy.wrap($row).within(() => {
-            cy.getByTestid('open-page-item-control-btn').first().click();
-            cy.getByTestid('page-item-control-menu').should('have.class', 'show').then(() => {
-              // empty sentence in page list empty: https://github.com/weseek/growi/pull/6880
-              cy.getByTestid('revision-short-body-in-page-list-item-L').invoke('text', '');
-            });
-
-            cy.getByTestid('page-item-control-menu').within(()=>{
-              cy.getByTestid('open-page-delete-modal-btn');
-              cy.screenshot(`${ssPrefix}2-open-page-item-control-menu`);
-            })
-          });
-        }
-      });
+    cy.get('.Toastify__toast').should('be.visible').within(() => {
+      cy.get('.Toastify__close-button').should('be.visible').click();
+      cy.get('.Toastify__progress-bar').invoke('attr', 'style', 'display: none')
     });
     });
+    cy.screenshot(`${ssPrefix}-update-page-1`);
 
 
-    cy.getByTestid('search-result-list').within(() => {
-      cy.get('.list-group-item').each(($row) => {
-        if($row.find('a').text() === oldPageName){
-          cy.wrap($row).within(() => {
-            cy.getByTestid('open-page-move-rename-modal-btn').click({force: true});
-          });
-        }
-      });
-    });
+    cy.get('.Toastify').should('not.be.visible');
 
 
-    cy.getByTestid('page-rename-modal').should('be.visible').within(() => {
-      cy.get('.rbt-input-main').clear().type(newPageName,{force: true});
-    }).screenshot(`${ssPrefix}3-insert-new-page-name`);
+    // 2nd
+    cy.get('.CodeMirror').type(body2);
+    cy.get('.CodeMirror').contains(body2);
+    cy.get('.page-editor-preview-body').contains(body2);
+    cy.get('.CodeMirror').type(savePageShortcutKey);
 
 
-    cy.getByTestid('page-rename-modal').should('be.visible').within(() => {
-      cy.intercept('PUT', '/_api/v3/pages/rename').as('rename');
-      cy.getByTestid('grw-page-rename-button').should('not.be.disabled').click();
-      // Wait for completion of request to '/_api/v3/pages/rename'
-      cy.wait('@rename')
+    cy.get('.Toastify__toast').should('be.visible').within(() => {
+      cy.get('.Toastify__close-button').should('be.visible').click();
+      cy.get('.Toastify__progress-bar').invoke('attr', 'style', 'display: none')
     });
     });
-
-    cy.visit(newPageName);
-    cy.waitUntilSkeletonDisappear();
-
-    cy.getByTestid('grw-tag-labels').should('be.visible')
-    cy.collapseSidebar(true);
-    cy.screenshot(`${ssPrefix}4-new-page-name-applied`);
+    cy.screenshot(`${ssPrefix}-update-page-2`);
   });
   });
 });
 });
-
-// context('Shortcuts', () => {
-//   const ssPrefix = 'shortcuts';
-
-//   beforeEach(() => {
-//     // login
-//     cy.fixture("user-admin.json").then(user => {
-//       cy.login(user.username, user.password);
-//     });
-//   });
-
-//   it('Successfully updating a page using a shortcut on a previously created page', { scrollBehavior: false }, () => {
-//     const body1 = 'hello';
-//     const body2 = 'world';
-//     const savePageShortcutKey = '{ctrl+s}';
-
-//     cy.visit('/Sandbox/child');
-//     cy.waitUntilSkeletonDisappear();
-
-//     cy.get('#grw-subnav-container').within(() => {
-//       cy.getByTestid('editor-button').click();
-//     });
-
-//     cy.get('.layout-root').should('have.class', 'editing');
-//     cy.get('.grw-editor-navbar-bottom').should('be.visible');
-
-//     // 1st
-//     cy.get('.CodeMirror').type(body1);
-//     cy.get('.CodeMirror').contains(body1);
-//     cy.get('.page-editor-preview-body').contains(body1);
-//     cy.get('.CodeMirror').type(savePageShortcutKey);
-
-//     cy.get('.Toastify').should('visible').trigger('mouseover');
-//     cy.screenshot(`${ssPrefix}-update-page-1`);
-//     cy.get('.Toastify__close-button').should('be.visible').click();
-//     cy.get('.Toastify').should('not.be.visible');
-
-//     // 2nd
-//     cy.get('.CodeMirror').type(body2);
-//     cy.get('.CodeMirror').contains(body2);
-//     cy.get('.page-editor-preview-body').contains(body2);
-//     cy.get('.CodeMirror').type(savePageShortcutKey);
-
-//     cy.get('.Toastify').should('visible').trigger('mouseover');
-//     cy.screenshot(`${ssPrefix}-update-page-2`);
-//   });
-// });