[Libreoffice-commits] online.git: cypress_test/integration_tests
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 11 16:28:00 UTC 2020
cypress_test/integration_tests/common/helper.js | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
New commits:
commit 69645b9697d3296a62e11a90cb0633b0ae3b4501
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Sep 10 15:56:09 2020 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri Sep 11 18:27:42 2020 +0200
cypress: NC: delete exisitng test file more effectively.
We could not remove the existing test file, if there are
a lots of files in the NC storage, because in this case
not all files were displayed on the screen and so we could
not know whether the file was there or not.
So instead we remove all files, what we can do easily.
Change-Id: Iae7a8ee5c2064ecd94c29d990b7507001827b0dc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102469
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/cypress_test/integration_tests/common/helper.js b/cypress_test/integration_tests/common/helper.js
index ce08fe87f..4550ad90c 100644
--- a/cypress_test/integration_tests/common/helper.js
+++ b/cypress_test/integration_tests/common/helper.js
@@ -84,15 +84,25 @@ function loadTestDocNextcloud(fileName, subFolder) {
cy.get('#free_space')
.should('not.have.attr', 'value', '');
- // Remove file if exists
+ // Remove all files
cy.get('#fileList')
.then(function(filelist) {
- if (filelist.find('tr[data-file=\'' + fileName + '\']').length !== 0) {
- cy.get('tr[data-file=\'' + fileName + '\'] .action-menu.permanent')
- .click();
-
- cy.get('.menuitem.action.action-delete.permanent')
- .click();
+ if (filelist.find('tr').length !== 0) {
+ cy.waitUntil(function() {
+ cy.get('#fileList tr:nth-of-type(1) .action-menu.permanent')
+ .click();
+
+ cy.get('.menuitem.action.action-delete.permanent')
+ .click();
+
+ cy.get('#uploadprogressbar')
+ .should('not.be.visible');
+
+ return cy.get('#fileList')
+ .then(function(filelist) {
+ return filelist.find('tr').length === 0;
+ });
+ }, {timeout: 60000});
}
});
More information about the Libreoffice-commits
mailing list