Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/nextcloud/cypress-1.…
Browse files Browse the repository at this point in the history
…0.0-beta.14
  • Loading branch information
elzody authored Feb 26, 2025
2 parents 9a4cc6b + b97a2bb commit 36fe290
Show file tree
Hide file tree
Showing 23 changed files with 183 additions and 100 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 33 additions & 19 deletions cypress/e2e/integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ describe('Nextcloud integration', function() {

it('Sharing sidebar', function() {
cy.get('@loleafletframe').within(() => {
cy.get('#File-tab-label').click()
cy.get('#ShareAs-button').click()
cy.get('.notebookbar-tabs-container', { timeout: 30_000 })
.should('be.visible')

cy.get('button[aria-label="File"]').click()
cy.get('button#ShareAs-button').click()
})

cy.get('#app-sidebar-vue')
Expand All @@ -47,8 +50,11 @@ describe('Nextcloud integration', function() {

it('Versions sidebar', function() {
cy.get('@loleafletframe').within(() => {
cy.get('#File-tab-label').click()
cy.get('#Rev-History-button').click()
cy.get('.notebookbar-tabs-container', { timeout: 30_000 })
.should('be.visible')

cy.get('button[aria-label="File"]').click()
cy.get('button[aria-label="See history"]').click()
})

cy.get('#app-sidebar-vue')
Expand All @@ -65,32 +71,40 @@ describe('Nextcloud integration', function() {
it('Save as', function() {
const exportFilename = 'document.rtf'
cy.get('@loleafletframe').within(() => {
cy.get('#File-tab-label').click()
cy.get('#saveas').click()
cy.get('.notebookbar-tabs-container', { timeout: 30_000 })
.should('be.visible')

cy.get('button[aria-label="File"]').click()
cy.get('button[aria-label="Save As"]').click()

cy.get('#saveas-entries #saveas-entry-1').click()
})

cy.get('.saveas-dialog').should('be.visible')
cy.get('.saveas-dialog input[type=text]')
.should('be.visible')
.should('have.value', `/${exportFilename}`)

cy.get('.saveas-dialog button.button-vue--vue-primary').click()
cy.get('.saveas-dialog').should('be.visible')
cy.get('.saveas-dialog input[type=text]')
.should('be.visible')
.should('have.value', `/${exportFilename}`)

cy.get('@loleafletframe').within(() => {
cy.get('#closebutton').click()
cy.waitForViewerClose()
})
cy.get('.saveas-dialog button.button-vue--vue-primary').click()

// FIXME: We should not need to reload
cy.get('.breadcrumb__crumbs a').eq(0).click({ force: true })
cy.get('@loleafletframe').within(() => {
cy.get('#closebutton').click()
cy.waitForViewerClose()
})

cy.openFile(exportFilename)
// FIXME: We should not need to reload
cy.get('.breadcrumb__crumbs a').eq(0).click({ force: true })

cy.openFile(exportFilename)
})

it('Open locally', function() {
cy.get('@loleafletframe').within(() => {
cy.get('#Open_Local_Editor').click()
cy.get('.notebookbar-shortcuts-bar', { timeout: 30_000 })
.should('be.visible')

cy.get('button[aria-label="Open in local editor"]').click()
})

cy.get('.confirmation-dialog').should('be.visible')
Expand Down
10 changes: 3 additions & 7 deletions cypress/e2e/open.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ describe('Open existing office files', function() {
// Share action
cy.wait(2000)
cy.get('@loleafletframe').within(() => {
cy.get('#main-menu #menu-file > a').click()
cy.get('#main-menu #menu-shareas > a').should('be.visible').click()
cy.verifyOpen(filename)
})
cy.verifyOpen(filename)

// FIXME: wait for sidebar tab content
// FIXME: validate sharing tab
Expand All @@ -69,9 +67,8 @@ describe('Open existing office files', function() {

cy.screenshot('open-file_' + filename)
cy.get('@loleafletframe').within(() => {
cy.get('button.icon-nextcloud-sidebar').click()
cy.verifyOpen(filename)
})
cy.verifyOpen(filename)
// FIXME: wait for sidebar tab content
// FIXME: validate sharing tab
cy.screenshot('share-sidebar_' + filename)
Expand Down Expand Up @@ -133,9 +130,8 @@ describe('Open PDF with richdocuments', () => {

// Verify that the correct file is open
cy.get('@loleafletframe').within(() => {
cy.get('button.icon-nextcloud-sidebar').click()
cy.verifyOpen('document.pdf')
})
cy.verifyOpen('document.pdf')

// Make sure we can close the document
cy.closeDocument()
Expand Down
10 changes: 4 additions & 6 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Cypress.Commands.add('nextcloudTestingAppConfigSet', (appId, configKey, configVa
})

Cypress.Commands.add('waitForViewer', () => {
cy.get('#viewer', { timeout: 30000 })
cy.get('#viewer', { timeout: 50000 })
.should('be.visible')
.and('have.class', 'modal-mask')
.and('not.have.class', 'icon-loading')
Expand Down Expand Up @@ -292,11 +292,9 @@ Cypress.Commands.add('closeDocument', () => {
})

Cypress.Commands.add('verifyOpen', (filename) => {
cy.get('#app-sidebar-vue')
.should('be.visible')
cy.get('.app-sidebar-header__mainname')
.should('be.visible')
.should('contain.text', filename)
cy.get('input#document-name-input').should(($docName) => {
expect($docName.val()).to.equal(filename)
})
})

Cypress.Commands.add('uploadSystemTemplate', ({ fixturePath, fileName, mimeType }) => {
Expand Down
12 changes: 7 additions & 5 deletions l10n/da.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OC.L10N.register(
"New Presentation.odp" : "Ny præsentation.odp",
"New Document.docx" : "Nyt dokument.docx",
"New Spreadsheet.xlsx" : "Nyt regneark.xlsx",
"New Presentation.pptx" : "Nyt præsentation.pptx",
"New Presentation.pptx" : "Ny præsentation.pptx",
"File already exists" : "Filen findes allerede",
"Saved" : "Gemt",
"The file was uploaded" : "Filen blev uploadet",
Expand All @@ -28,9 +28,9 @@ OC.L10N.register(
"Word Document (.docx)" : "Word dokument (.docx)",
"OpenDocument Text (.odt)" : "OpenDocument tekst (.odt)",
"Excel Workbook (.xlsx)" : "Excel regneark (.xlsx)",
"New document" : "Nyt Dokument",
"New spreadsheet" : "Nyt Regneark",
"New presentation" : "Ny Præsentation",
"New document" : "Nyt dokument",
"New spreadsheet" : "Nyt regneark",
"New presentation" : "Ny præsentation",
"New diagram" : "Nyt diagram",
"Headings" : "Overskrifter",
"Images" : "Billeder",
Expand Down Expand Up @@ -59,7 +59,7 @@ OC.L10N.register(
"Select file or folder to link to" : "Link til fil eller mappe",
"Select file" : "Vælg fil",
"Close" : "Luk",
"Edit" : "Redigér",
"Edit" : "Rediger",
"The file should now open locally. If you don't see this happening, make sure that the desktop client is installed on your system." : "Filen skulle nu åbne lokalt. Hvis dette ikke sker, så vær sikker på at desktopklienten er installeret på dit system.",
"Failed to revert the document to older version" : "Det lykkedes ikke at gendanne dokumentet, til en ældre version",
"Remove from favorites" : "Fjernet fra favoritter",
Expand All @@ -79,6 +79,8 @@ OC.L10N.register(
"New filename" : "Nyt filnavn",
"Saving…" : "Gemmer...",
"Create a new document" : "Opret nyt dokument",
"Add a new template" : "Opret en ny skabelon",
"Add a new one?" : "Tilføj en ny?",
"Collabora Online" : "Collabora Online"
},
"nplurals=2; plural=(n != 1);");
12 changes: 7 additions & 5 deletions l10n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"New Presentation.odp" : "Ny præsentation.odp",
"New Document.docx" : "Nyt dokument.docx",
"New Spreadsheet.xlsx" : "Nyt regneark.xlsx",
"New Presentation.pptx" : "Nyt præsentation.pptx",
"New Presentation.pptx" : "Ny præsentation.pptx",
"File already exists" : "Filen findes allerede",
"Saved" : "Gemt",
"The file was uploaded" : "Filen blev uploadet",
Expand All @@ -26,9 +26,9 @@
"Word Document (.docx)" : "Word dokument (.docx)",
"OpenDocument Text (.odt)" : "OpenDocument tekst (.odt)",
"Excel Workbook (.xlsx)" : "Excel regneark (.xlsx)",
"New document" : "Nyt Dokument",
"New spreadsheet" : "Nyt Regneark",
"New presentation" : "Ny Præsentation",
"New document" : "Nyt dokument",
"New spreadsheet" : "Nyt regneark",
"New presentation" : "Ny præsentation",
"New diagram" : "Nyt diagram",
"Headings" : "Overskrifter",
"Images" : "Billeder",
Expand Down Expand Up @@ -57,7 +57,7 @@
"Select file or folder to link to" : "Link til fil eller mappe",
"Select file" : "Vælg fil",
"Close" : "Luk",
"Edit" : "Redigér",
"Edit" : "Rediger",
"The file should now open locally. If you don't see this happening, make sure that the desktop client is installed on your system." : "Filen skulle nu åbne lokalt. Hvis dette ikke sker, så vær sikker på at desktopklienten er installeret på dit system.",
"Failed to revert the document to older version" : "Det lykkedes ikke at gendanne dokumentet, til en ældre version",
"Remove from favorites" : "Fjernet fra favoritter",
Expand All @@ -77,6 +77,8 @@
"New filename" : "Nyt filnavn",
"Saving…" : "Gemmer...",
"Create a new document" : "Opret nyt dokument",
"Add a new template" : "Opret en ny skabelon",
"Add a new one?" : "Tilføj en ny?",
"Collabora Online" : "Collabora Online"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
6 changes: 3 additions & 3 deletions l10n/de.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions l10n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"This might be due to a missing configuration of your web server. For more information, please visit: " : "Dies kann an einer fehlenden Konfiguration deines Webservers liegen. Für weitere Informationen, besuche bitte:",
"Connecting Collabora Online Single Click with Nginx" : "Collabora Online mit einem Klick mit Nginx verbinden",
"Setting up a new server" : "Neuen Server einrichten",
"Collabora Online should use the same protocol as the server installation." : "Collabora Online sollte das gleiche Protokoll wie die Server-Installation nutzen.",
"Collabora Online should use the same protocol as the server installation." : "Collabora Online sollte das gleiche Protokoll wie die Serverinstallation nutzen.",
"Your browser has been unable to connect to the Collabora server:" : "Dein Browser konnte keine Verbindung zum Collabora-Server herstellen:",
"This URL is determined on the Collabora server either from the configured URL or the server_name parameter in coolwsd.xml." : "Diese URL wird auf dem Collabora-Server entweder aus der konfigurierten URL oder dem Parameter server_name in coolwsd.xml ermittelt.",
"Collabora Online server is reachable." : "Collabora Online Server ist erreichbar.",
Expand Down Expand Up @@ -249,7 +249,7 @@
"New drawing" : "Neue Zeichnung",
"Could not create file" : "Die Datei konnte nicht erstellt werden",
"Select template" : "Vorlage auswählen",
"Saved with error: Collabora Online should use the same protocol as the server installation." : "Mit Fehler gespeichert: Collabora Online sollte das gleiche Protokoll wie die Server-Installation nutzen.",
"Saved with error: Collabora Online should use the same protocol as the server installation." : "Mit Fehler gespeichert: Collabora Online sollte das gleiche Protokoll wie die Serverinstallation nutzen.",
"Could not establish connection to the Collabora Online server. This might be due to a missing configuration of your web server. For more information, please visit: " : "Es konnte keine Verbindung zum Collabora Online-Server hergestellt werden. Dies könnte auf eine fehlende Konfiguration deines Web-Servers zurückzuführen sein. Für weitere Informationen besuche bitte:",
"Nextcloud Office requires a seperate server running Collabora Online to provide editing capabilities." : "Nextcloud Office benötigt einen separaten Server, auf dem Collabora Online läuft, um Funktionen zur Bearbeitungs bereitzustellen.",
"Collabora Online requires a seperate server acting as a WOPI-like Client to provide editing capabilities." : "Collabora Online benötigt einen separaten Server, der als WOPI-ähnlicher-Client fungiert, um Funktionen zum Bearbeiten bereitzustellen.",
Expand All @@ -262,7 +262,7 @@
"Set" : "Setzen",
"Please enter the filename to store the document as." : "Bitte den Dateinamen angeben, unter welchem dieses Dokument gespeichert werden soll.",
"New filename" : "Neuer Dateiname",
"Failed to connect to {productName}. Please try again later or contact your server administrator." : "Fehler beim Verbinden mit {productName}. Bitte versuchen es noch einmal oder kontaktiere deinen Administrator.",
"Failed to connect to {productName}. Please try again later or contact your server administrator." : "Fehler beim Verbinden mit {productName}. Bitte versuchen es noch einmal oder kontaktiere deine Administration.",
"Saving…" : "Speichere …",
"Insert from {name}" : "Einfügen von {name}",
"Last saved version" : "Letzte gespeicherte Version",
Expand Down
Loading

0 comments on commit 36fe290

Please sign in to comment.