Skip to content

Commit 16a986d

Browse files
committed
fixup! tests(cypress): Bring back close/save assertion for direct editing tests
1 parent efffe02 commit 16a986d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cypress/e2e/directediting.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ describe('direct editing', function() {
6363

6464
it('Open an existing file, edit it', () => {
6565
cy.intercept({ method: 'POST', url: '**/session/close' }).as('closeRequest')
66+
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
67+
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
68+
6669
createDirectEditingLink(user, 'empty.md')
6770
.then((token) => {
6871
cy.logout()
@@ -74,8 +77,6 @@ describe('direct editing', function() {
7477
cy.getContent().type('{enter}')
7578
cy.getContent().type('{ctrl+s}')
7679

77-
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
78-
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
7980
cy.wait('@push')
8081
cy.wait('@sync')
8182

@@ -90,6 +91,8 @@ describe('direct editing', function() {
9091

9192
it('Create a file, edit it', () => {
9293
cy.intercept({ method: 'POST', url: '**/session/close' }).as('closeRequest')
94+
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
95+
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
9396

9497
createDirectEditingLinkForNewFile(user, 'newfile.md')
9598
.then((token) => {
@@ -103,8 +106,6 @@ describe('direct editing', function() {
103106
cy.getContent().type('{enter}')
104107
cy.getContent().type('{ctrl+s}')
105108

106-
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
107-
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
108109
cy.wait('@push')
109110
cy.wait('@sync')
110111

@@ -119,6 +120,8 @@ describe('direct editing', function() {
119120

120121
it('Open an existing plain text file, edit it', () => {
121122
cy.intercept({ method: 'POST', url: '**/session/close' }).as('closeRequest')
123+
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
124+
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
122125

123126
createDirectEditingLink(user, 'empty.txt')
124127
.then((token) => {
@@ -132,9 +135,6 @@ describe('direct editing', function() {
132135
cy.getContent().type('{enter}')
133136
cy.getContent().type('{ctrl+s}')
134137

135-
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
136-
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
137-
138138
cy.wait('@push')
139139
cy.wait('@sync')
140140

0 commit comments

Comments
 (0)