summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2020-11-09 18:58:05 +0100
committerTamás Zolnai <zolnaitamas2000@gmail.com>2020-11-25 01:37:08 +0100
commit4b338c169b0c64d41dddaad12ed05aec079cf633 (patch)
tree2a5de1a70d8bc4f08418b009b9f67b5f00f29cf6
parentcypress: php-proxy: disable retries. (diff)
downloadonline-4b338c169b0c64d41dddaad12ed05aec079cf633.tar.gz
online-4b338c169b0c64d41dddaad12ed05aec079cf633.zip
cypress: NC: sidebar can be hidden by default in NC.
Change-Id: I5292ba2bcbf840f0128bd28be3f381672b45fa7f Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 6a96d3f6d9a28cd6b6b0943f56af8029d01fabcc)
-rw-r--r--cypress_test/integration_tests/common/desktop_helper.js10
-rw-r--r--cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js8
2 files changed, 16 insertions, 2 deletions
diff --git a/cypress_test/integration_tests/common/desktop_helper.js b/cypress_test/integration_tests/common/desktop_helper.js
index 05278c5e9c..ed53656292 100644
--- a/cypress_test/integration_tests/common/desktop_helper.js
+++ b/cypress_test/integration_tests/common/desktop_helper.js
@@ -63,7 +63,17 @@ function showSidebarIfHidden() {
});
}
+function hideSidebarIfVisible() {
+ cy.get('#tb_editbar_item_sidebar .w2ui-button')
+ .then(function(sidebarItem) {
+ if (sidebarItem.hasClass('checked')) {
+ hideSidebar();
+ }
+ });
+}
+
module.exports.showSidebar = showSidebar;
module.exports.hideSidebar = hideSidebar;
module.exports.showStatusBarIfHidden = showStatusBarIfHidden;
module.exports.showSidebarIfHidden = showSidebarIfHidden;
+module.exports.hideSidebarIfVisible = hideSidebarIfVisible;
diff --git a/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js b/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js
index c0a7489244..3434eaab30 100644
--- a/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js
+++ b/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js
@@ -1,4 +1,4 @@
-/* global describe it cy beforeEach require afterEach */
+/* global describe it cy beforeEach require afterEach Cypress */
var helper = require('../../common/helper');
var impressHelper = require('../../common/impress_helper');
@@ -10,7 +10,11 @@ describe('Top toolbar tests.', function() {
beforeEach(function() {
helper.beforeAll(testFileName, 'impress');
- desktopHelper.hideSidebar();
+ if (Cypress.env('INTEGRATION') === 'nextcloud') {
+ desktopHelper.hideSidebarIfVisible();
+ } else {
+ desktopHelper.hideSidebar();
+ }
impressHelper.selectTextShapeInTheCenter();
});