summaryrefslogtreecommitdiffstats
path: root/cypress_test/integration_tests/desktop
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2023-06-25 19:06:05 +0200
committerMarco Cecchetti <mrcekets@gmail.com>2023-06-29 13:43:13 +0200
commit2cf2a1e891a228c743060afb8dcf41e56f94fe70 (patch)
treeb07e8e2d6a4f33a17b62109195ae75e3efdc69cb /cypress_test/integration_tests/desktop
parenta cypress env var for enable/disable a11y on testing + a a11y tags (diff)
downloadonline-2cf2a1e891a228c743060afb8dcf41e56f94fe70.tar.gz
online-2cf2a1e891a228c743060afb8dcf41e56f94fe70.zip
cypress: expectTextForClipboard helper function never fails
expectTextForClipboard(expectedText) never fails for any passed expectedText string The value returned by the function passed to `then` cypress construct must not be regarded as an implicit assertion. I don't see anymore the '\n TEXT" case. It seems that comparing for equality against the selected plain content is enough. Fixed some cypress test that was failing after modifying expectTextForClipboard. Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com> Change-Id: I64ce31fa2127efcc70bbc3da3ac45fe456e66803
Diffstat (limited to 'cypress_test/integration_tests/desktop')
-rw-r--r--cypress_test/integration_tests/desktop/writer/track_changes_spec.js4
-rw-r--r--cypress_test/integration_tests/desktop/writer/undo_redo_spec.js8
2 files changed, 8 insertions, 4 deletions
diff --git a/cypress_test/integration_tests/desktop/writer/track_changes_spec.js b/cypress_test/integration_tests/desktop/writer/track_changes_spec.js
index 92ad3daa5e..aa4d301183 100644
--- a/cypress_test/integration_tests/desktop/writer/track_changes_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/track_changes_spec.js
@@ -45,8 +45,10 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Track Changes', function (
enableRecord();
helper.clearAllText();
helper.selectAllText();
+ cy.wait(500);
confirmChange('Accept All');
helper.typeIntoDocument('{ctrl}a');
+ cy.wait(500);
helper.textSelectionShouldNotExist();
});
@@ -55,9 +57,11 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Track Changes', function (
enableRecord();
helper.clearAllText();
helper.selectAllText();
+ cy.wait(500);
confirmChange('Reject All');
cy.cGet('#document-container').click();
helper.selectAllText();
+ cy.wait(500);
helper.expectTextForClipboard('Hello World');
});
});
diff --git a/cypress_test/integration_tests/desktop/writer/undo_redo_spec.js b/cypress_test/integration_tests/desktop/writer/undo_redo_spec.js
index 0c91d676aa..8d2d2a7085 100644
--- a/cypress_test/integration_tests/desktop/writer/undo_redo_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/undo_redo_spec.js
@@ -1,4 +1,4 @@
-/* global describe it beforeEach require afterEach*/
+/* global cy describe it beforeEach require afterEach*/
var helper = require('../../common/helper');
var repairHelper = require('../../common/repair_document_helper');
@@ -23,7 +23,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing Operations', funct
helper.selectAllText();
- helper.expectTextForClipboard('Hello \n');
+ helper.expectTextForClipboard('Hello ');
}
it('Undo', function() {
@@ -36,7 +36,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing Operations', funct
helper.typeIntoDocument('{ctrl}y');
helper.selectAllText();
-
+ cy.wait(500);
helper.expectTextForClipboard('Hello World');
});
@@ -47,6 +47,6 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing Operations', funct
helper.selectAllText();
- helper.expectTextForClipboard('Hello \n');
+ helper.expectTextForClipboard('Hello ');
});
});