Skip to content

Commit 0c43550

Browse files
committed
test(direct-editing): Add test for save as in direct editing
Signed-off-by: Julius Knorr <[email protected]>
1 parent 247ad20 commit 0c43550

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

cypress/e2e/direct.spec.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,41 @@ describe('Direct editing (legacy)', function() {
161161
})
162162
})
163163

164+
it('Save as', function() {
165+
createDirectEditingLink(randUser, fileId)
166+
.then((token) => {
167+
cy.nextcloudTestingAppConfigSet('richdocuments', 'uiDefaults-UIMode', 'tabbed')
168+
cy.logout()
169+
cy.visit(token)
170+
cy.waitForCollabora(false)
171+
172+
cy.get('@loleafletframe').within(() => {
173+
cy.get('.notebookbar-tabs-container', { timeout: 30_000 })
174+
.should('be.visible')
175+
176+
cy.get('button[aria-label="File"]').click()
177+
cy.get('button[aria-label="Save As"]').click()
178+
179+
cy.get('#saveas-entries #saveas-entry-1').click()
180+
})
181+
182+
cy.get('.saveas-dialog')
183+
.should('be.visible')
184+
cy.get('.saveas-dialog input[type=text]')
185+
.should('be.visible')
186+
.should('have.value', 'document.odt')
187+
188+
cy.get('.saveas-dialog input[type=text]')
189+
.clear()
190+
cy.get('.saveas-dialog input[type=text]')
191+
.type('/document.rtf')
192+
193+
cy.get('.saveas-dialog button.button-vue--vue-primary').click()
194+
195+
cy.get('@loleafletframe').within(() => {
196+
cy.verifyOpen('document.rtf')
197+
})
198+
})
199+
})
200+
164201
})

0 commit comments

Comments
 (0)