Skip to content
Snippets Groups Projects
Commit e89faa53 authored by Arie Peterson's avatar Arie Peterson
Browse files

Merge branch '1122-unpredictable-test-behaviour-when-creating-document' into 'main'

Resolve "Unpredictable test behaviour when creating document"

Closes #1122

See merge request !596
parents 6e91edf1 364e7148
No related branches found
No related tags found
1 merge request!596Resolve "Unpredictable test behaviour when creating document"
......@@ -260,9 +260,6 @@ To publish a new version of the helm chart:
3. Update `CHANGELOG.md` and check that it includes relevant changes, including
ones added by renovatebot.
4. Commit and push these changes to `main`.
5. Create a new git tag for the new release and push it to gitlab as well. Note
that both the pipeline for the `main` branch and for the tag will use the
`nc` namespace, so you may not want to push the branch and tag right after
each other.
5. Create a new git tag for the new release and push it to gitlab as well.
The last step will trigger a CI run that will package and publish the helm chart.
......@@ -59,12 +59,19 @@ describe('Test nextcloud', () => {
const file_rand = 'test-' + Math.random().toString(16).substr(2, 12)
cy.contains('button', 'New document').click()
cy.get('input[placeholder="Filename"]').type('{selectAll}{del}' + file_rand + '.docx{enter}')
// With older Nextcloud, creating the new document this way would also open
// it automatically. It seems with newer nextcloud/onlyoffice that is no
// longer the case.
// Ah with 29 it seems to work again. Keeping this in commented form in
// case it breaks again.
// cy.contains('a:not(.recommendation)', file_rand).should('exist').click()
// Nextcloud and/or the onlyoffice app has unpredictable behaviour at this
// point: sometimes when creating the new office document, it will be
// opened automatically and sometimes it won't. This is rather painful to
// check in an automated test, not least because we don't know how long
// we should wait for the automatic opening to happen.
cy.wait(10000)
cy.get('body').then((bodyElement) => {
if (bodyElement.find('#onlyofficeFrame').length == 0) {
// After waiting 10 seconds, we don't see the frame yet. We assume it's
// not going to be opened automatically so we click the new file now.
cy.contains('a:not(.recommendation)', file_rand).should('exist').click()
}
})
// Test Onlyoffice
cy.frameLoaded('#onlyofficeFrame')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment