Skip to content

Commit e42cb84

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

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

cypress/e2e/directediting.spec.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ 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')
6866
createDirectEditingLink(user, 'empty.md')
6967
.then((token) => {
7068
cy.logout()
@@ -75,6 +73,8 @@ describe('direct editing', function() {
7573
cy.getContent().type('Some text')
7674
cy.getContent().type('{enter}')
7775

76+
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
77+
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
7878
cy.wait('@push')
7979
cy.wait('@sync')
8080

@@ -89,8 +89,6 @@ describe('direct editing', function() {
8989

9090
it('Create a file, edit it', () => {
9191
cy.intercept({ method: 'POST', url: '**/session/close' }).as('closeRequest')
92-
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
93-
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
9492

9593
createDirectEditingLinkForNewFile(user, 'newfile.md')
9694
.then((token) => {
@@ -103,6 +101,8 @@ describe('direct editing', function() {
103101
cy.getContent().type('Some text')
104102
cy.getContent().type('{enter}')
105103

104+
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
105+
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
106106
cy.wait('@push')
107107
cy.wait('@sync')
108108

@@ -117,8 +117,6 @@ describe('direct editing', function() {
117117

118118
it('Open an existing plain text file, edit it', () => {
119119
cy.intercept({ method: 'POST', url: '**/session/close' }).as('closeRequest')
120-
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
121-
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
122120

123121
createDirectEditingLink(user, 'empty.txt')
124122
.then((token) => {
@@ -131,6 +129,9 @@ describe('direct editing', function() {
131129
cy.getContent().type('Some text')
132130
cy.getContent().type('{enter}')
133131

132+
cy.intercept({ method: 'POST', url: '**/session/push' }).as('push')
133+
cy.intercept({ method: 'POST', url: '**/session/sync' }).as('sync')
134+
134135
cy.wait('@push')
135136
cy.wait('@sync')
136137

0 commit comments

Comments
 (0)