Преглед изворни кода

Wait for completion of request

Shun Miyazawa пре 2 година
родитељ
комит
c5935dc0db
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      apps/app/test/cypress/e2e/23-editor/23-editor--with-navigation.cy.ts

+ 2 - 0
apps/app/test/cypress/e2e/23-editor/23-editor--with-navigation.cy.ts

@@ -69,7 +69,9 @@ context('Editor while uploading to a new page', () => {
     cy.get('.dropzone').selectFile(filePath, { action: 'drag-drop' });
 
     // Update page using shortcut keys
+    cy.intercept('POST', '/_api/attachments.add').as('attachmentsAdd');
     cy.get('.CodeMirror').type('{ctrl+s}');
+    cy.wait('@attachmentsAdd')
 
     // expect
     cy.get('.Toastify__toast').should('contain.text', 'Saved successfully');