Skip to content

Commit

Permalink
Merge pull request #3637 from nextcloud/backport/3634/stable29
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Apr 30, 2024
2 parents 7c35017 + 654cd50 commit 88a8d9d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
13 changes: 7 additions & 6 deletions cypress/e2e/integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Nextcloud integration', function() {
it('Sharing sidebar', function() {
cy.get('@loleafletframe').within(() => {
cy.get('#File-tab-label').click()
cy.get('#ShareAs').click()
cy.get('#ShareAs-button').click()
})

cy.get('#app-sidebar-vue')
Expand All @@ -62,7 +62,7 @@ describe('Nextcloud integration', function() {
it('Versions sidebar', function() {
cy.get('@loleafletframe').within(() => {
cy.get('#File-tab-label').click()
cy.get('#Rev-History').click()
cy.get('#Rev-History-button').click()
})

cy.get('#app-sidebar-vue')
Expand All @@ -76,11 +76,12 @@ describe('Nextcloud integration', function() {
cy.get('#tab-version_vue .version__info__label').contains('Current version')
})

// Currently it seems that Collabora is missing the save as button
it('Save as', function() {
cy.get('@loleafletframe').within(() => {
cy.get('#File-tab-label').click()
cy.get('#saveas').click()
cy.get('#w2ui-overlay-download-as-menu .menu-text').eq(1).click()
cy.get('#saveas-entries #saveas-entry-1').click()
})

cy.get('.saveas-dialog').should('be.visible')
Expand Down Expand Up @@ -128,16 +129,16 @@ describe('Nextcloud integration', function() {
it('Insert image', function() {
cy.get('@loleafletframe').within(() => {
cy.get('#Insert-tab-label').click()
cy.get('#insert-insert-graphic').click()
cy.get('#w2ui-overlay-insert-graphic-menu .menu-text').eq(1).click()
cy.get('#insert-insert-graphic-button').click()
cy.get('#insert-insert-graphic-entries #insert-insert-graphic-entry-1').click()
})
cy.get('.modal-container__content').should('be.visible')
})

it('Smart picker', function() {
cy.get('@loleafletframe').within(() => {
cy.get('#Insert-tab-label').click()
cy.get('#insert-insert-remote-link').click()
cy.get('#insert-insert-remote-link-button').click()
})
cy.get('.reference-picker-modal--content').should('be.visible')
})
Expand Down
5 changes: 3 additions & 2 deletions cypress/e2e/open.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ describe('Open existing office files', function() {
cy.waitForViewer()
cy.waitForCollabora()

cy.screenshot('open-file_' + filename)
cy.waitForPostMessage('App_LoadingStatus', { Status: 'Document_Loaded' })

// Share action
cy.wait(2000)
cy.get('@loleafletframe').within(() => {
cy.get('#main-menu #menu-file > a').click()
cy.get('#main-menu #menu-shareas > a').click()
cy.get('#main-menu #menu-shareas > a').should('be.visible').click()
})

cy.get('#app-sidebar-vue')
Expand Down
10 changes: 1 addition & 9 deletions cypress/e2e/share-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,7 @@ describe('Public sharing of office documents', function() {
})

cy.waitForCollabora()
cy.get('@postMessage', { timeout: 20000 }).should(spy => {
const calls = spy.getCalls()
const findMatchingCall = calls.find(call => call.args[0].indexOf('"MessageId":"App_LoadingStatus"') !== -1)
if (!findMatchingCall) {
return expect(findMatchingCall).to.not.be.undefined
}
const object = JSON.parse(findMatchingCall.args[0])
expect(object.Values).to.have.property('Status', 'Initialized')
})
cy.waitForPostMessage('App_LoadingStatus', { Status: 'Document_Loaded' })

cy.get('@loleafletframe').within(() => {
cy.get('#closebutton').click()
Expand Down
2 changes: 2 additions & 0 deletions src/view/Office.vue
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ export default {
case 'UI_ZoteroKeyMissing':
this.showZotero = true
break
// FIXME: Remove once https://github.com/CollaboraOnline/online/pull/8926 is released
case 'UI UI_PickLink':
case 'UI_PickLink':
this.pickLink()
break
Expand Down

0 comments on commit 88a8d9d

Please sign in to comment.