summaryrefslogtreecommitdiffstats
path: root/cypress_test/integration_tests/desktop/calc
diff options
context:
space:
mode:
authorSkyler Grey <skyler.grey@collabora.com>2022-08-25 16:42:21 +0100
committerRashesh Padia <rasheshpadia419@gmail.com>2022-09-08 12:52:19 +0530
commitfd0c49a0be757c047674164a941914d15c18fd17 (patch)
treef6301aa57544a7eda821981487b00ce104fea5d1 /cypress_test/integration_tests/desktop/calc
parentios: Rule out LIBO_VERSION checking on master (diff)
downloadonline-fd0c49a0be757c047674164a941914d15c18fd17.tar.gz
online-fd0c49a0be757c047674164a941914d15c18fd17.zip
Make the repair document dialog into a JSDialog
- The repair document dialog is a leaflet dialog - As this dialog is online-side only, I'll use the JSDialog builder directly rather than writing a UI file - Most of the code to build the dialogs is already very adaptable from looking at the protocol of existing JSDialogs that come from the server & where the code goes, however a small change had to be made to dialog modifications to allow us a callback function, as otherwise we would send off to the server whenever we pressed on a list item - Finally, if there's no list to show, we'll show a bit of text saying that there's nothing, as otherwise it looks like an empty/broken dialog - If we're on mobile, we'll need to use the alternative helper (the one that handles mobile wizard building) - Fix a cypress test for writer (although impress and calc seem to have tests for this too that aren't implemented: this should be handled in a follow-up PR) - Fix mobile tests Signed-off-by: Skyler Grey <skyler.grey@collabora.com> Change-Id: Iab9e943a428e66b05e28819c2ee1001a2deffd2c
Diffstat (limited to 'cypress_test/integration_tests/desktop/calc')
-rw-r--r--cypress_test/integration_tests/desktop/calc/undo_redo_spec.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/cypress_test/integration_tests/desktop/calc/undo_redo_spec.js b/cypress_test/integration_tests/desktop/calc/undo_redo_spec.js
index 9e6a989b44..4e3e3e4cd6 100644
--- a/cypress_test/integration_tests/desktop/calc/undo_redo_spec.js
+++ b/cypress_test/integration_tests/desktop/calc/undo_redo_spec.js
@@ -1,7 +1,8 @@
-/* global describe it cy beforeEach require afterEach*/
+/* global describe it beforeEach require afterEach*/
var helper = require('../../common/helper');
var calcHelper = require('../../common/calc_helper');
+var repairHelper = require('../../common/repair_document_helper');
describe('Editing Operations', function() {
var testFileName = 'undo_redo.ods';
@@ -51,15 +52,7 @@ describe('Editing Operations', function() {
helper.typeIntoDocument('{enter}');
- cy.get('#menu-editmenu').click()
- .get('#menu-repair').click();
-
- cy.get('.leaflet-popup-content table').should('exist');
-
- cy.contains('.leaflet-popup-content table tbody tr','Undo').eq(0)
- .click();
-
- cy.get('.leaflet-popup-content > input').click();
+ repairHelper.rollbackPastChange('Undo');
calcHelper.dblClickOnFirstCell();