Sfoglia il codice sorgente

Revert "imprv test"

This reverts commit 6a1bac4c4dbf9e3ad45527ed7423a7718dbe7193.
Shun Miyazawa 3 anni fa
parent
commit
2a306da042

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

@@ -439,10 +439,12 @@ context('Shortcuts', () => {
     });
     });
   });
   });
 
 
-  it('Successfully updating a page using a shortcut on a previously created page',{ scrollBehavior: false }, () => {
+  it('Successfully updating a page using a shortcut on a previously created page', () => {
+    const body1 = 'hello';
+    const body2 = 'world';
     const savePageShortcutKey = '{ctrl+s}'
     const savePageShortcutKey = '{ctrl+s}'
 
 
-    cy.visit('/Sandbox');
+    cy.visit('/Sandbox/child');
     cy.waitUntilSkeletonDisappear();
     cy.waitUntilSkeletonDisappear();
 
 
     cy.get('#grw-subnav-container').within(() => {
     cy.get('#grw-subnav-container').within(() => {
@@ -453,14 +455,20 @@ context('Shortcuts', () => {
     cy.get('.grw-editor-navbar-bottom').should('be.visible');
     cy.get('.grw-editor-navbar-bottom').should('be.visible');
 
 
     // 1st
     // 1st
+    cy.get('.CodeMirror').type(body1);
+    cy.get('.page-editor-preview-body').contains(body1);
     cy.get('.CodeMirror').type(savePageShortcutKey);
     cy.get('.CodeMirror').type(savePageShortcutKey);
+
     cy.get('.toast').should('be.visible').trigger('mouseover');
     cy.get('.toast').should('be.visible').trigger('mouseover');
     cy.screenshot(`${ssPrefix}-update-page-1`);
     cy.screenshot(`${ssPrefix}-update-page-1`);
     cy.get('.toast-close-button').click();
     cy.get('.toast-close-button').click();
     cy.get('.toast').should('not.exist');
     cy.get('.toast').should('not.exist');
 
 
     // 2nd
     // 2nd
+    cy.get('.CodeMirror').type(body2);
+    cy.get('.page-editor-preview-body').contains(body2);
     cy.get('.CodeMirror').type(savePageShortcutKey);
     cy.get('.CodeMirror').type(savePageShortcutKey);
+
     cy.get('.toast').should('be.visible').trigger('mouseover');
     cy.get('.toast').should('be.visible').trigger('mouseover');
     cy.screenshot(`${ssPrefix}-update-page-2`);
     cy.screenshot(`${ssPrefix}-update-page-2`);
   });
   });