diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-11-17 10:31:29 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-11-17 11:01:10 +0300 |
commit | 13d9bce480ea44a3547c1376effb6186dc71dfac (patch) | |
tree | 278d913b838ee4f975d05317a81fdb869d3b4b8c /cypress | |
parent | 776afefc88bbe59f7da40c55abbd4f0cb67bf8c1 (diff) |
Wait for file list
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/integration/share.spec.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cypress/integration/share.spec.js b/cypress/integration/share.spec.js index 1d1fdfe0d..cf88eb42f 100644 --- a/cypress/integration/share.spec.js +++ b/cypress/integration/share.spec.js @@ -31,21 +31,25 @@ describe('Open test.md in viewer', function() { cy.nextcloudCreateUser(randUser, 'password') cy.login(randUser, 'password') - // Upload test files - cy.uploadFile('test.md', 'text/markdown') - cy.uploadFile('test.md', 'text/markdown', 'test2.md') - cy.createFolder('folder') - cy.uploadFile('test.md', 'text/markdown', 'folder/test.md') - cy.visit('/apps/files') - cy.get('#fileList tr[data-file="test.md"]', {timeout: 10000}) - .should('contain', 'test.md') - // FIXME: files app is thowing the following error for some reason // Uncaught TypeError: Cannot read property 'protocol' of undefined // Same for appswebroots setting in tests cy.on('uncaught:exception', (err, runnable) => { return false }) + + cy.get('#fileList tr[data-file="welcome.txt"]', {timeout: 10000}) + .should('contain', 'welcome.txt') + + // Upload test files + cy.createFolder('folder') + cy.uploadFile('test.md', 'text/markdown', 'folder/test.md') + cy.uploadFile('test.md', 'text/markdown', 'test2.md') + cy.uploadFile('test.md', 'text/markdown') + cy.wait(1000) + cy.visit('/apps/files') + cy.get('#fileList tr[data-file="test.md"]', {timeout: 10000}) + .should('contain', 'test.md') }) after(function () { cy.visit('/apps/files') |