diff --git a/cypress_test/integration_tests/desktop/calc/a11y_notebookbar_spec.js b/cypress_test/integration_tests/desktop/calc/a11y_notebookbar_spec.js
deleted file mode 100644
index 54e3b452300d3..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/a11y_notebookbar_spec.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/* global describe expect it cy before after afterEach require */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-var a11yHelper = require('../../common/a11y_helper');
-
-describe(['tagdesktop'], 'Accessibility Calc Notebookbar Tests', { testIsolation: false }, function () {
- var tabs;
- var allTabNames;
- var visitedTabNames;
- var win;
-
- before(function () {
- helper.setupAndLoadDocument('calc/help_dialog.ods');
-
- desktopHelper.switchUIToNotebookbar();
-
- cy.getFrameWindow().then(function (frameWindow) {
- win = frameWindow;
- });
-
- cy.then(function () {
- tabs = win.app.map.uiManager.notebookbar.getTabs();
- allTabNames = tabs.map(function (tab) { return tab.name; });
- visitedTabNames = [];
- });
- });
-
- // Context tabs that need complex setup not yet implemented
- var skipContextTabs = ['Sparkline', 'Table'];
-
- after(function () {
- var unvisited = allTabNames.filter(function (name) {
- return !visitedTabNames.includes(name) && !skipContextTabs.includes(name);
- });
- expect(unvisited, 'unvisited notebookbar tabs').to.be.empty;
- });
-
- afterEach(function () {
- a11yHelper.resetState();
- });
-
- function selectAndValidateTab(tab) {
- var selector = '#' + tab.id;
- cy.cGet(selector).should('be.visible').click();
- cy.cGet(selector).should('have.class', 'selected');
-
- helper.processToIdle(win);
- a11yHelper.runA11yValidation(win, 'validatenotebookbara11y');
-
- visitedTabNames.push(tab.name);
- }
-
- function findTab(name) {
- return tabs.find(function (t) { return t.name === name; });
- }
-
- it('Notebookbar tab: Shape (context)', function () {
- cy.then(function () {
- win.app.map.sendUnoCommand('.uno:BasicShapes.octagon');
- });
-
- cy.cGet('#test-div-shapeHandlesSection').should('exist');
-
- cy.then(function () {
- selectAndValidateTab(findTab('Shape'));
- });
-
- // exit shape mode
- helper.typeIntoDocument('{esc}');
- });
-
- it('Notebookbar tab: Picture (context)', function () {
- cy.viewport(1920, 1080);
-
- desktopHelper.insertImage();
-
- cy.then(function () {
- selectAndValidateTab(findTab('Picture'));
- });
-
- // exit picture mode
- helper.typeIntoDocument('{esc}');
- });
-
- // TODO: Add a Sparkline to test document after merge of outstanding pr
- // TODO: Table context is for "Table in Table" feature, not available in .ods format
-
- it('All non-context notebookbar tabs', function () {
- cy.then(function () {
- var nonContextTabs = tabs.filter(function (tab) {
- return !tab.context || tab.context.includes('default');
- });
-
- var chain = cy.wrap(null);
- nonContextTabs.forEach(function (tab) {
- chain = chain.then(function () {
- selectAndValidateTab(tab);
- });
- });
- });
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/annotation_spec.js b/cypress_test/integration_tests/desktop/calc/annotation_spec.js
deleted file mode 100644
index 70b9dcc3bf55e..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/annotation_spec.js
+++ /dev/null
@@ -1,345 +0,0 @@
-/* global describe it require cy beforeEach */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagdesktop'], 'Annotation Tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/annotation.ods');
- desktopHelper.switchUIToNotebookbar();
- cy.getFrameWindow().then((win) => {
- this.win = win;
- helper.processToIdle(win);
- });
- });
-
- it('Insert',function() {
- // Make sure we know the cell adress.
- calcHelper.enterCellAddressAndConfirm(this.win, 'B2');
-
- desktopHelper.insertComment();
-
- cy.cGet('.cool-annotation').should('exist');
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
-
- // Move the mouse over commented cell without using trigger. "realMouseMove" function seems safer.
- cy.cGet('#test-div-OwnCellCursor').should('exist');
- cy.cGet('#test-div-OwnCellCursor').then((items) => {
- const cursor = items[0];
- const clientRectangle = cursor.getBoundingClientRect();
- const x = Math.round(clientRectangle.left + clientRectangle.width * 0.7);
- const y = Math.round(clientRectangle.top + clientRectangle.height * 0.5);
- const width = clientRectangle.width;
- const height = clientRectangle.height;
-
- cy.cGet('body').realMouseMove(x, y);
-
- // Comment should be visible now.
- cy.cGet('#annotation-content-area-1').should('be.visible');
- cy.cGet('#annotation-content-area-1').should('contain','some text');
-
- // Move the mouse to A1.
- cy.cGet('body').realMouseMove(x - width, y - height, { position: "topLeft" });
- // Comment shouldn't be visible now.
- cy.cGet('#annotation-content-area-1').should('not.be.visible');
-
- // Click on A1 while we are here.
- cy.cGet('body').realClick({ x: x - width, y: y - height });
- cy.cGet(helper.addressInputSelector).should('have.value', 'A1');
-
- // Now click again to cell B2. There was an issue with commented cells. We should be able to click on the commented cell.
- cy.cGet('body').realClick({ x: x, y: y });
- cy.cGet(helper.addressInputSelector).should('have.value', 'B2');
- });
- });
-
- it('Modify',function() {
- desktopHelper.insertComment();
-
- cy.cGet('#comment-container-1').should('exist');
-
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('contain','some text');
- cy.cGet('#comment-annotation-menu-1').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('#annotation-modify-textarea-1').type(', some other text');
- cy.cGet('#annotation-save-1').click();
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#annotation-content-area-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('contain','some text0, some other text');
- cy.cGet('#comment-container-1').should('exist');
- });
-
- it('Reply should not be possible', function() {
- desktopHelper.insertComment();
-
- cy.cGet('#comment-container-1').should('exist');
-
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('contain','some text');
- cy.cGet('#comment-annotation-menu-1').click();
- cy.cGet('.context-menu-list:visible .context-menu-item').should('not.have.text', 'Reply');
- });
-
- it('Remove',function() {
- desktopHelper.insertComment();
-
- cy.cGet('#comment-container-1').should('exist');
-
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('contain','some text');
- cy.cGet('#comment-annotation-menu-1').click();
- cy.cGet('body').contains('.context-menu-item','Remove').click();
- cy.cGet('#comment-container-1').should('not.exist');
- });
-
- it('Delete then Create Sheet should not retain comment',function() {
- calcHelper.assertNumberofSheets(1);
-
- cy.cGet('#spreadsheet-toolbar #insertsheet').click();
- calcHelper.assertNumberofSheets(2);
-
- desktopHelper.insertComment();
- cy.cGet('.cool-annotation').should('exist');
-
- calcHelper.selectOptionFromContextMenu('Delete Sheet...');
- cy.cGet('#delete-sheet-modal-response').click();
- calcHelper.assertNumberofSheets(1);
-
- cy.cGet('#spreadsheet-toolbar #insertsheet').click();
- calcHelper.assertNumberofSheets(2);
- cy.cGet('#comment-container-1').should('not.exist');
- });
-
- it('Tab Navigation', function() {
- desktopHelper.insertComment(undefined, false);
-
- cy.cGet('.annotation-button-autosaved').should('not.exist');
- cy.cGet('.annotation-button-delete').should('not.exist');
- cy.realPress('Tab');
- cy.cGet('.annotation-button-autosaved').should('not.exist');
- cy.cGet('.annotation-button-delete').should('not.exist');
- cy.cGet('#annotation-cancel-new:focus-visible');
-
- cy.realPress('Tab');
- cy.cGet('#annotation-save-new:focus-visible');
- cy.cGet('.annotation-button-autosaved').should('not.exist');
- cy.cGet('.annotation-button-delete').should('not.exist');
-
- cy.realPress('Tab');
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- });
-
- it('View Jump', function() {
- calcHelper.enterCellAddressAndConfirm(this.win, 'A100');
- desktopHelper.insertComment();
- /* comments are hidden in calc by default, so no visibility assert */
- cy.cGet('#comment-container-1').should('exist')
- cy.cGet('#Home-tab-label').click();
-
- calcHelper.enterCellAddressAndConfirm(this.win, 'A150');
- calcHelper.enterCellAddressAndConfirm(this.win, 'A135');
-
- /*
- NOTE: this scrollbar position might change in future. one can
- get the new scrollbar position by printing `x` to the console
- in `assertScrollbarPosition` function.
- */
- desktopHelper.assertScrollbarPosition('vertical', 249, 252);
- desktopHelper.insertComment('second comment', false);
- desktopHelper.assertScrollbarPosition('vertical', 249, 252);
- });
-
-});
-
-describe(['tagdesktop'], 'Annotation Autosave Tests', function() {
- var newFilePath;
-
- beforeEach(function() {
- newFilePath = helper.setupAndLoadDocument('calc/annotation.ods');
- desktopHelper.switchUIToNotebookbar();
- });
-
- it('Insert autosave',function() {
- desktopHelper.insertComment(undefined, false);
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation').should('exist');
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0');
- });
-
- it('Insert autosave save',function() {
- desktopHelper.insertComment(undefined, false);
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
- cy.cGet('#annotation-save-1').click();
- cy.cGet('.cool-annotation').should('exist');
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('.annotation-button-autosaved').should('be.not.visible');
- cy.cGet('.annotation-button-delete').should('be.not.visible');
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation').should('exist');
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0');
- });
-
- it('Insert autosave cancel',function() {
- desktopHelper.insertComment(undefined, false);
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
- cy.cGet('#annotation-cancel-1').click();
- cy.cGet('.cool-annotation').should('not.exist');
- cy.cGet('.annotation-button-autosaved').should('not.exist');
- cy.cGet('.annotation-button-delete').should('not.exist');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation').should('not.exist');
- });
-
- it('Modify autosave',function() {
- desktopHelper.insertComment();
-
- cy.cGet('#comment-container-1').should('exist');
-
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0');
- cy.cGet('#comment-annotation-menu-1').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('#annotation-modify-textarea-1').type(', some other text');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation').should('exist');
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0, some other text');
- });
-
- it('Modify autosave save',function() {
- desktopHelper.insertComment();
-
- cy.cGet('#comment-container-1').should('exist');
-
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0');
- cy.cGet('#comment-annotation-menu-1').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('#annotation-modify-textarea-1').type(', some other text');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
- cy.cGet('#annotation-save-1').click();
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#annotation-content-area-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0, some other text');
- cy.cGet('#comment-container-1').should('exist');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation').should('exist');
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0, some other text');
- });
-
- it('Modify autosave cancel',function() {
- desktopHelper.insertComment();
-
- cy.cGet('#comment-container-1').should('exist');
-
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0');
- cy.cGet('#comment-annotation-menu-1').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('#annotation-modify-textarea-1').type('some other text, ');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
- cy.cGet('#annotation-cancel-1').click();
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#annotation-content-area-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0');
- cy.cGet('#comment-container-1').should('exist');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation').should('exist');
- cy.cGet('#comment-container-1').then(function (element) {
- element[0].style.visibility = '';
- element[0].style.display = '';
- });
- cy.cGet('#comment-container-1').trigger('mouseover', {force: true});
- cy.cGet('#annotation-content-area-1').should('have.text','some text0');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/autofilter_spec.js b/cypress_test/integration_tests/desktop/calc/autofilter_spec.js
deleted file mode 100644
index a45b9cdc752fe..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/autofilter_spec.js
+++ /dev/null
@@ -1,180 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-function toggleAutofilter() {
- //enable/disable autofilter
- cy.cGet('#menu-data').click();
- cy.cGet('body').contains('#menu-data li', 'AutoFilter').click();
-}
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'AutoFilter Complex', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/autofilter-complex.ods');
- desktopHelper.switchUIToCompact();
-
- // make deterministic jump, so in retry we have similar scrollbar values
- helper.typeIntoInputField(helper.addressInputSelector, 'A1');
- cy.wait(1000);
-
- helper.typeIntoInputField(helper.addressInputSelector, 'U126');
- cy.cGet('#map').focus();
- cy.wait(1000);
-
- desktopHelper.assertScrollbarPosition('vertical', 230, 270);
- desktopHelper.assertScrollbarPosition('horizontal', 260, 290);
- });
-
- it('Check checkbox status in the date tree', function() {
- helper.typeIntoInputField(helper.addressInputSelector, 'P100');
-
- cy.cGet('#test-div-OwnCellCursor').then((div) => {
- const rect = div[0].getBoundingClientRect();
- const x = rect.right - 5;
- const y = rect.bottom - 10;
- cy.cGet('body').click(x, y);
- });
-
- cy.cGet('.autofilter .vertical').should('be.visible');
- cy.cGet('#toggle_all-input').should('not.be.checked');
-
- cy.cGet('.autofilter .ui-treeview-expander-column').eq(0).click(); // open 2022
- cy.cGet('.autofilter .ui-treeview-expander-column').eq(1).click(); // open January
-
- cy.cGet('#toggle_all-input').should('not.be.checked');
- cy.cGet('.autofilter input[type="checkbox"]').eq(4).should('not.be.checked');
- });
-});
-
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'AutoFilter', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/autofilter.ods');
- desktopHelper.switchUIToCompact();
- toggleAutofilter();
- helper.setDummyClipboardForCopy();
- calcHelper.assertSheetContents(['Cypress Test', 'Status', 'Test 1', 'Pass', 'Test 2', 'Fail', 'Test 3', 'Pass', 'Test 4', '', 'Test 5', 'Fail'], true);
- });
-
- it.skip('Enable/Disable autofilter', function() {
- //filter by pass
- calcHelper.openAutoFilterMenu(true);
- cy.cGet('.autofilter .vertical').should('be.visible');
- cy.cGet('.autofilter .ui-treeview-entry-checkbox').eq(0).uncheck();
- cy.cGet('.autofilter .ui-treeview-entry-checkbox').eq(1).uncheck();
- cy.cGet('.autofilter .ui-button-box-right #ok').click();
- // Wait for autofilter dialog to close
- cy.cGet('div.autofilter').should('not.exist');
-
- calcHelper.assertSheetContents(['Cypress Test', 'Status', 'Test 1', 'Pass', 'Test 3', 'Pass']);
-
- // Disable autofilter
- // First toggle fails when whole sheet is selected, as it is after assertSheetContents
- toggleAutofilter();
- toggleAutofilter();
-
- calcHelper.assertSheetContents(['Cypress Test', 'Status', 'Test 1', 'Pass', 'Test 2', 'Fail', 'Test 3', 'Pass', 'Test 4', '', 'Test 5', 'Fail']);
- });
-
- it('Sort by ascending/descending', function() {
- calcHelper.openAutoFilterMenu();
-
- //sort by descending order
- cy.cGet('.autofilter').contains('.ui-treeview-entry', 'Sort Descending').click();
- // Wait for autofilter dialog to close
- cy.cGet('div.autofilter').should('not.exist');
-
- calcHelper.assertSheetContents(['Cypress Test', 'Status', 'Test 5', 'Fail', 'Test 4', '', 'Test 3', 'Pass', 'Test 2', 'Fail', 'Test 1', 'Pass'], true);
-
- //sort by ascending order
- calcHelper.openAutoFilterMenu();
- cy.cGet('.autofilter').contains('.ui-treeview-entry', 'Sort Ascending').click();
- // Wait for autofilter dialog to close
- cy.cGet('div.autofilter').should('not.exist');
-
- calcHelper.assertSheetContents(['Cypress Test', 'Status', 'Test 1', 'Pass', 'Test 2', 'Fail', 'Test 3', 'Pass', 'Test 4', '', 'Test 5', 'Fail'], true);
- });
-
- it('Filter empty/non-empty cells', function() {
- //empty
- calcHelper.openAutoFilterMenu(true);
- cy.cGet('#check_list_box :nth-child(1 of .ui-treeview-entry) > div > input').click();
- cy.cGet('#ok').click();
- // Wait for autofilter dialog to close
- cy.cGet('div.autofilter').should('not.exist');
-
- calcHelper.assertSheetContents(['Cypress Test', 'Status', 'Test 1', 'Pass', 'Test 2', 'Fail', 'Test 3', 'Pass', 'Test 5', 'Fail'], true);
- });
-
- it('Close autofilter popup by click outside', function() {
- // Test sometimes fails without this wait, no idea why.
- cy.wait(1000);
-
- calcHelper.openAutoFilterMenu();
-
- cy.cGet('.autofilter .vertical').should('be.visible');
- cy.cGet('div.jsdialog-overlay').should('be.visible');
- cy.cGet('div.jsdialog-overlay').click();
-
- // Wait for autofilter dialog to close
- cy.cGet('div.autofilter').should('not.exist');
- cy.wait(500);
-
- calcHelper.dblClickOnFirstCell();
- // Position of the double click determines the cursor position. So press home button in order to go to start of the cell.
- helper.typeIntoDocument('{home}');
- // Type new content to verify that cell is in edit mode
- helper.typeIntoDocument('New content{enter}');
-
- calcHelper.assertSheetContents(['New contentCypress Test', 'Status', 'Test 1', 'Pass', 'Test 2', 'Fail', 'Test 3', 'Pass', 'Test 4', '', 'Test 5', 'Fail'], true);
- });
-
- // check if filter by color applied or not
- it('Filter by color', function() {
- // apply background color to some cells
- calcHelper.selectCellsInRange('A2:A2');
- cy.cGet('#sidebar-dock-wrapper .unoBackgroundColor .arrowbackground').click();
- desktopHelper.selectColorFromPalette('3FAF46');
-
- calcHelper.openAutoFilterMenu();
-
- //Click on `Filter by Color`
- cy.cGet('.autofilter').contains('.ui-treeview-entry', 'Filter by Color').click();
-
- // Find the table element with ID "background"
- cy.cGet('#background')
- .find('input') // Find all input elements inside the table
- .each(($input) => { // Iterate through each input element
- // Assert that each input is of type radio
- cy.wrap($input).should('have.attr', 'type', 'radio');
- });
-
- // Find the table element with ID "background"
- cy.cGet('#background')
- .find('img') // Find all input elements inside the table
- .first() // Select the first input element
- .click(); // Click on the first input element
-
- calcHelper.assertSheetContents(['Cypress Test', 'Status', 'Test 1', 'Pass'], true);
- });
-
- it('Disable already filtered', function () {
- // Filter row with ['Test 4', ''] on the first column
- calcHelper.openAutoFilterMenu();
- cy.cGet('#check_list_box :nth-child(4 of .ui-treeview-entry) > div > input').click();
- cy.cGet('#ok').click();
- // Wait for autofilter dialog to close
- cy.cGet('div.autofilter').should('not.exist');
-
- // Open autofilter menu on the second column
- calcHelper.openAutoFilterMenu(true);
- // Check that '(empty)' option is disabled
- cy.cGet('#check_list_box :nth-child(3 of .ui-treeview-entry) > div').should('contain.text', '(empty)');
- cy.cGet('#check_list_box :nth-child(3 of .ui-treeview-entry) > div > input').should('be.disabled');
-
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/bottom_bar_spec.js b/cypress_test/integration_tests/desktop/calc/bottom_bar_spec.js
deleted file mode 100644
index 1d38a6852fad6..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/bottom_bar_spec.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Calc bottom bar tests.', function() {
-
- beforeEach(function() {
- // Ensure the viewport is large enough to show the whole status bar
- // In Calc #StateTableCellMenu has a high data-priority
- // and will be hidden if the bottom bar doesn't have enough space
- cy.viewport(1280, 720);
- helper.setupAndLoadDocument('calc/BottomBar.ods');
- });
-
- it('Bottom tool bar.', function() {
- cy.cGet('#map').focus();
- calcHelper.clickOnFirstCell();
- cy.cGet('#StateTableCellMenu:visible').click();
- cy.cGet('body').contains('.ui-combobox-entry', 'CountA').click();
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/cell_appearance_spec.js b/cypress_test/integration_tests/desktop/calc/cell_appearance_spec.js
deleted file mode 100644
index 3763628190b53..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/cell_appearance_spec.js
+++ /dev/null
@@ -1,212 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop'], 'Change cell appearance.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/cell_appearance.ods');
- cy.viewport(1920,1080);
- });
-
- it('Apply background color', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- cy.cGet('#Home').click();
- cy.cGet('#Home-container .unoBackgroundColor .arrowbackground').click();
- desktopHelper.selectColorFromPalette('BF0041');
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'bgcolor', '#BF0041');
- });
-
- it('Apply left border', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- cy.cGet('#Home-container .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(1).click();
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'style', 'border-left: 1px solid #000000');
- });
-
- it('Remove cell border', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- // First add left border
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(1).click();
- helper.copy();
- calcHelper.selectEntireSheet();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'style', 'border-left: 1px solid #000000');
- // Then remove it
- calcHelper.clickOnFirstCell();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(0).click();
- helper.copy();
- calcHelper.selectEntireSheet();
- cy.cGet('#copy-paste-container table td').should('not.have.attr', 'style');
- });
-
- it('Apply right border', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(2).click();
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'style', 'border-right: 1px solid #000000');
- });
-
- it('Apply left and right border', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(3).click();
- helper.copy();
- calcHelper.selectEntireSheet();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'style', 'border-left: 1px solid #000000; border-right: 1px solid #000000');
- });
-
- it('Apply top border', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(4).click();
- helper.copy();
- calcHelper.selectEntireSheet();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'style', 'border-top: 1px solid #000000');
- });
-
- it('Apply bottom border', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(5).click();
- helper.copy();
- calcHelper.selectEntireSheet();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'style', 'border-bottom: 1px solid #000000');
- });
-
- it('Apply top and bottom border', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(6).click();
- helper.copy();
- calcHelper.selectEntireSheet();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'style', 'border-top: 1px solid #000000; border-bottom: 1px solid #000000');
- });
-
- it('Apply border for all sides', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(7).click();
- helper.copy();
- calcHelper.selectEntireSheet();
- cy.cGet('#copy-paste-container table td')
- .should('have.attr', 'style', 'border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000');
- });
-
- it('Apply horizontal borders for multiple cells', function() {
- desktopHelper.switchUIToNotebookbar();
- calcHelper.selectEntireSheet();
- // Click on the one in notebookbar (not sidebar).
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(8).click();
- calcHelper.selectEntireSheet();
-
- // copy-paste container is not stable for now.
- //cy.cGet('#copy-paste-container table td').should(function(cells) {
- // expect(cells).to.have.lengthOf(4);
- // for (var i = 0; i < cells.length; i++) {
- // expect(cells[i]).to.have.attr('style', 'border-top: 1px solid #000000; border-bottom: 1px solid #000000');
- // }
- // });
- });
-
- it('Apply horizontal inner borders and vertical outer borders', function() {
- desktopHelper.switchUIToNotebookbar();
- calcHelper.selectEntireSheet();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(9).click();
- calcHelper.selectEntireSheet();
- //cy.cGet('#copy-paste-container table td')
- // .should(function(cells) {
- // expect(cells).to.have.lengthOf(4);
- // for (var i = 0; i < cells.length; i++) {
- // if (i == 0 || i == 2)
- // expect(cells[i]).to.have.attr('style', 'border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000');
- // else
- // expect(cells[i]).to.have.attr('style', 'border-top: 1px solid #000000; border-bottom: 1px solid #000000');
- // }
- // });
- });
-
- it('Apply vertical inner borders and horizontal outer borders', function() {
- desktopHelper.switchUIToNotebookbar();
- calcHelper.selectEntireSheet();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(10).click();
- calcHelper.selectEntireSheet();
- //cy.cGet('#copy-paste-container table td')
- // .should(function(cells) {
- // expect(cells).to.have.lengthOf(4);
- // for (var i = 0; i < cells.length; i++) {
- // if (i == 0 || i == 1)
- // expect(cells[i]).to.have.attr('style', 'border-top: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000');
- // else
- // expect(cells[i]).to.have.attr('style', 'border-left: 1px solid #000000; border-right: 1px solid #000000');
- // }
- // });
- });
-
- it('Apply all inner and outer borders', function() {
- desktopHelper.switchUIToNotebookbar();
- calcHelper.selectEntireSheet();
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- helper.getMenuEntry(11).click();
- calcHelper.selectEntireSheet();
- //cy.cGet('#copy-paste-container table td')
- // .should(function(cells) {
- // expect(cells).to.have.lengthOf(4);
- // for (var i = 0; i < cells.length; i++) {
- // expect(cells[i]).to.have.attr('style', 'border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000');
- // }
- // });
- });
-
- it('Apply border color', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.switchUIToNotebookbar();
- calcHelper.clickOnFirstCell();
- // Apply left border first
- cy.cGet('.notebookbar .unoSetBorderStyle .arrowbackground').click();
- cy.cGet('.ui-dialog-content').should('be.visible');
- helper.getMenuEntry(1).click();
-
- // Wait for popup to close before clicking next button
- cy.cGet('.ui-dialog-content').should('not.exist');
-
- // Then apply border color
- cy.cGet('.unoFrameLineColor .arrowbackground').click();
- desktopHelper.selectColorFromPalette('BF0041');
- helper.copy();
- calcHelper.selectEntireSheet();
-
- cy.cGet('#copy-paste-container table td')
- .should('have.attr', 'style', 'border-left: 1px solid #bf0041');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/cell_cursor_spec.js b/cypress_test/integration_tests/desktop/calc/cell_cursor_spec.js
deleted file mode 100644
index fa6fec66ad0f1..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/cell_cursor_spec.js
+++ /dev/null
@@ -1,290 +0,0 @@
-/* global describe it cy beforeEach expect require */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-// That properties popup doesn't go by itself.
-// So I close it here in order to prevent this test from failure when we fix that popup closing issue.
-function closeNotebookbarPopup() {
- cy.cGet('body').type('{esc}');
- cy.cGet('#document-canvas').realClick();
- cy.cGet('.jsdialog-overlay').should('not.exist');
-}
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Test jumping on large cell selection', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/cell_cursor.ods');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- it('No jump on long merged cell', function() {
- desktopHelper.assertScrollbarPosition('horizontal', 205, 330);
- calcHelper.clickOnFirstCell(true, false, 'A1:Z1');
- desktopHelper.assertScrollbarPosition('horizontal', 205, 330);
- });
-
- it('Jump on address with not visible cursor', function() {
- desktopHelper.assertScrollbarPosition('vertical', 0, 30);
- cy.cGet(helper.addressInputSelector).should('have.value', 'Z11');
-
- helper.typeIntoInputField(helper.addressInputSelector, 'A110');
- desktopHelper.assertScrollbarPosition('vertical', 205, 330);
- });
-
- it('Jump on search with not visible cursor', function() {
- desktopHelper.assertScrollbarPosition('vertical', 0, 30);
- cy.cGet(helper.addressInputSelector).should('have.value', 'Z11');
-
- desktopHelper.assertScrollbarPosition('horizontal', 205, 330);
- helper.typeIntoDocument('{ctrl}f');
- cy.cGet('input#searchterm-input-dialog').type('{selectAll}FIRST');
- cy.cGet('#search').find('button').click();
-
- cy.cGet(helper.addressInputSelector).should('have.value', 'A10');
- desktopHelper.assertScrollbarPosition('horizontal', 40, 60);
- });
-
- it('Show cursor on sheet insertion', function() {
- // scroll down
- helper.typeIntoInputField(helper.addressInputSelector, 'A110');
- desktopHelper.assertScrollbarPosition('vertical', 205, 330);
-
- // insert sheet before
- calcHelper.selectOptionFromContextMenu('Insert sheet before this');
-
- // we should see the top left corner of the sheet
- calcHelper.assertAddressAfterIdle(this.win, 'A1');
- desktopHelper.assertScrollbarPosition('vertical', 0, 30);
- });
-
- it('Scroll and check drawing on frozen part of the view', function() {
- // We will add a new sheet. Go to a cell other than A1. We will check if the new sheet is added by checking the current cell.
- calcHelper.enterCellAddressAndConfirm(this.win, 'B2');
-
- // Add a new sheet.
- cy.cGet('#insertsheet-button').click();
- // Cell cursor will go to A1 by default. So we understand that the new sheet is added.
- calcHelper.assertAddressAfterIdle(this.win, 'A1');
-
- // Go to a cell that we know is visible.
- calcHelper.enterCellAddressAndConfirm(this.win, 'D7');
-
- // Find freeze panes button and click.
- cy.cGet('#View-tab-label').click();
- desktopHelper.getNbIconArrow('FreezePanes').click();
- // There are two FreezePanes buttons, the first in the main
- // toolbar we clicked to create the dropdown in which the
- // second appears. We want to wait until that second one is
- // available and click that one, not reclick the first.
- desktopHelper.getNbIcon('FreezePanes').should('have.length', 2).last().click();
- closeNotebookbarPopup();
-
- // Wait for freeze panes statechanged message to arrive from core.
- helper.waitForMapState('.uno:FreezePanes', 'true');
-
- // Scroll down.
- calcHelper.enterCellAddressAndConfirm(this.win, 'Z110');
-
- // Now click on A1. Use click for this, not the input field. We also need to test the core coordinates.
- calcHelper.clickOnFirstCell();
-
- // Before the fix for mouse coordinate calculation, this would not go to A1, but somewhere else.
- // Core side coordinates were not calculated properly.
- // Fix is here: https://github.com/CollaboraOnline/online/pull/13631
- cy.cGet(helper.addressInputSelector).should('have.value', 'A1');
- });
-
- it('Check selected text visual.', function() {
- cy.cGet('#insertsheet-button').click();
-
- helper.processToIdle(this.win);
-
- // Ensure starting point.
- helper.typeIntoInputField(helper.addressInputSelector, 'A1');
-
- // Put cell cursor somewhere else.
- helper.typeIntoInputField(helper.addressInputSelector, 'B10');
-
- desktopHelper.getNbIconArrow('AlignTop').click();
- desktopHelper.getNbIcon('WrapText').click();
-
- closeNotebookbarPopup();
- helper.typeIntoInputField(helper.addressInputSelector, 'B10');
-
- helper.typeIntoDocument('Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.');
- helper.typeIntoDocument('{ctrl}a');
-
- helper.processToIdle(this.win);
-
- cy.cGet('#document-container').compareSnapshot('text-selection', 0.02);
- });
-
- it('Check right click shows correct context menu.', function() {
- cy.cGet('#document-container').then(function(items) {
- const rect = items[0].getBoundingClientRect();
- const centerX = rect.left + rect.width / 2;
- const centerY = rect.top + rect.height / 2;
- const topY = rect.top + 2;
-
- // Show column context menu first.
- // Real mouse move to trigger the issue that previous commit fixes.
- cy.cGet('body').realMouseMove(centerX, topY);
- cy.cGet('body').rightclick(centerX, topY);
- cy.cGet('.context-menu-link.insert-columns-before').should('exist');
- cy.cGet('.context-menu-link.insert-columns-before').should('be.visible');
-
- // Now show document context menu.
- cy.cGet('body').realMouseMove(centerX, centerY);
- cy.cGet('#document-canvas').realClick();
- cy.wait(300);
- cy.cGet('body').rightclick(centerX, centerY);
- cy.cGet('.context-menu-link.paste').should('exist');
- cy.cGet('.context-menu-link.paste').should('be.visible');
- });
- });
-});
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Test Cell Selections', function() {
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/empty-selections.ods');
- desktopHelper.sidebarToggle();
- cy.cGet('#sidebar-dock-wrapper').should('not.be.visible');
- cy.viewport(1000, helper.maxScreenshotableViewportHeight);
- cy.getFrameWindow().then((win) => {
- this.win = win;
- helper.processToIdle(win);
- });
- });
-
- it('Check non-range cell selection with CTRL', function() {
- calcHelper.clickOnACell(1, 1, 2, 3);
-
- // Press CTRL and hold.
- cy.cGet('div.clipboard').type('{ctrl}', { release: false });
-
- cy.wait(500);
- calcHelper.clickOnACell(2, 3, 4, 3);
-
- cy.wait(500);
- calcHelper.clickOnACell(4, 3, 2, 6);
-
- // Press SHIFT and hold.
- cy.cGet('div.clipboard').type('{shift}', { release: false });
-
- cy.wait(500);
- calcHelper.clickOnACell(2, 6, 2, 10);
-
- helper.processToIdle(this.win);
-
- cy.cGet('#document-container').compareSnapshot('selections', 0.02);
- });
-
- it('Should not scroll after a right click', function() {
- helper.typeIntoInputField(helper.addressInputSelector, 'Z1000');
-
- cy.cGet('#document-container').rightclick();
- cy.cGet('.context-menu-link.paste').should('exist');
- cy.cGet('.context-menu-link.paste').should('be.visible');
-
- cy.cGet('#document-container').then(function(items) {
- const rect = items[0].getBoundingClientRect();
- const left = rect.left + 20;
- const topY = rect.top + 20;
-
- cy.cGet('body').click(left, topY);
-
-
- // We clicked on right button, then left button. Then we will move the mouse outside of the view.
- // It shouldn't scroll when the mouse is outside.
- cy.cGet('#document-container').realMouseMove(left + 50, topY + 50);
- cy.cGet('#document-container').realMouseMove(left + 75, topY + 75);
- cy.cGet('#document-container').realMouseMove(left + 100, topY + 100);
- cy.cGet('#document-container').realMouseMove(left + 125, topY + 125);
- cy.cGet('#document-container').realMouseMove(left + 150, topY + 150);
- });
-
- cy.wait(1000);
-
- // This doesn't pass without the fix in this commit.
- cy.cGet('#document-container').compareSnapshot('scroll-check', 0.02);
- });
-});
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Test jumping on large cell selection with split panes', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/cell_cursor_split.ods');
- });
-
- it('No jump on long merged cell with split panes', function() {
- desktopHelper.assertScrollbarPosition('horizontal', 270, 390);
-
- // Click on second cell in second row
- cy.cGet('#map')
- .then(function(items) {
- expect(items).to.have.lengthOf(1);
- var XPos = items[0].getBoundingClientRect().left + 140;
- var YPos = items[0].getBoundingClientRect().top + 30;
- cy.cGet('body').click(XPos, YPos);
- });
-
- cy.cGet(helper.addressInputSelector).should('have.value', 'B2:AA2');
- desktopHelper.assertScrollbarPosition('horizontal', 270, 390);
- });
-});
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Test triple click content selection.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/cell-content-selection.ods');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- it('Triple click should select the cell content.', function() {
- calcHelper.enterCellAddressAndConfirm(this.win, 'A1');
-
- // Triple click on second first in second row
- cy.cGet('#document-container')
- .then(function(items) {
- expect(items).to.have.lengthOf(1);
- var XPos = items[0].getBoundingClientRect().left + 60;
- var YPos = items[0].getBoundingClientRect().top + 30;
- cy.cGet('body').realClick({position: {x: XPos, y: YPos}, clickCount: 3}) // Triple click.
- });
-
- helper.waitForTimers(this.win, 'clicktimer');
- helper.processToIdle(this.win);
-
- cy.cGet('#document-container').compareSnapshot('triple-click', 0.02);
-
- });
-});
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Test decimal separator of cells with different languages.', function() {
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/decimal_separator.ods');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- it('Check different decimal separators', function() {
- calcHelper.enterCellAddressAndConfirm(this.win, 'A1');
-
- cy.wrap(this.win).then(win => {
- cy.expect(win.app.calc.decimalSeparator).to.be.equal('.');
- });
-
- calcHelper.enterCellAddressAndConfirm(this.win, 'B1');
-
- cy.wrap(this.win).then(win => {
- cy.expect(win.app.calc.decimalSeparator).to.be.equal(',');
- });
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/cell_edit_spec.js b/cypress_test/integration_tests/desktop/calc/cell_edit_spec.js
deleted file mode 100644
index 2c70ced8cf7d4..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/cell_edit_spec.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Test rendering of a cell on edit', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/cell_edit.fods');
- desktopHelper.selectZoomLevel(200); // make differences more significant
-
- cy.viewport(800, helper.maxScreenshotableViewportHeight);
- cy.window().then(win => { win.dispatchEvent(new Event('resize')); });
- cy.getFrameWindow().then((win) => {
- this.win = win;
- // wait for zoom rendering and viewport resize to complete
- helper.processToIdle(win);
- });
- });
-
- function selectInitialCell(win) {
- calcHelper.enterCellAddressAndConfirm(win, 'CA980');
- }
-
- function checkTextContent(expected) {
- cy.cGet('#sc_input_window.formulabar .ui-custom-textarea-cursor-layer')
- .should('have.text', expected);
- }
-
- function checkVisualContent(win, expected) {
- helper.processToIdle(win);
- cy.cGet('#document-container').compareSnapshot(expected, 0.02);
- }
-
- it('Redraw after undo', function() {
- // setup initial state
- desktopHelper.assertScrollbarPosition('horizontal', 325, 355);
- desktopHelper.assertScrollbarPosition('vertical', 235, 300);
-
- selectInitialCell(this.win);
- checkTextContent('');
- checkVisualContent(this.win, 'empty');
-
- // type something
- const testString = 'TEST STRING';
-
- desktopHelper.getNbIconArrow('Grow').click();
- desktopHelper.getNbIcon('Bold').click();
- desktopHelper.getNbIconArrow('Grow').click();
- desktopHelper.getNbIcon('Underline').click();
-
- helper.typeIntoDocument(testString + '{enter}');
- checkTextContent('');
-
- // verify cell content
- selectInitialCell(this.win);
- checkTextContent(testString);
- checkVisualContent(this.win, 'teststring');
-
- // undo
- desktopHelper.getNbIcon('Undo').click();
-
- // verify cell content
- selectInitialCell(this.win);
- checkTextContent('');
- checkVisualContent(this.win, 'empty_selected');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/chart_dialog_spec.js b/cypress_test/integration_tests/desktop/calc/chart_dialog_spec.js
deleted file mode 100644
index 9470ba7805491..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/chart_dialog_spec.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var calcHelper = require('../../common/calc_helper');
-var desktopHelper = require('../../common/desktop_helper')
-var helper = require('../../common/helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Chart dialog tests', function() {
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/chart_dialog.ods');
- cy.viewport(1920, 720);
- });
-
- it('Chart format axis(scale) manual min test', function() {
- const XPos = 10;
- const YPos = 10;
- const minValue = 2.1;
- // Select chart.
- calcHelper.clickAtOffset(XPos, YPos);
- // Enter chart edit mode.
- helper.typeIntoDocument('{enter}');
- // Right-click on the thick y-axis and click 'Format Axis'.
- calcHelper.clickAtOffset(XPos, YPos, true);
- cy.cGet('a.format-axis').click();
- cy.cGet('.lokdialog_container').should('be.visible');
-
- // Auto min must be ON.
- cy.cGet('#CBX_AUTO_MIN-input').should('be.checked');
- // Manual min input must be disabled.
- cy.cGet('#EDT_MIN-input').should('not.be.enabled');
- // Turn off auto min.
- cy.cGet('#CBX_AUTO_MIN-input').uncheck();
- cy.cGet('#CBX_AUTO_MIN-input').should('not.be.checked');
- cy.cGet('#EDT_MIN-input').should('be.enabled');
- // Set min to 2.
- cy.cGet('#EDT_MIN-input').type('{backspace}' + minValue);
- cy.cGet('#ok-button').click();
- cy.cGet('.lokdialog_container').should('not.exist');
-
- // See if the above changes persisted.
- // Again right-click on the thick y-axis and select 'Format Axis'.
- calcHelper.clickAtOffset(XPos, YPos, true);
- cy.cGet('a.format-axis').click();
- cy.cGet('.lokdialog_container').should('be.visible');
- // Auto min must be OFF.
- cy.cGet('#CBX_AUTO_MIN-input').should('not.be.checked');
- // Manual min input must be enabled.
- cy.cGet('#EDT_MIN-input').should('be.enabled').should('have.value', '' + minValue);
- cy.cGet('#ok-button').click();
- cy.cGet('.lokdialog_container').should('not.exist');
- });
-
- /*
- * tests if the width of the 'chart wizard' is larger than a "reasonable"
- * width and if it's larger that means something is obviously wrong, probably
- * some css property.
- * `reasonableWidth` = width at the time of writing this test + 15px ;)
- */
- it('Chart Wizard width', function() {
- cy.cGet('#Insert-tab-label').click();
- desktopHelper.getNbIcon('InsertObjectChart', 'Insert').click();
-
- cy.cGet('#CHART2_HID_SCH_WIZARD_ROADMAP')
- .should('be.visible')
- .invoke('width')
- .should('be.greaterThan', 400).and('be.lessThan',415);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/chart_wizard_data_series_spec.js b/cypress_test/integration_tests/desktop/calc/chart_wizard_data_series_spec.js
deleted file mode 100644
index b687d6345dafe..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/chart_wizard_data_series_spec.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var calcHelper = require('../../common/calc_helper');
-var helper = require('../../common/helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Chart wizard data series dialog tests', function() {
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/chart_wizard.ods');
- cy.viewport(1920, 720);
- });
-
- it('Chart wizard data series dialog visual test', function() {
- // Select some data first
- calcHelper.clickOnFirstCell();
-
- // Open chart wizard via notebookbar Insert tab
- cy.cGet('#Insert-tab-label').click();
- // do not click the hidden overflow button
- cy.cGet('#Insert .unoInsertObjectChart').eq(0).click();
-
- // Wait for Chart Type dialog to appear
- cy.cGet('.lokdialog_container').should('be.visible');
-
- // Navigate to the Data series/Data ranges dialog
- // Click "Next" to go from Chart type to Date range
- cy.cGet('.lokdialog_container #next').click();
- cy.wait(500);
-
- // Click "Next" again to go from Date range to Data series/ranges
- cy.cGet('.lokdialog_container #next').click();
- cy.wait(500);
-
- // Capture screenshot of the Data series/Data ranges dialog
- cy.cGet('.lokdialog_container').compareSnapshot('chart_wizard_data_series', 0.1);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/clipboard_spec.js b/cypress_test/integration_tests/desktop/calc/clipboard_spec.js
deleted file mode 100644
index f23af6c57f15a..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/clipboard_spec.js
+++ /dev/null
@@ -1,253 +0,0 @@
-/* global describe it cy beforeEach require Cypress */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Calc clipboard tests.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/clipboard.ods');
-
- if (Cypress.env('INTEGRATION') === 'nextcloud') {
- desktopHelper.showStatusBarIfHidden();
- }
- cy.viewport(1920,1080);
- desktopHelper.shouldHaveZoomLevel('100');
-
- // make it more complex and prevent form initial being A1
- helper.typeIntoInputField(helper.addressInputSelector, 'D5');
-
- cy.cGet('#map').focus();
- calcHelper.clickOnFirstCell();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A1');
-
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- function setDummyClipboard(type, content, image = false, fail = false, imageHtml = undefined) {
- cy.window().then(win => {
- var app = win['0'].app;
- var metaURL = encodeURIComponent(app.map._clip.getMetaURL());
- if (type === 'text/html') {
- content = content.replace('%META_URL%', metaURL);
- }
- var blob = new Blob([content]);
- var clipboard = app.map._clip;
- var clipboardItem = {
- getType: function(type) {
- return {
- then: function(resolve/*, reject*/) {
- if (image && type === 'text/html') {
- if (imageHtml === undefined) {
- imageHtml = '';
- }
- resolve(new Blob([imageHtml]));
- } else {
- resolve(blob);
- }
- },
- };
- },
- types: image ? [type, 'text/html'] : [type],
- };
- var clipboardItems = [clipboardItem];
- clipboard._dummyClipboard = {
- read: function() {
- return {
- then: function(resolve, reject) {
- if (fail) {
- reject({
- message: 'rejected',
- });
- } else {
- resolve(clipboardItems);
- }
- },
- };
- },
- };
- });
- }
-
- it('HTML paste, internal case', function() {
- // Given a document with a SUM() in C1, and copying that to the clipboard:
- // A1 is 1, B1 is 2, so C1 is 3.
- helper.typeIntoInputField(helper.addressInputSelector, 'C1');
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'C1');
- cy.window().then(win => {
- var app = win['0'].app;
- app.socket.sendMessage('uno .uno:Copy');
- });
- var html = '
ignored
';
- setDummyClipboard('text/html', html);
-
- helper.processToIdle(this.win);
-
- // When pasting C1 to D1:
- helper.typeIntoInputField(helper.addressInputSelector, 'D1');
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'D1');
- cy.cGet('#Home .ui-overflow-group-content > .unoPaste .arrowbackground').click();
- helper.getMenuEntry(0).click(); // Paste
-
- // Then make sure the formula gets rewritten as expected:
- // Internal paste: B1 is 2, C1 is 3, so D1 is 5.
- // Without the accompanying fix in place, this test would have failed with:
- // expected **#copy-paste-container table td:nth-of-type(1)** to have text **'5'**, but the text was **''**
- // i.e. a popup dialog was shown, instead of working, like with Ctrl-V.
- helper.setDummyClipboardForCopy();
- helper.copy();
- cy.cGet('#copy-paste-container table td:nth-of-type(1)').should('have.text', '5');
- });
-
- it('HTML paste, external case', function() {
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A1');
-
- var html = '
clipboard
';
- setDummyClipboard('text/html', html);
-
- // When pasting the clipboard to A1:
- cy.cGet('#Home .ui-overflow-group-content > .unoPaste .arrowbackground').click();
- helper.getMenuEntry(0).click(); // Paste
-
- // Then make sure we actually consider the content of the HTML:
- cy.cGet('#sc_input_window.formulabar .ui-custom-textarea-text-layer').should('have.text', 'clipboard');
- });
-
- it('Plain text paste', function() {
- var text = 'plain text';
- setDummyClipboard('text/plain', text);
-
- // When pasting the clipboard to A1:
- cy.cGet('#Home .ui-overflow-group-content > .unoPaste .arrowbackground').click();
- helper.getMenuEntry(0).click(); // Paste
-
- // Then make the paste happened:
- cy.cGet('#sc_input_window.formulabar .ui-custom-textarea-text-layer').should('have.text', 'plain text');
- });
-
- it('Image paste', function() {
- var base64 = 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEW10NBjBBbqAAAAH0lEQVRo';
- base64 += 'ge3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABmmDh1QAAAABJRU5ErkJggg==';
- var blob = Cypress.Blob.base64StringToBlob(base64, 'image/png');
- setDummyClipboard('image/png', blob, /*image=*/true);
-
- // When pasting the clipboard:
- cy.cGet('#Home .ui-overflow-group-content > .unoPaste .arrowbackground').click();
- helper.getMenuEntry(0).click(); // Paste
-
- // Then make sure the paste happened:
- cy.cGet('#document-container svg g').should('exist');
- });
-
- it('Image paste with meta', function() {
- let base64 = 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEW10NBjBBbqAAAAH0lEQVRo';
- base64 += 'ge3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABmmDh1QAAAABJRU5ErkJggg==';
- let blob = Cypress.Blob.base64StringToBlob(base64, 'image/png');
- let imageHtml = '';
- setDummyClipboard('image/png', blob, /*image=*/true, /*fail=*/false, imageHtml);
-
- // When pasting the clipboard:
- cy.cGet('#Home .ui-overflow-group-content > .unoPaste .arrowbackground').click();
- helper.getMenuEntry(0).click(); // Paste
-
- // Then make sure the paste happened:
- // Without the accompanying fix in place, this test would have failed, no image was
- // pasted.
- cy.cGet('#document-container svg g').should('exist');
- });
-
- it('HTML paste, internal case failing', function() {
- // Given a document with an A1 cell copied to the clipboard:
- cy.window().then(win => {
- var app = win['0'].app;
- app.socket.sendMessage('uno .uno:Copy');
- });
- var html = '
ignored
';
- setDummyClipboard('text/html', html, /*image=*/false, /*fail=*/true);
-
- // When pasting the clipboard to B1, which fails:
- helper.typeIntoInputField(helper.addressInputSelector, 'B1');
- cy.cGet('#Home .ui-overflow-group-content > .unoPaste .arrowbackground').click();
- helper.getMenuEntry(0).click(); // Paste
-
- // Then make sure a warning popup is shown:
- cy.cGet('#copy_paste_warning-box').should('exist');
-
- // Close the dialog by clicking the OK button. Then try again to make sure the dialog appears again.
- cy.cGet('#modal-dialog-copy_paste_warning-box #modal-dialog-copy_paste_warning-box-yesbutton').click();
- cy.cGet('#Home .ui-overflow-group-content > .unoPaste .arrowbackground').click();
- helper.getMenuEntry(0).click(); // Paste
- cy.cGet('#copy_paste_warning-box').should('exist');
-
- // Now when clicking the "Don't show again" button, the dialog should not appear again.
- cy.cGet('#modal-dialog-copy_paste_warning-box #modal-dialog-copy_paste_warning-box-nobutton').click();
- cy.cGet('#Home .ui-overflow-group-content > .unoPaste .arrowbackground').click();
- helper.getMenuEntry(0).click(); // Paste
- cy.cGet('#copy_paste_warning-box').should('not.exist');
- });
-
- it('Copy Hyperlink from pop-up', function () {
- desktopHelper.selectZoomLevel('100', false);
- helper.setDummyClipboardForCopy();
-
- calcHelper.dblClickOnFirstCell();
- cy.cGet('.ui-custom-textarea-text-layer').should('not.have.text', '');
-
- let url = 'http://www.example.com/';
- helper.typeIntoDocument('{rightArrow}{backspace}' + url + '{enter}');
- helper.processToIdle(this.win);
-
- // We need to close the hyperlink popup because currently mouse cursor is on the cell and it opens hyperlink popup window.
- helper.typeIntoDocument('{rightArrow}');
- helper.typeIntoDocument('{leftArrow}');
- helper.processToIdle(this.win);
-
- calcHelper.clickOnFirstCell();
- cy.cGet('.arrow-div.reverse').should('be.visible'); // Ensure that hyperlink doesn't overlap with the cell.
-
- helper.processToIdle(this.win);
- cy.cGet('#hyperlink-pop-up-copy').click();
-
- cy.cGet('#copy-paste-container').should('contain.text', url); // TODO: There is an extra \n here.
- });
-
- it('Paste-Special', function () {
- helper.setDummyClipboardForCopy();
-
- calcHelper.clickOnFirstCell();
- helper.typeIntoDocument('Something to copy paste.');
- helper.typeIntoDocument('{enter}');
- helper.typeIntoDocument('{upArrow}');
-
- cy.cGet('#canvas-container').then((items) => {
- const rect = items[0].getBoundingClientRect();
- cy.cGet('body').rightclick(rect.left + 55, rect.top + 40);
- });
- cy.cGet('.on-the-fly-context-menu').should('be.visible');
- cy.cGet('body').contains('.on-the-fly-context-menu .context-menu-item', 'Copy').should('be.visible');
- cy.cGet('body').contains('.on-the-fly-context-menu .context-menu-item', 'Copy').click();
-
- helper.typeIntoDocument('{rightArrow}');
- helper.typeIntoDocument('{rightArrow}');
-
- cy.cGet('#canvas-container').rightclick(250, 35);
- cy.cGet('.on-the-fly-context-menu').should('be.visible');
- cy.cGet('body').contains('.on-the-fly-context-menu .context-menu-item', 'Paste Special').should('be.visible');
- cy.cGet('body').contains('.on-the-fly-context-menu .context-menu-item', 'Paste Special').click();
-
- cy.cGet('#modal-dialog-paste_special_dialog-box').should('be.visible');
-
- cy.cGet('#modal-dialog-paste_special_dialog-box-yesbutton').should('be.visible');
- cy.cGet('#modal-dialog-paste_special_dialog-box-yesbutton').click();
-
- cy.cGet('#PasteSpecial').should('be.visible');
- cy.cGet('#ok').click();
-
- cy.cGet('#formulabar').should('contain.text', 'Something to copy paste.');
-
- cy.cGet('#PasteSpecial').should('not.exist');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/debug_tools_spec.js b/cypress_test/integration_tests/desktop/calc/debug_tools_spec.js
deleted file mode 100644
index c467f0415cb21..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/debug_tools_spec.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/* global describe it cy require beforeEach */
-var helper = require('../../common/helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Debug tools', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/debug_tools.ods');
- });
-
- it('Enter and exit debug mode', function() {
- cy.cGet('.leaflet-control-layers.leaflet-control-layers-expanded.leaflet-control').should('not.exist');
- helper.typeIntoDocument('{ctrl}{alt}{shift}D');
- cy.cGet('.leaflet-control-layers.leaflet-control-layers-expanded.leaflet-control').should('be.visible');
- helper.typeIntoDocument('{ctrl}{alt}{shift}D');
- cy.cGet('.leaflet-control-layers.leaflet-control-layers-expanded.leaflet-control').should('not.exist');
- });
-
-});
diff --git a/cypress_test/integration_tests/desktop/calc/delete_objects_spec.js b/cypress_test/integration_tests/desktop/calc/delete_objects_spec.js
deleted file mode 100644
index 71a0d4051772d..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/delete_objects_spec.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* global describe it cy require beforeEach */
-var helper = require('../../common/helper');
-const desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Delete Objects', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/delete_objects.ods');
- desktopHelper.switchUIToCompact();
- });
-
- it('Delete Text', function() {
- helper.setDummyClipboardForCopy();
-
- helper.typeIntoDocument('text');
- helper.selectAllText();
- helper.copy();
- helper.expectTextForClipboard('text');
- helper.typeIntoDocument('{del}');
- helper.typeIntoDocument('{ctrl}a');
- helper.textSelectionShouldNotExist();
- });
-
- it('Delete Shapes', function() {
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- desktopHelper.getCompactIcon('BasicShapes').click();
-
- cy.cGet('.col.w2ui-icon.symbolshapes').click();
-
- cy.cGet('#test-div-shapeHandlesSection')
- .should('exist');
-
- //delete
- helper.typeIntoDocument('{del}');
-
- cy.cGet('#test-div-shapeHandlesSection')
- .should('not.exist');
- });
-
- it('Delete Chart' , function() {
- // Insert chart button not visible yet so click on the overflow button.
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- // Click on insert chart button.
- desktopHelper.getCompactIcon('InsertObjectChart').click();
-
- // Click on the ok button of chart jsdialog.
- cy.cGet('#CHART2_HID_SCH_WIZARD_ROADMAP').should('exist');
- cy.cGet('.ui-pushbutton.jsdialog.button-primary').click();
- cy.cGet('#CHART2_HID_SCH_WIZARD_ROADMAP').should('not.exist');
-
- cy.cGet('#test-div-shapeHandlesSection').should('exist');
- // delete
- helper.typeIntoDocument('{del}');
- cy.cGet('#test-div-shapeHandlesSection').should('not.exist');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/find_dialog_spec.js b/cypress_test/integration_tests/desktop/calc/find_dialog_spec.js
deleted file mode 100644
index a3d5653f6f235..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/find_dialog_spec.js
+++ /dev/null
@@ -1,165 +0,0 @@
-/* global describe it cy beforeEach expect require*/
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-var desktopHelper = require('../../common/desktop_helper');
-var findHelper = require('../../common/find_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Searching via find dialog.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/search_bar.ods');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- calcHelper.assertAddressAfterIdle(this.win, 'A2');
- });
- });
-
- it('Search existing word.', function() {
- helper.setDummyClipboardForCopy();
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
-
- findHelper.findNext();
- // First cell should be selected
- calcHelper.assertAddressAfterIdle(this.win, 'A1');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'a');
-
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'B1');
-
- findHelper.typeIntoSearchField('c');
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'C1');
-
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'c');
-
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'A301');
- });
-
- it('Search existing word when not following own view', function() {
- helper.processToIdle(this.win);
- desktopHelper.assertScrollbarPosition('vertical', 10, 30);
-
- cy.wrap(this.win.app).should((app) => {
- expect(app.isFollowingOff()).to.be.false;
- });
-
- desktopHelper.scrollViewDown(this.win);
- helper.processToIdle(this.win);
- desktopHelper.assertScrollbarPosition('vertical', 175, 205);
-
- cy.wrap(this.win.app).should((app) => {
- expect(app.isFollowingOff()).to.be.true;
- });
-
- helper.setDummyClipboardForCopy();
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
- helper.processToIdle(this.win);
-
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'A1');
- desktopHelper.assertScrollbarPosition('vertical', 10, 30);
-
- desktopHelper.scrollViewDown(this.win);
- helper.processToIdle(this.win);
-
- findHelper.typeIntoSearchField('c');
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'C1');
- desktopHelper.assertScrollbarPosition('vertical', 10, 30);
- });
-
- it('Search not existing word.', function() {
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('q');
-
- // Should be no new selection
- calcHelper.assertAddressAfterIdle(this.win, 'A2');
- });
-
- it('Search next / prev instance.', function() {
- helper.setDummyClipboardForCopy();
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('d');
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'A472');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'd');
-
- // Search next instance
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'D1');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'd');
-
- // Search prev instance
- findHelper.findPrev();
- calcHelper.assertAddressAfterIdle(this.win, 'A472');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'd');
- });
-
- it('Search wrap at document end', function() {
- helper.setDummyClipboardForCopy();
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
-
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'A1');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'a');
-
- // Search next instance
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'B1');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'a');
-
- // Search next instance, which is in the beginning of the document.
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'A1');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'a');
- });
-});
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Jump to result.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/search_jump.ods');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- calcHelper.assertAddressAfterIdle(this.win, 'C2707');
- });
- });
-
- it('Search existing word.', function() {
- helper.setDummyClipboardForCopy();
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('result');
-
- findHelper.findNext();
- // First cell should be selected
- calcHelper.assertAddressAfterIdle(this.win, 'C8');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'result top');
- desktopHelper.assertScrollbarPosition('vertical', 0, 30);
-
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'C300');
- desktopHelper.assertScrollbarPosition('vertical', 40, 60);
-
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'C2303');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', 'result bottom');
-
- findHelper.findNext();
- calcHelper.assertAddressAfterIdle(this.win, 'C8');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/focus_spec.js b/cypress_test/integration_tests/desktop/calc/focus_spec.js
deleted file mode 100644
index 57de475efe4cb..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/focus_spec.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagdesktop'], 'Calc focus tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/focus.ods');
- cy.viewport(1920,1080);
- });
-
- it('Formula-bar focus', function() {
- helper.setDummyClipboardForCopy();
- // Select first cell
- calcHelper.clickOnFirstCell();
- cy.wait(200);
-
- // Type some text.
- var text1 = 'Hello from Calc';
- calcHelper.typeIntoFormulabar(text1);
- calcHelper.typeIntoFormulabar('{enter}');
-
- // Unselect formulabar and reselect cell
- calcHelper.clickOnFirstCell();
- cy.wait(200);
-
- // Check text in formulabar
- calcHelper.typeIntoFormulabar('{ctrl}a');
- helper.copy();
- helper.expectTextForClipboard(text1);
- // Clear selection
- calcHelper.typeIntoFormulabar('{enter}');
-
-
- // Type some more text, at the end.
- calcHelper.clickOnFirstCell();
- cy.wait(200);
- var text2 = ', this is a test.';
- calcHelper.typeIntoFormulabar('{end}'+text2);
- calcHelper.typeIntoFormulabar('{enter}');
-
- // Check text in formulabar
- calcHelper.clickOnFirstCell();
- cy.wait(200);
- calcHelper.typeIntoFormulabar('{ctrl}a');
- helper.copy();
- helper.expectTextForClipboard(text1+text2);
- calcHelper.typeIntoFormulabar('{enter}');
- });
-
- it('On Rename-sheet modal dialog open', function() {
- cy.cGet('.spreadsheet-tab.spreadsheet-tab-selected').dblclick();
- cy.cGet('#input-modal-input').should('have.focus');
- });
-
- it('On color palette dialog open', function() {
- cy.cGet('#Home').click();
- cy.cGet('#Home-container .unoBackgroundColor .arrowbackground').click();
- // focus should be on first element which is Automatic color button
- cy.cGet('#transparent-color-button').should('have.focus');
- });
-
- it('On Tabcontrol dialog open', function() {
- cy.cGet('#Layout-tab-label').click();
- cy.cGet('#layout-page-more-button').filter(':visible').click();
- // focus should be on selected tab if current dialog is tabcontrol dialog
- cy.cGet('.ui-tab.jsdialog.selected').should('have.focus');
- });
-
-});
diff --git a/cypress_test/integration_tests/desktop/calc/formula_dialog_spec.js b/cypress_test/integration_tests/desktop/calc/formula_dialog_spec.js
deleted file mode 100644
index b797123312181..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/formula_dialog_spec.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-
-/* global describe it cy require beforeEach */
-var helper = require('../../common/helper');
-
-describe(['tagdesktop'], 'Formula dialog tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/formula_dialog.ods');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- it('Formula dialog visual regression test', function() {
- cy.wait(1000);
-
- cy.cGet('.unoFunctionDialog.formulabar').click();
- cy.cGet('#FormulaDialog').should('be.visible');
-
- cy.cGet('#FormulaDialog #function .ui-treeview-expander:nth(2)').click();
- cy.cGet('#FormulaDialog #function span').contains('ACCRINTM').dblclick();
- cy.cGet('#FormulaDialog #function .ui-treeview-entry.selected span').contains('ACCRINTM').should('exist');
- cy.cGet('#FormulaDialog label').contains('Settlement').should('be.visible');
-
- cy.wait(1000); /* wait for position changes */
-
- cy.cGet('.ui-dialog').compareSnapshot('formula_dialog_accrintm', 0.1);
-
- helper.processToIdle(this.win);
-
- // collapse to selection mode
- cy.cGet('#FormulaDialog #RB_ARG1-button').click();
-
- cy.cGet('#FormulaDialog #function').should('not.be.visible');
- cy.wait(1000); /* wait for position changes */
-
- cy.cGet('.ui-dialog').compareSnapshot('formula_dialog_accrintm_collapsed', 0.1);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/formulabar_spec.js b/cypress_test/integration_tests/desktop/calc/formulabar_spec.js
deleted file mode 100644
index 1431918b769ef..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/formulabar_spec.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-
-/* global describe it cy require beforeEach */
-var helper = require('../../common/helper');
-
-describe(['tagdesktop'], 'Formulabar tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/formulabar.ods');
- cy.cGet('#pos_window-input-address').should('have.value', 'AB106');
- });
-
- it('Do not hide on notebookbar collapse', function() {
- cy.cGet('#Home-tab-label').click();
- cy.cGet('#sc_input_window.formulabar').should('be.visible');
- });
-
- // FIXME: need to stabilize
- it.skip('Formula editing shows usage popup for a function', function() {
- // verify default cell selected
- cy.cGet('#sc_input_window.formulabar .ui-custom-textarea-cursor-layer')
- .should('have.text', '=SUM(Z101:Z104,AB101:AB104)');
-
- cy.cGet('#sc_input_window.formulabar').click().should('have.class', 'focused');
-
- // type arrow left to enter into function SUM
- cy.cGet('#clipboard-area').type('{leftArrow}');
-
- // we should see help for a SUM function
- cy.cGet('#formulausagePopup .jsdialog-container').should('be.visible');
- cy.cGet('#formulausagePopup .ui-treeview-cell-text-content')
- .contains('SUM(').should('exist');
-
- cy.wait(500);
- cy.cGet('#formulausagePopup .jsdialog-container').compareSnapshot('formulausage', 0.03);
-
- // we should be able to type into formulabar (popup is not interactive)
- cy.cGet('#sc_input_window.formulabar').should('have.class', 'focused');
- const additionalText = ',1000';
- cy.cGet('#clipboard-area').type(additionalText + '{enter}');
-
- // enter moves one cell down, go back
- cy.cGet('#pos_window-input-address').should('have.value', 'AB107');
- cy.cGet('#pos_window-input-address').type('{selectAll}AB106{enter}');
- cy.cGet('#pos_window-input-address').should('have.value', 'AB106');
-
- // verify modification
- cy.cGet('#sc_input_window.formulabar .ui-custom-textarea-cursor-layer')
- .should('have.text', '=SUM(Z101:Z104,AB101:AB104' + additionalText + ')');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/help_dialog_update_spec.js b/cypress_test/integration_tests/desktop/calc/help_dialog_update_spec.js
deleted file mode 100644
index d5ef519f401ed..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/help_dialog_update_spec.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-// This spec file does not test anything and it is use to update
-// help dialog screenshots. You can run this spec using:
-// make UPDATE_SCREENSHOT=true check-desktop spec=calc/help_dialog_update_spec.js
-// UPDATE_SCREENSHOT needs to be true otherwise cypress will not run the spec file and
-// update the screenshot
-
-/* global describe it cy require Cypress beforeEach */
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagscreenshot'], 'Help dialog update', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/help_dialog.ods');
- });
-
- it('Chart selected sidebar open', function() {
- calcHelper.selectFirstColumn();
-
- cy.cGet('#menu-insert').click();
- cy.cGet('body').contains('Chart...').click();
-
- cy.cGet('.lokdialog_container').click();
-
- helper.typeIntoDocument('{shift}{enter}');
-
- cy.cGet('#finish').click();
-
- cy.wait(1000);
-
- cy.cGet('#main-document-content').screenshot('chart-wizard');
-
- cy.task('copyFile', {
- sourceDir: Cypress.config('screenshotsFolder') + '/calc/help_dialog_update_spec.js/',
- destDir: Cypress.env('IMAGES_FOLDER'),
- fileName: 'chart-wizard.png',
- });
- });
-
-});
diff --git a/cypress_test/integration_tests/desktop/calc/image_operation_spec.js b/cypress_test/integration_tests/desktop/calc/image_operation_spec.js
deleted file mode 100644
index 4ee8e8ed16e02..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/image_operation_spec.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* global describe it cy require beforeEach */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop'], 'Image Operation Tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/image_operation.ods');
- desktopHelper.switchUIToNotebookbar();
- cy.viewport(1920,1080);
- });
-
- it('Insert/Delete Image',function() {
- desktopHelper.insertImage('calc');
-
- //make sure that image is in focus
- cy.cGet('#document-container svg g').should('exist');
-
- desktopHelper.deleteImage();
- });
-
- it('Crop Image', function() {
- const moveY = 50;
-
- desktopHelper.insertImage('calc');
-
- helper.assertImageSize(248, 63);
-
- // use bottom handle
- cy.cGet('#test-div-shape-handle-6').should('exist');
- cy.cGet('.unoCrop').should('be.visible').click();
-
- cy.cGet('#test-div-shape-handle-6').then(($handle) => {
- const rect = $handle[0].getBoundingClientRect();
- const startX = rect.left + rect.width / 2;
- const startY = rect.top + rect.height / 2;
-
- cy.cGet('body').realMouseDown({ x: startX, y: startY });
-
- cy.cGet('body').realMouseMove(startX, startY - moveY);
-
- cy.cGet('body').realMouseUp({ x: startX, y: startY - moveY });
- cy.cGet('body').realMouseUp();
- });
-
- cy.wait(1000);
- helper.assertImageSize(248, 63 - moveY);
- });
-
- it.skip('Resize image when keep ratio option enabled and disabled', function() {
- desktopHelper.insertImage('calc');
- //when Keep ratio is unchecked
- helper.assertImageSize(248, 63);
-
- cy.cGet().contains('.ui-expander-label', 'Position and Size')
- .click();
-
- cy.cGet('#selectwidth input').type('{selectAll}{backspace}3{enter}');
-
- cy.cGet('#selectheight input').type('{selectAll}{backspace}2{enter}');
-
- helper.assertImageSize(139, 93);
-
- //Keep ratio checked
- cy.cGet('#ratio input').check();
-
- cy.cGet('#selectheight input').type('{selectAll}{backspace}5{enter}');
-
- helper.assertImageSize(347, 232);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/jsdialog_spec.js b/cypress_test/integration_tests/desktop/calc/jsdialog_spec.js
deleted file mode 100644
index ddec63766c3c6..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/jsdialog_spec.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-
-/* global describe it cy require expect beforeEach */
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop'], 'JSDialog unit test', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/help_dialog.ods');
- cy.viewport(1920,1080);
- });
-
- it('JSDialog popup dialog', function() {
- cy.getFrameWindow()
- .its('L')
- .then(function(L) {
- var jsonDialog = {
- id: 'testpopup',
- jsontype: 'dialog',
- type: 'modalpopup',
- children: [{
- id: 'busycontainer',
- type: 'container',
- vertical: 'true',
- children: [{
- id: 'busylabel',
- type: 'fixedtext',
- text: 'test popup dialog'}]
- }]
- };
- var dialog = L.control.jsDialog();
- var fnClosePopup = cy.spy(dialog, 'closePopover');
- dialog.onJSDialog({data: jsonDialog, callback: function() {}});
- expect(Object.keys(dialog.dialogs)).to.have.length(1);
- dialog.closeAll(false);
- expect(fnClosePopup).to.be.called;
- });
- });
-
- it('JSDialog child focus', function() {
- cy.getFrameWindow().then(function(win) {
- var smile = win.document.querySelector('meta[name="previewSmile"]').content;
- var jsonDialog = {
- id: 'testfocus',
- type: 'dialog',
- text: 'Focus test',
- children: [{
- id: 'tabcontrol',
- type: 'tabcontrol',
- selected: 1,
- tabs: [{
- text: 'Test Focus',
- id: 1,
- name: 'testfocus'}],
- children: [{
- id: 'tabpage',
- type: 'tabpage',
- enabled: true,
- text: 'Focus',
- children: [{
- id: 'container',
- type: 'container',
- children: [{
- id: 'colorsetwin',
- type: 'scrollwindow',
- children: [{
- id: 'colorset',
- type: 'drawingarea',
- canFocus: true,
- enabled: true,
- imagewidth: 216,
- imageheight: 180,
- image: smile }]}, {
- id: 'testcheck',
- type: 'checkbox',
- text: 'checkbox' }]
- }]
- }]
- }]};
-
- var dialog = win.L.control.jsDialog();
- dialog.onJSDialog({data: jsonDialog, callback: function() {}});
- expect(Object.keys(dialog.dialogs)).to.have.length(1);
- });
-
- cy.cGet('#tabcontrol').should('be.visible');
-
- cy.getFrameWindow().then(function(win) {
- var dialog = win.L.control.jsDialog();
- var current = win.document.activeElement;
- expect(current.id).to.equal('tabcontrol-1');
-
- cy.realPress('Tab').then(function() {
- var next = win.document.activeElement;
- expect(next.id).to.equal('colorset-img');
- dialog.closeAll(false);
- });
- });
- });
-
- it('Open hybrid help dialog', function() {
- cy.cGet('#Help-tab-label').click();
- cy.cGet('.unoOnlineHelp').click();
- cy.cGet('#online-help-content').should('exist');
- });
-
- it('JSDialog dropdown', function() {
- cy.cGet('#toolbar-up #Home .unoConditionalFormatMenu:visible').click();
-
- desktopHelper.getDropdown('home-conditional-format-menu').should('exist');
-
- // Click on overlay to close
- cy.cGet('.jsdialog-overlay').click();
-
- // Dropdown should be closed
- cy.cGet('.jsdialog-overlay').should('not.exist');
- desktopHelper.getDropdown('home-conditional-format-menu').should('not.exist');
- });
-
- it('JSDialog check enable edit input', function() {
- cy.cGet('#File-tab-label').click();
- cy.cGet('#File-container .unodownloadas button').click();
-
- // open "PDF options JsDialog"
- cy.cGet('.exportpdf-submenu-icon').click();
-
- // check watermark checkbox to enable watermark entry input
- cy.cGet('#watermark-input').check();
- // after enable watermark checkbox the input field beside should also be in enabled state
- cy.cGet('#watermarkentry-input').should('not.be.disabled');
-
- });
-
- it('JSDialog check data validity options', function() {
- cy.cGet('#Data-tab-label').click();
- cy.cGet('.unoValidation').click();
-
- // On changing options other fields should toggle enable and disable
- cy.cGet('#data-input').should('be.disabled');
- cy.cGet('#allow-input').select("1");
-
- cy.cGet('#data-input').should('not.be.disabled');
- });
-
- it('QuerySelector Syntax error', function(){
-
- cy.getFrameWindow().then(function(win) {
- cy.spy(win.console, 'error').as('consoleError');
- })
-
- cy.cGet('#Format-tab-label').click();
- // FIXME: below button has class with "." inside, best to rework it
- cy.cGet('#Format [id^="format-style-dialog"]:visible button').click();
- cy.cGet('#filter-input').select('4');
- cy.wait(500);
- cy.cGet('#flatview .ui-treeview-entry').eq(6).rightclick();
- cy.get('@consoleError').should('not.be.called');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/macro_spec.js b/cypress_test/integration_tests/desktop/calc/macro_spec.js
deleted file mode 100644
index 5a95b0ae0c8c2..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/macro_spec.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagdesktop', 'tagproxy'], 'macro dialog tests', function() {
-
- beforeEach(function() {
- var newFilePath = helper.setupDocument('calc/macro.ods');
- // Skip document check to click through accept macro dialog first
- helper.loadDocument(newFilePath,true);
- acceptMacroExecution();
- helper.documentChecks();
- });
-
- function acceptMacroExecution() {
- cy.get('#MacroWarnMedium.jsdialog')
- .should('exist');
-
- cy.cGet('#MacroWarnMedium.jsdialog #ok').click();
- }
-
- function expandEntryInTreeView(entryText) {
- cy.cGet().contains('.jsdialog.ui-treeview-cell', entryText)
- .siblings('.ui-treeview-expander')
- .click();
- }
-
- it.skip('Macro execution warning appears before loading the document.', function() {
- calcHelper.selectEntireSheet();
-
- cy.cGet('#copy-paste-container table td')
- .should('not.have.text', 'Macro Executed');
-
- cy.cGet('#menu-tools > a')
- .click();
-
- cy.cGet('#menu-runmacro')
- .click();
-
- cy.cGet('#MacroSelectorDialog.jsdialog')
- .should('exist');
-
- expandEntryInTreeView('macro.ods');
- expandEntryInTreeView('VBAProject');
-
- cy.cGet().contains('.jsdialog.ui-treeview-cell', 'Module1')
- .click();
-
- cy.cGet().contains('#commands .ui-treeview-cell', 'test_macro')
- .click();
-
- cy.cGet('#MacroSelectorDialog.jsdialog #ok')
- .click();
-
- calcHelper.selectEntireSheet();
-
- cy.cGet('#copy-paste-container table td')
- .should('have.text', 'Macro Executed');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/mouse_cursor_spec.js b/cypress_test/integration_tests/desktop/calc/mouse_cursor_spec.js
deleted file mode 100644
index de36b91b60d12..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/mouse_cursor_spec.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Check mouse cursor type in various interactions', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/mouse_cursor.ods');
- });
-
- /*
- NOTE: we need more of these tests for the elements where
- we change the cursor style:
- - the shape resize handles
- - the autofill marker
- - column/row headers
- */
- it('Cell cursor over the sheet', function() {
- cy.cGet('#document-canvas').trigger('mouseover').then(() => {
- cy.cGet('#document-canvas').should('have.class', 'spreadsheet-cursor');
- });
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/navigator_spec.js b/cypress_test/integration_tests/desktop/calc/navigator_spec.js
deleted file mode 100644
index 47df32d276b30..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/navigator_spec.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var { insertImage, deleteImage } = require('../../common/desktop_helper');
-
-describe.skip(['tagdesktop'], 'Navigator tests.', function () {
-
- beforeEach(function () {
- helper.setupAndLoadDocument('calc/navigator.ods');
-
- cy.cGet('#menu-view').click();
- cy.cGet('#menu-navigator').click();
- });
-
- it('Jump to element. Navigator -> Document', function() {
- // Doubleclick several items, and check if the view is jumped to there
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Comment1').dblclick();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'O81');
- cy.cGet('#StatusDocPos').should('have.text', 'Sheet 3 of 24');
-
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Sheet22').dblclick();
- cy.cGet('#StatusDocPos').should('have.text', 'Sheet 22 of 24');
-
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'rName1').dblclick();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'rName1');
- cy.cGet('#StatusDocPos').should('have.text', 'Sheet 2 of 24');
-
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'dRange').dblclick();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'S21:T22');
- cy.cGet('#StatusDocPos').should('have.text', 'Sheet 3 of 24');
- });
-
- // Clicking Document item does not select Navigator entry, not even in desktop app, so no need to test
-
- it('Rename sheet -> updated in Navigator', function () {
- cy.cGet('.spreadsheet-tab.spreadsheet-tab-selected').rightclick();
- cy.cGet('body').contains('.context-menu-link', 'Rename Sheet...').click();
- cy.cGet('#modal-dialog-rename-calc-sheet').should('exist');
- cy.cGet('#input-modal-input').type('{selectall}{backspace}renameSheet');
- cy.cGet('#response-ok').click();
- cy.cGet('.spreadsheet-tab.spreadsheet-tab-selected').should('have.text', 'renameSheet');
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'renameSheet').should('exist');
- });
-
- it('create items -> updated in Navigator', function () {
- // Create a new Range name
- cy.cGet('#menu-data').click();
- cy.cGet('#menu-data').contains('.has-submenu', 'Named Ranges and Expressions').parent().click();
- cy.cGet('#menu-data').contains('Define...').parent().click();
- cy.cGet('#DefineNameDialog').find('#edit').type('{selectall}{backspace}rName2');
- cy.cGet('#DefineNameDialog').find('#range').type('{selectall}{backspace}$Sheet5.$C$55:$C$56');
- cy.cGet('#DefineNameDialog').find('#add').click();
-
- // Check if it exist in Navigator
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'rName2').should('exist');
-
- // Check if clicking on it will move cursor there
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'rName2').dblclick();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'rName2');
- cy.cGet('#StatusDocPos').should('have.text', 'Sheet 5 of 24');
-
- // Insert a comment
- cy.cGet('#menu-insert').click();
- cy.cGet('#menu-insertcomment').click();
- cy.cGet('#comment-container-new').type('commentNew');
- // We should click Save, but I could not check its name, because clicking
- // in inspector removes the dialog-rename-calc-sheet.
- // But any kind of click will result the same.
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'rName2').dblclick();
- // Check if the commentNew is in the Navigator
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'commentNew').should('exist');
-
- // Insert an image
- insertImage('calc');
- // Check if it exist in Navigator
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Image 1').should('exist');
- // Delete the image, and check that is not in the Navigator
- deleteImage();
- cy.cGet('#contentbox').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Image 1').should('not.exist');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/number_format_spec.js b/cypress_test/integration_tests/desktop/calc/number_format_spec.js
deleted file mode 100644
index 35499c9f77613..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/number_format_spec.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* global describe it cy require beforeEach */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop'], 'Number format Tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/number_format.ods');
- desktopHelper.switchUIToNotebookbar();
- cy.viewport(1920,1080);
- helper.setDummyClipboardForCopy();
- });
-
- it('Use currency dropdown in notebookbar', function() {
- cy.cGet('.jsdialog-overlay .modalpopup').should('not.exist');
-
- // go to A3 and reset content
- helper.typeIntoInputField(helper.addressInputSelector, 'A3');
- helper.typeIntoDocument('100');
- cy.cGet(helper.addressInputSelector).should('have.value', 'A3');
- cy.cGet('.notebookbar .unoNumberFormatCurrency').should('not.have.class', 'selected');
-
- // set USD currency
- cy.cGet('.notebookbar .unoNumberFormatCurrency .arrowbackground').filter(':visible').click();
- cy.cGet('.jsdialog-overlay .modalpopup').should('be.visible');
- cy.cGet('.jsdialog-overlay .modalpopup .ui-treeview-cell-text').contains('USA').click();
- cy.cGet('.jsdialog-overlay .modalpopup').should('not.exist');
-
- cy.cGet(helper.addressInputSelector).should('have.value', 'A3');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', '$100.00');
- cy.cGet('.notebookbar .unoNumberFormatCurrency').should('have.class', 'selected');
-
- // set GBP currency
- cy.cGet('.notebookbar .unoNumberFormatCurrency .arrowbackground').filter(':visible').click();
- cy.cGet('.jsdialog-overlay .modalpopup').should('be.visible');
- cy.cGet('.jsdialog-overlay .modalpopup .ui-treeview-cell-text').contains('UK').click();
- cy.cGet('.jsdialog-overlay .modalpopup').should('not.exist');
-
- cy.cGet(helper.addressInputSelector).should('have.value', 'A3');
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', '£100.00');
- cy.cGet('.notebookbar .unoNumberFormatCurrency').should('have.class', 'selected');
-
- // turn off currency
- cy.cGet('.notebookbar .unoNumberFormatCurrency').filter(':visible').click();
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.text', '100');
- cy.cGet('.notebookbar .unoNumberFormatCurrency').should('not.have.class', 'selected');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/open_different_file_types_spec.js b/cypress_test/integration_tests/desktop/calc/open_different_file_types_spec.js
deleted file mode 100644
index 0784e6e4abc6e..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/open_different_file_types_spec.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* global describe it cy require */
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe.skip(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Open different file types', function () {
-
- function assertData() {
- var expectedData = [
- '0', 'First Name', 'Last Name', 'Gender', 'Country', 'Age', 'Date', 'Id',
- '1', 'Dulce', 'Abril', 'Female', 'United States', '32', '15/10/2017', '1562',
- '2', 'Mara', 'Hashimoto', 'Female', 'Great Britain', '25', '16/08/2016', '1582',
- '3', 'Philip', 'Gent', 'Male', 'France', '36', '21/05/2015', '2587',
- '4', 'Kathleen', 'Hanner', 'Female', 'United States', '25', '15/10/2017', '3549',
- ];
- calcHelper.assertSheetContents(expectedData);
- }
-
- it('Open xls file', { defaultCommandTimeout: 60000 }, function () {
- helper.setupAndLoadDocument('calc/testfile.xls');
-
- assertData();
-
- desktopHelper.insertImage();
- });
-
- it('Open xlsx file', { defaultCommandTimeout: 60000 }, function () {
- helper.setupAndLoadDocument('calc/testfile.xlsx');
-
- assertData();
- });
-
- it('Open csv file', { defaultCommandTimeout: 60000 }, function() {
- //to fit csv jsdialog in window
- cy.viewport(1280, 960);
-
- var newFilePath = helper.setupDocument('calc/testfile.csv');
- // Skip document check to click through import csv dialog first
- helper.loadDocument(newFilePath,true);
-
- cy.cGet('form.jsdialog-container.lokdialog_container').should('exist');
- cy.cGet('.ui-pushbutton.jsdialog.button-primary').click();
-
- //check doc is loaded
- helper.documentChecks();
-
- cy.cGet('#mobile-edit-button')
- .should('be.visible')
- .click();
-
- cy.cGet('#modal-dialog-switch-to-edit-mode-modal-yesbutton').click();
-
- assertData();
- });
-
- it('Open xlsb file', { defaultCommandTimeout: 60000 }, function() {
- desktopHelper.openReadOnlyFile('calc/testfile.xlsb');
-
- cy.cGet('#mobile-edit-button').should('be.visible').click();
- cy.cGet('#modal-dialog-switch-to-edit-mode-modal-overlay').should('be.visible');
- cy.cGet('#modal-dialog-switch-to-edit-mode-modal-label')
- .should('have.text', 'This document may contain formatting or content that cannot be saved in the current file format.');
-
- cy.cGet('#modal-dialog-switch-to-edit-mode-modal-yesbutton').should('have.text', 'Continue read only').click();
- cy.cGet('#PermissionMode').should('be.visible').should('have.text', ' Read-only ');
- });
-
- it('Open xlsm file', { defaultCommandTimeout: 60000 }, function() {
- helper.setupAndLoadDocument('calc/testfile.xlsm');
-
- assertData();
-
- desktopHelper.insertImage();
- });
-
- it('Open xltm file', { defaultCommandTimeout: 60000 }, function() {
- desktopHelper.openReadOnlyFile('calc/testfile.xltm');
-
- cy.cGet('#mobile-edit-button').should('not.be.visible');
- });
-
- it('Open xltx file', { defaultCommandTimeout: 60000 }, function() {
- desktopHelper.openReadOnlyFile('calc/testfile.xltm');
-
- cy.cGet('#mobile-edit-button').should('not.be.visible');
- });
-
- it('Open fods file', { defaultCommandTimeout: 60000 }, function() {
- helper.setupAndLoadDocument('calc/testfile.fods');
-
- //select all the content of doc
- assertData();
-
- desktopHelper.insertImage();
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/row_column_operation_spec.js b/cypress_test/integration_tests/desktop/calc/row_column_operation_spec.js
deleted file mode 100644
index dcfab06d28dca..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/row_column_operation_spec.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/* global describe it cy require beforeEach */
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop'], 'Row Column Operation', function() {
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/row_column_operation.ods');
- desktopHelper.switchUIToNotebookbar();
- cy.viewport(1920,1080);
- cy.getFrameWindow().then(function(frameWindow) {
- this.win = frameWindow;
- });
- helper.setDummyClipboardForCopy();
- calcHelper.assertSheetContents(['Hello','Hi','World','Bye'], true);
- calcHelper.clickOnFirstCell(true,false);
- });
-
- it('Insert/Delete row' , function() {
- //Insert row above
- desktopHelper.getNbIcon('InsertColumnsBefore', 'Home').click();
- helper.processToIdle(this.win);
-
- //calcHelper.assertSheetContents(['','','Hello','Hi','World','Bye']);
- //delete row
- calcHelper.clickOnFirstCell(true, false);
-
- desktopHelper.getNbIcon('DeleteRows', 'Home').click();
- helper.processToIdle(this.win);
- //calcHelper.assertSheetContents(['Hello','Hi','World','Bye']);
-
- //insert row below
- calcHelper.clickOnFirstCell(true, false);
- desktopHelper.getNbIcon('InsertRowsAfter', 'Home').click();
- //calcHelper.assertSheetContents(['Hello','Hi','','','World','Bye']);
- });
-
- it('Insert/Delete Column', function() {
- //insert column before
- desktopHelper.getNbIcon('InsertColumnsBefore', 'Home').click();
- helper.processToIdle(this.win);
- //calcHelper.assertSheetContents(['','Hello','Hi','','World','Bye']);
- calcHelper.clickOnFirstCell(true, false);
-
- //delete column
- desktopHelper.getNbIcon('DeleteColumns', 'Home').click();
- helper.processToIdle(this.win);
- //calcHelper.assertSheetContents(['Hello','Hi','World','Bye']);
- calcHelper.clickOnFirstCell(true, false);
-
- //insert column after
- desktopHelper.getNbIcon('InsertColumnsAfter', 'Home').click();
- //calcHelper.assertSheetContents(['Hello','','Hi','World','','Bye']);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/rtl_spec.js b/cypress_test/integration_tests/desktop/calc/rtl_spec.js
deleted file mode 100644
index 8fa0ebe4d0a6a..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/rtl_spec.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-
-/* global describe it require beforeEach */
-var helper = require('../../common/helper');
-
-describe(['tagdesktop'], 'RTL sheet tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/rtl-load.ods');
- });
-
- it('RTL sheet load', function() {
- // just load...
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/scrolling_spec.js b/cypress_test/integration_tests/desktop/calc/scrolling_spec.js
deleted file mode 100644
index 140025868b5d4..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/scrolling_spec.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/* global describe it cy beforeEach expect require */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Scroll through document', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/scrolling.ods');
- desktopHelper.switchUIToCompact();
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- it('Scrolling to bottom/top', function() {
- desktopHelper.assertScrollbarPosition('vertical', 25, 40);
- desktopHelper.pressKey(3,'pagedown');
- desktopHelper.assertScrollbarPosition('vertical', 110, 130);
- desktopHelper.pressKey(3,'pageup');
- desktopHelper.assertScrollbarPosition('vertical', 50, 105);
- desktopHelper.pressKey(3,'downArrow');
- desktopHelper.assertScrollbarPosition('vertical', 25, 40);
- });
-
- it('Scrolling to left/right', function() {
- desktopHelper.selectZoomLevel('200');
- helper.typeIntoDocument('{home}');
- desktopHelper.assertScrollbarPosition('horizontal', 48, 60);
- helper.typeIntoDocument('{end}');
- helper.processToIdle(this.win);
- desktopHelper.assertScrollbarPosition('horizontal', 180, 300);
- });
-
- it('Scroll while selecting vertically', function() {
- desktopHelper.assertScrollbarPosition('vertical', 25, 40);
- desktopHelper.assertScrollbarPosition('horizontal', 48, 50);
-
- // Click on a cell near the edge of the view
- cy.cGet('#map')
- .then(function(items) {
- expect(items).to.have.lengthOf(1);
- var XPos = items[0].getBoundingClientRect().right - 280;
- var YPos = items[0].getBoundingClientRect().bottom - 60;
- cy.cGet('body').click(XPos, YPos);
- });
-
- // Select cells downwards with shift + arrow
- for (let i = 0; i < 10; ++i) {
- helper.typeIntoDocument('{shift}{downArrow}');
- }
-
- // Document should scroll
- desktopHelper.assertScrollbarPosition('vertical', 180, 300);
- // Document should not scroll horizontally
- desktopHelper.assertScrollbarPosition('horizontal', 48, 50);
- });
-
- it('Scroll while selecting horizontally', function() {
- desktopHelper.assertScrollbarPosition('horizontal', 48, 60);
-
- // Click on a cell near the edge of the view
- cy.cGet('#map')
- .then(function(items) {
- expect(items).to.have.lengthOf(1);
- var XPos = items[0].getBoundingClientRect().right - 280;
- var YPos = items[0].getBoundingClientRect().bottom - 60;
- cy.cGet('body').click(XPos, YPos);
- });
-
- // Select cells to the right with shift + arrow
- for (let i = 0; i < 10; ++i) {
- helper.typeIntoDocument('{shift}{rightArrow}');
- }
-
- // Document should scroll
- desktopHelper.assertScrollbarPosition('horizontal', 80, 155);
- });
-
- it('Scroll while selecting with mouse', function () {
- cy.cGet(helper.addressInputSelector).should('have.value', 'A2');
-
- // Click on the bottom left cell and hold
- cy.cGet('#document-container')
- .then(function (items) {
- expect(items).to.have.lengthOf(1);
- var yPos = items[0].getBoundingClientRect().height - 60;
- cy.cGet('#document-container').realMouseDown({ pointer: 'mouse', button: 'left', x: 30, y: yPos, scrollBehavior: false });
- });
- // Drag some cells to the right
- cy.cGet('#document-container').realMouseMove(-280, -60, { position: 'bottomRight', scrollBehavior: false });
- // Drag to the bottom edge
- cy.cGet('#document-container').realMouseMove(-280, 0, { position: 'bottomRight', scrollBehavior: false });
- helper.processToIdle(this.win);
- // Wait for autoscroll and lift the button
- helper.waitForTimers(this.win, 'autoscroll');
- cy.cGet('#document-container').realMouseUp({ pointer: 'mouse', button: 'left' });
-
- // Allow the change to propogate to core and it to update the addressInputSelector
- helper.processToIdle(this.win);
- // Without the fix, the selected range is of the form A17:A22, instead of A17:D22
- // It's better not to check the exact range because it can easily change in different executions
- cy.cGet(helper.addressInputSelector).invoke('val').should('contain', 'D');
- });
-
- it('Scroll while selecting with mouse - outside the canvas', function () {
- cy.cGet(helper.addressInputSelector).should('have.value', 'A2');
-
- // Click on the bottom left cell and hold
- cy.cGet('#document-container')
- .then(function (items) {
- expect(items).to.have.lengthOf(1);
- const right = items[0].getBoundingClientRect().right;
- const bottom = items[0].getBoundingClientRect().bottom;
- const horizontalCenter = Math.round(right * 0.5);
-
- helper.processToIdle(this.win);
- cy.cGet('body').realMouseDown(horizontalCenter, Math.round(bottom * 0.5));
-
- cy.cGet('body').realMouseMove(horizontalCenter, bottom - 50);
-
- // We should have initiated a selection by now. Move the mouse to where the horizontal scroll bar must be (this tests a fix).
- cy.cGet('body').realMouseMove(horizontalCenter, bottom - 5);
-
- // Wait for autoscroll to start at the edge before moving outside
- helper.processToIdle(this.win);
-
- // Move the mouse pointer outside the document. It should be widening the selection (mouse button is pressed and being held).
- for (let i = 0; i < 10; i++) {
- cy.cGet('body').realMouseMove(horizontalCenter, bottom + 20);
- helper.processToIdle(this.win);
- cy.cGet('body').realMouseMove(horizontalCenter, bottom + 30);
- }
-
- // Release the mouse button to stop autoscroll
- cy.cGet('body').realMouseUp();
- helper.processToIdle(this.win);
- helper.waitForTimers(this.win, 'autoscroll');
-
- // Click on the ~center of the window.
- cy.cGet('body').click(horizontalCenter, Math.round(right * 0.5));
- cy.cGet(helper.addressInputSelector).then((item) => {
- const addressInput = item[0];
- const rowNumber = parseInt(addressInput.value.substring(1, addressInput.value.length));
- cy.expect(rowNumber).to.be.greaterThan(22);
- });
- }
- );
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/sheet_operation_spec.js b/cypress_test/integration_tests/desktop/calc/sheet_operation_spec.js
deleted file mode 100644
index 6d6ff1e3d3223..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/sheet_operation_spec.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Sheet Operations.', function () {
-
- beforeEach(function () {
- helper.setupAndLoadDocument('calc/sheet_operation.ods');
- });
-
- it('Insert sheet', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('#spreadsheet-toolbar #insertsheet').click();
- calcHelper.assertNumberofSheets(2);
- });
-
- it.skip('Switching sheet sets the view that contains cell-cursor', function () {
- calcHelper.assertNumberofSheets(1);
- helper.typeIntoInputField(helper.addressInputSelector, 'A1');
- calcHelper.ensureViewContainsCellCursor();
- cy.cGet('#spreadsheet-toolbar #insertsheet').click();
- calcHelper.assertNumberofSheets(2);
- cy.cGet('#spreadsheet-tab1').click();
- calcHelper.ensureViewContainsCellCursor();
- helper.typeIntoInputField(helper.addressInputSelector, 'A200');
- calcHelper.ensureViewContainsCellCursor();
- cy.cGet('#spreadsheet-tab0').click();
- calcHelper.ensureViewContainsCellCursor();
- });
-
- it('Insert sheet before', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('#spreadsheet-tab0').should('have.text', 'Sheet1');
- calcHelper.selectOptionFromContextMenu('Insert sheet before this');
- calcHelper.assertNumberofSheets(2);
- cy.cGet('#spreadsheet-tab0').should('have.text', 'Sheet2');
- cy.cGet('#spreadsheet-tab1').should('have.text', 'Sheet1');
- });
-
- it('Insert sheet after', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('#spreadsheet-tab0').should('have.text', 'Sheet1');
- calcHelper.selectOptionFromContextMenu('Insert sheet after this');
- calcHelper.assertNumberofSheets(2);
- cy.cGet('#spreadsheet-tab0').should('have.text', 'Sheet1');
- cy.cGet('#spreadsheet-tab1').should('have.text', 'Sheet2');
- });
-
- it('Delete sheet', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('#spreadsheet-toolbar #insertsheet').click();
- calcHelper.assertNumberofSheets(2);
- calcHelper.selectOptionFromContextMenu('Delete Sheet...');
- cy.cGet('#delete-sheet-modal-response').click();
- calcHelper.assertNumberofSheets(1);
- });
-
- it('Rename sheet', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('.spreadsheet-tab.spreadsheet-tab-selected').should('have.text', 'Sheet1');
- calcHelper.selectOptionFromContextMenu('Rename Sheet...');
- cy.cGet('#modal-dialog-rename-calc-sheet').should('exist');
- cy.cGet('#input-modal-input').type('{selectall}{backspace}renameSheet');
- cy.cGet('#response-ok').click();
- cy.cGet('.spreadsheet-tab.spreadsheet-tab-selected').should('have.text', 'renameSheet');
- });
-
- it('Rename sheet using keyboard only', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('.spreadsheet-tab.spreadsheet-tab-selected').should('have.text', 'Sheet1');
- calcHelper.selectOptionFromContextMenu('Rename Sheet...');
- cy.cGet('#modal-dialog-rename-calc-sheet').should('exist');
- cy.cGet('#input-modal-input').should('have.focus').type('{selectall}{backspace}renameSheet{Enter}');
- cy.cGet('#modal-dialog-rename-calc-sheet').should('not.exist');
- cy.cGet('.spreadsheet-tab.spreadsheet-tab-selected').should('have.text', 'renameSheet');
- });
-
-
- it('Hide/Show sheet', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('#spreadsheet-toolbar #insertsheet').click();
- calcHelper.assertNumberofSheets(2);
- //hide sheet
- calcHelper.selectOptionFromContextMenu('Hide Sheet');
- calcHelper.assertNumberofSheets(1);
- //show sheet
- calcHelper.selectOptionFromContextMenu('Show Sheet');
- cy.cGet('#show-sheets-modal').should('exist');
- cy.cGet('#hidden-part-checkbox-Sheet2').check();
- cy.cGet('#show-sheets-modal-response').click();
- calcHelper.assertNumberofSheets(2);
- });
-
- it('Move sheet left/right', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('#spreadsheet-toolbar #insertsheet').click();
- calcHelper.assertNumberofSheets(2);
- cy.cGet('#spreadsheet-tab0').should('have.text', 'Sheet1');
- //left
- calcHelper.selectOptionFromContextMenu('Move Sheet Left');
- cy.cGet('#spreadsheet-tab0').should('have.text', 'Sheet2');
- //right
- calcHelper.selectOptionFromContextMenu('Move Sheet Right');
- cy.cGet('#spreadsheet-tab0').should('have.text', 'Sheet1');
- });
-
- it('Open sheet list and select a sheet', function () {
- calcHelper.assertNumberofSheets(1);
- cy.cGet('#spreadsheet-toolbar #insertsheet').click();
- calcHelper.assertNumberofSheets(2);
- // Open sheet list popup
- cy.cGet('#spreadsheet-toolbar #sheetlist').click();
- cy.cGet('#sheetlist-dropdown').should('be.visible');
- cy.cGet('#sheetlist-dropdown #sheetlist-entries .ui-combobox-entry ').should('have.length', 2);
- cy.cGet('#sheetlist-dropdown #sheetlist-entries .ui-combobox-entry ').eq(1).should('have.class', 'selected');
- // Select first sheet
- cy.cGet('#sheetlist-dropdown #sheetlist-entries .ui-combobox-entry ').eq(0).click();
- cy.cGet('#sheetlist-dropdown').should('not.exist');
- cy.cGet('#spreadsheet-tab0').should('have.class', 'spreadsheet-tab-selected');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/sheet_switch_spec.js b/cypress_test/integration_tests/desktop/calc/sheet_switch_spec.js
deleted file mode 100644
index 3530066ba6de2..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/sheet_switch_spec.js
+++ /dev/null
@@ -1,175 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var calcHelper = require('../../common/calc_helper');
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Sheet switching tests', function() {
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/calc-zoomed.fods');
- cy.viewport(1920,1080);
- });
-
- /* calc-zoomed.fods opens with the cell selection in the bottom right corner
- * which can be later covered by the sidebar - causing it to be invisible */
-
- it('Check view position on sheet switch', function() {
- // we should be somewhere far from A1
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'CQ1017');
- desktopHelper.assertScrollbarPosition('vertical', 710, 750);
- desktopHelper.assertScrollbarPosition('horizontal', 930, 1050);
-
- // insert sheet
- cy.cGet('#sheets-buttons-toolbox #insertsheet').click();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A1');
-
- // after switch we should see cursor and A1
- desktopHelper.assertScrollbarPosition('vertical', 20, 100);
- desktopHelper.assertScrollbarPosition('horizontal', 40, 90);
- });
-
- it.skip('Check the visibility of tile content when rows are hidden', function() {
- // Insert sheet
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'CQ1017');
- cy.cGet('#sheets-buttons-toolbox #insertsheet').click();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A1');
-
- // Step1: Go to B1 and type something
- helper.typeIntoDocument('{rightArrow}Text');
- cy.wait(500);
- cy.cGet('#map').compareSnapshot('b1_text_step1', 0.1);
-
- // Step2: Hide rows and still see text
- helper.typeIntoDocument('{leftArrow}{downArrow}');
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A2');
- helper.typeIntoDocument('{shift}{ctrl}{rightArrow}');
- helper.typeIntoDocument('{shift}{ctrl}{downArrow}');
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A2:XFD1048576');
- calcHelper.hideSelectedRows();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A1');
- cy.wait(500);
- cy.cGet('#map').compareSnapshot('b1_text_step2', 0.05);
-
- // Step3: type and still see text
- helper.typeIntoDocument('Calc is Cool{enter}');
- cy.wait(500);
- cy.cGet('#map').compareSnapshot('b1_text_step3', 0.05);
- });
-});
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Sheet switching tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/switch.ods');
- });
-
- /* switch.ods has 2 sheets, 1st with data in G45, 2nd with data in F720*/
-
- it('Check view position on sheet switch', function() {
- // go to sheet 1
- cy.cGet('#spreadsheet-tab0').click();
-
- desktopHelper.assertScrollbarPosition('vertical', 35, 45);
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'G45');
-
- // go to sheet 2
- cy.cGet('#spreadsheet-tab1').click();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'F720');
- desktopHelper.assertScrollbarPosition('vertical', 300, 350);
-
- cy.cGet(helper.addressInputSelector).type('{selectAll}A2{enter}');
- desktopHelper.assertScrollbarPosition('vertical', 15, 25);
- });
-
- it('Check view position on repeated selection of currently selected sheet', function() {
- // initially we are on sheet 2 tab
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'F720');
- desktopHelper.assertScrollbarPosition('vertical', 300, 350);
-
- // click on sheet 2 tab (yes, current one)
- cy.cGet('#spreadsheet-tab1').click();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'F720');
- desktopHelper.assertScrollbarPosition('vertical', 320, 380);
-
- // go to different place in the spreadsheet
- cy.cGet(helper.addressInputSelector).type('{selectAll}A2{enter}');
- desktopHelper.assertScrollbarPosition('vertical', 15, 25);
-
- // validate we didn't jump back after some time
- cy.wait(1000);
- desktopHelper.assertScrollbarPosition('vertical', 15, 25);
- });
-
- // TODO: remove if multiple sheet selection feature will be implemented
- it('Check if multiple sheet selection is disabled', function() {
- // go to sheet 1
- cy.cGet('#spreadsheet-tab0').click();
-
- desktopHelper.assertScrollbarPosition('vertical', 35, 45);
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'G45');
- cy.cGet('#spreadsheet-tab0').should('have.class', 'spreadsheet-tab-selected');
- cy.cGet('#spreadsheet-tab1').should('not.have.class', 'spreadsheet-tab-selected');
-
- // try to add sheet 2 to sheets selection
- helper.typeIntoDocument('{ctrl}{shift}{pageDown}');
-
- // we expect no effect
- desktopHelper.assertScrollbarPosition('vertical', 35, 45);
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'G45');
- cy.cGet('#spreadsheet-tab0').should('have.class', 'spreadsheet-tab-selected');
- cy.cGet('#spreadsheet-tab1').should('not.have.class', 'spreadsheet-tab-selected');
- });
-
- // TODO: enable if multiple sheet selection feature will be implemented
- // this tests serious regression we had, so be sure it works properly
- it.skip('Check view position when having multiple sheet selection', function() {
- // go to sheet 1
- cy.cGet('#spreadsheet-tab0').click();
-
- desktopHelper.assertScrollbarPosition('vertical', 35, 45);
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'G45');
- cy.cGet('#spreadsheet-tab0').should('have.class', 'spreadsheet-tab-selected');
- cy.cGet('#spreadsheet-tab1').should('not.have.class', 'spreadsheet-tab-selected');
-
- // add sheet 2 to sheets selection
- helper.typeIntoDocument('{ctrl}{shift}{pageDown}');
-
- desktopHelper.assertScrollbarPosition('vertical', 300, 330);
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'F720');
- cy.cGet('#spreadsheet-tab0').should('have.class', 'spreadsheet-tab-selected');
- cy.cGet('#spreadsheet-tab1').should('have.class', 'spreadsheet-tab-selected');
-
- // try to go to sheet 1 using keyboard shortcut - it is not allowed in the core
- helper.typeIntoDocument('{ctrl}{alt}{pageUp}');
-
- // we still have selected two sheets so we see cell data from sheet 2
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'F720');
-
- // go to sheet 2 using tab
- cy.cGet('#spreadsheet-tab1').click();
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'F720');
-
- // go to different place in the spreadsheet
- cy.cGet(helper.addressInputSelector).type('{selectAll}A2{enter}');
- helper.typeIntoDocument('some text');
-
- // validate we didn't jump back after some time
- cy.wait(1000);
- desktopHelper.assertScrollbarPosition('vertical', 15, 25);
- });
-});
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Test sheet switching with split panes', function() {
-
- it('Check view position on sheet switch', function() {
- helper.setupAndLoadDocument('calc/switch-split.ods');
- // Sheet 1 has split panes
- desktopHelper.assertScrollbarPosition('horizontal', 300, 340);
- // Switch to another sheet with differently sized columns
- cy.cGet('#spreadsheet-tab1').click();
- // Switch back to the split sheet
- cy.cGet('#spreadsheet-tab0').click();
- // The panes positions shouldn't have changed
- desktopHelper.assertScrollbarPosition('horizontal', 300, 340);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/sidebar_dialog_image_caching_spec.js b/cypress_test/integration_tests/desktop/calc/sidebar_dialog_image_caching_spec.js
deleted file mode 100644
index 3fe82bd907007..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/sidebar_dialog_image_caching_spec.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Calc sidebar dialog image caching', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/many-sizes.ods');
- });
-
- it('Sidebar image caching', function() {
-
- // Just go through the cells A1:30. Each cell has a
- // different font size. This will exercise the caching
- // of the tunnelled dialog images for the sidebar.
- // Each cell has a different font size so no image
- // will be found in the cache.
- // The document has the cell cursor at A1 after load.
-
- for (var i = 0; i < 30; i++) {
- helper.typeIntoDocument('{enter}');
- // The non-interactive Cypress test runs very fast, so to
- // be sure that the sidebar actually has time to be rendered
- // and sent to the client sleep a bit between switching cells.
- cy.wait(500);
- }
-
- // Then go up again. Now we should find stuff in the cache.
- for (i = 0; i < 30; i++) {
- helper.typeIntoDocument('{upArrow}');
- cy.wait(500);
- }
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/statusbar_spec.js b/cypress_test/integration_tests/desktop/calc/statusbar_spec.js
deleted file mode 100644
index 3bcb3f0cda4dc..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/statusbar_spec.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/* global describe it cy beforeEach require Cypress */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Statubar tests.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/statusbar.ods');
-
- if (Cypress.env('INTEGRATION') === 'nextcloud') {
- desktopHelper.showStatusBarIfHidden();
- }
-
- desktopHelper.shouldHaveZoomLevel('100');
-
- cy.cGet(helper.addressInputSelector).should('have.value', 'A3');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- helper.processToIdle(this.win);
- });
- });
-
- it('Selected sheet.', function() {
- cy.cGet('#StatusDocPos').should('have.text', 'Sheet 1 of 2');
- cy.cGet('#spreadsheet-tab1').click();
- cy.cGet('#StatusDocPos').should('have.text', 'Sheet 2 of 2');
- cy.cGet('#spreadsheet-tab0').click();
- cy.cGet('#StatusDocPos').should('have.text', 'Sheet 1 of 2');
- });
-
- it('Multiple cell selection.', function() {
- cy.cGet('#RowColSelCount').should('have.text', 'Select multiple cells');
- helper.typeIntoInputField(helper.addressInputSelector, 'A1:A2');
- cy.cGet('#RowColSelCount').should('have.text', 'Selected: 2 rows, 1 column');
- helper.typeIntoInputField(helper.addressInputSelector, 'A1');
- cy.cGet('#RowColSelCount').should('have.text', 'Select multiple cells');
- });
-
- it('Text editing mode.', function() {
- cy.cGet('#InsertMode').should('not.be.visible');
- calcHelper.dblClickOnFirstCell();
- cy.cGet('#InsertMode').should('have.text', 'Insert');
- calcHelper.typeIntoFormulabar('{enter}');
- cy.cGet('#InsertMode').should('not.be.visible');
- });
-
- it('Selected data summary.', function() {
- // Ensure the viewport is large enough to show the whole status bar
- // In Calc #StateTableCellMenu has a high data-priority
- // and will be hidden if the status bar doesn't have enough space
- cy.viewport(1280, 720);
- cy.cGet('#StateTableCell').should('have.text', 'Average: ; Sum: 0');
- helper.typeIntoInputField(helper.addressInputSelector, 'A1:A2');
- cy.cGet('#StateTableCell').should('have.text', 'Average: 15.5; Sum: 31');
- helper.typeIntoInputField(helper.addressInputSelector, 'A1');
- cy.cGet('#StateTableCell').should('have.text', 'Average: 10; Sum: 10');
-
- desktopHelper.makeZoomItemsVisible();
- cy.cGet('#StateTableCellMenu .unolabel').contains('Average; Sum');
- cy.cGet('#StateTableCellMenu .arrowbackground').click();
- cy.cGet('.jsdialog-overlay').should('exist');
- cy.cGet('.ui-combobox-entry.selected').contains(/Average|Sum/g);
- });
-
- it('Change zoom level.', function() {
- desktopHelper.resetZoomLevel();
- desktopHelper.shouldHaveZoomLevel('100');
- desktopHelper.zoomIn();
- desktopHelper.shouldHaveZoomLevel('120');
- desktopHelper.zoomOut();
- desktopHelper.shouldHaveZoomLevel('100');
- });
-
- it('Select zoom level.', function() {
- desktopHelper.resetZoomLevel();
- desktopHelper.shouldHaveZoomLevel('100');
- desktopHelper.selectZoomLevel('280', false);
- desktopHelper.shouldHaveZoomLevel('280');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/calc/top_toolbar_spec.js b/cypress_test/integration_tests/desktop/calc/top_toolbar_spec.js
deleted file mode 100644
index 5e8d3b55f550b..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/top_toolbar_spec.js
+++ /dev/null
@@ -1,288 +0,0 @@
-/* global describe it cy beforeEach require expect */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-var calcHelper = require('../../common/calc_helper');
-
-describe(['tagdesktop'], 'Top toolbar tests.', function() {
- var newFilePath;
-
- beforeEach(function() {
- newFilePath = helper.setupAndLoadDocument('calc/top_toolbar.ods');
- desktopHelper.switchUIToCompact();
- helper.typeIntoInputField(helper.addressInputSelector, 'A1');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- it('Save.', function () {
- desktopHelper.getCompactIcon('Bold').click();
- cy.cGet('#save').click();
-
- helper.reloadDocument(newFilePath);
-
- cy.cGet(helper.addressInputSelector)
- .should('exist');
-
- desktopHelper.switchUIToCompact();
- calcHelper.clickOnFirstCell();
-
- cy.cGet(helper.addressInputSelector)
- .should('exist');
-
- helper.setDummyClipboardForCopy();
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td b').should('exist');
- });
-
- it('Clone Formatting.', function() {
- helper.setDummyClipboardForCopy();
- helper.typeIntoDocument('{downarrow}');
-
- // Apply bold and try to clone it to the whole word.
- desktopHelper.getCompactIcon('Bold').click();
- desktopHelper.getCompactIcon('FormatPaintbrush').click();
-
- calcHelper.clickOnFirstCell(true,false);
-
- helper.typeIntoDocument('{shift}{downarrow}');
- helper.copy();
-
- cy.wait(1000);
-
- cy.cGet('#copy-paste-container tbody').find('td b').each(($el) => {
- cy.wrap($el)
- .should('exist');
- });
- });
-
- it('Print', function() {
- // A new window should be opened with the PDF.
- cy.getFrameWindow()
- .then(function(win) {
- cy.stub(win, 'open').as('windowOpen');
- });
-
- cy.cGet('#toolbar-up #printoptions .arrowbackground').click();
- cy.cGet('body').contains('.ui-combobox-entry', 'Active Sheet').click();
-
- cy.get('@windowOpen').should('be.called');
- });
-
- it('Enable text wrapping.', function() {
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A1');
- // Get cursor position at end of line before wrap
- calcHelper.dblClickOnFirstCell();
- helper.moveCursor('end');
- helper.getCursorPos('left', 'currentTextEndPos');
-
- cy.get('@currentTextEndPos').should('be.greaterThan', 0);
-
- helper.initAliasToNegative('originalTextEndPos');
- cy.get('@currentTextEndPos').then(function(pos) {
- cy.wrap(pos).as('originalTextEndPos');
- });
-
- // Leave cell
- helper.typeIntoDocument('{enter}');
- // Wait for enter to work before clicking on first cell again
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A2');
- helper.processToIdle(this.win);
-
- // Turn text wrap on
- calcHelper.clickOnFirstCell();
- desktopHelper.getCompactIcon('WrapText').click();
-
- // Leave cell
- helper.typeIntoDocument('{enter}');
- // Wait for enter to work before clicking on first cell again
- cy.cGet(helper.addressInputSelector).should('have.prop', 'value', 'A2');
- helper.processToIdle(this.win);
-
- // Get cursor position at end of line after wrap
- calcHelper.dblClickOnFirstCell();
- helper.moveCursor('end');
- helper.getCursorPos('left', 'currentTextEndPos');
-
- cy.get('@currentTextEndPos').then(function(currentTextEndPos) {
- cy.get('@originalTextEndPos').then(function(originalTextEndPos) {
- expect(currentTextEndPos).to.be.lessThan(originalTextEndPos);
- });
- });
- });
-
- it.skip('Merge cells', function() {
-
- // Select the full column
- calcHelper.selectFirstColumn();
-
- // Despite the selection is there, merge cells needs more time here.
- cy.wait(1000);
-
- desktopHelper.getCompactIcon('ToggleMergeCells').click();
-
- desktopHelper.checkDialogAndClose('Merge Cells');
- });
-
- it('Clear Direct formatting.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIcon('Bold').click();
-
- calcHelper.selectEntireSheet();
- helper.copy();
-
- cy.cGet('#copy-paste-container table td b').should('exist');
- desktopHelper.getCompactIcon('ResetAttributes').click();
-
- calcHelper.selectEntireSheet();
- helper.copy();
-
- cy.cGet('#copy-paste-container table td b').should('not.exist');
- });
-
- it('Apply font style.', function() {
- helper.setDummyClipboardForCopy();
- cy.cGet('#toolbar-up #fontnamecombobox .ui-combobox-button').click();
- desktopHelper.selectFromListbox('Alef');
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td font').should('have.attr', 'face', 'Alef');
- });
-
- it('Apply font size.', function() {
- helper.setDummyClipboardForCopy();
- cy.cGet('#toolbar-up #fontsizecombobox .ui-combobox-button').click();
- desktopHelper.selectFromListbox('12');
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td font').should('have.attr', 'size', '3');
- });
-
- it('Apply bold font.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIcon('Bold').click();
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td b').should('exist');
- });
-
- it('Apply underline.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIcon('Underline').click();
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td u').should('exist');
- });
-
- it('Apply italic.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIcon('Italic').click();
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td i').should('exist');
- });
-
- it('Apply strikethrough.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIcon('Strikeout').click();
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td s').should('exist');
- });
-
- it('Apply highlight color.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIconArrow('BackgroundColor').click();
- desktopHelper.selectColorFromPalette('3FAF46');
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'bgcolor', '#3FAF46');
- });
-
- it('Apply font color.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIconArrow('Color').click();
- desktopHelper.selectColorFromPalette('FFB66C');
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td font').should('have.attr', 'color', '#FFB66C');
- });
-
- it('Add/Delete decimal places', function() {
- helper.setDummyClipboardForCopy();
- // Add decimal place
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- desktopHelper.getCompactIcon('NumberFormatIncDecimals').click();
- calcHelper.selectEntireSheet();
- helper.copy();
-
- var regex = new RegExp(';0;0.0$');
- cy.cGet('#copy-paste-container table td')
- .should('have.attr', 'sdnum')
- .should('match', regex);
-
- // Delete Decimal place
- calcHelper.clickOnFirstCell();
-
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- desktopHelper.getCompactIcon('NumberFormatDecDecimals').click();
-
- calcHelper.selectEntireSheet();
- helper.copy();
- regex = new RegExp(';0;0$');
- cy.cGet('#copy-paste-container table td')
- .should('have.attr', 'sdnum')
- .should('match', regex);
- });
-
- it('Format as currency.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- desktopHelper.getCompactIcon('NumberFormatCurrency').click();
-
- calcHelper.selectEntireSheet();
- helper.copy();
-
- var regex = new RegExp(';0;\\[\\$\\$-409]#,##0.00;\\[RED]-\\[\\$\\$-409]#,##0.00$');
- cy.cGet('#copy-paste-container table td')
- .should('have.attr', 'sdnum')
- .should('match', regex);
- });
-
- it('Format as Percent.', function() {
- helper.setDummyClipboardForCopy();
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- desktopHelper.getCompactIcon('NumberFormatPercent').click();
-
- calcHelper.selectEntireSheet();
- helper.copy();
-
- var regex = new RegExp(';0;0.00%$');
- cy.cGet('#copy-paste-container table td')
- .should('have.attr', 'sdnum')
- .should('match', regex);
- });
-
- it('Apply left/right alignment', function() {
- helper.setDummyClipboardForCopy();
- // Set right alignment first
- cy.cGet('#textalign .arrowbackground').click();
- cy.cGet('body').contains('.ui-combobox-entry', 'Align Right').click();
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'align', 'right');
-
- // Change alignment back
- calcHelper.clickOnFirstCell();
-
- cy.cGet('#textalign .arrowbackground').click();
- cy.cGet('body').contains('.ui-combobox-entry', 'Align Left').click();
-
- calcHelper.selectEntireSheet();
- helper.copy();
- cy.cGet('#copy-paste-container table td').should('have.attr', 'align', 'left');
- });
-
-});
diff --git a/cypress_test/integration_tests/desktop/calc/undo_redo_spec.js b/cypress_test/integration_tests/desktop/calc/undo_redo_spec.js
deleted file mode 100644
index b27eddf8dd452..0000000000000
--- a/cypress_test/integration_tests/desktop/calc/undo_redo_spec.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var calcHelper = require('../../common/calc_helper');
-var repairHelper = require('../../common/repair_document_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Editing Operations', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('calc/undo_redo.ods');
- });
-
- function undo() {
- helper.typeIntoDocument('Hello World');
- helper.typeIntoDocument('{ctrl}z');
- helper.selectAllText();
- helper.copy();
- cy.cGet('#copy-paste-container pre').should('not.have.text', 'Hello World');
- }
-
- it('Undo', function() {
- helper.setDummyClipboardForCopy();
- undo();
- });
-
- it('Redo', function() {
- helper.setDummyClipboardForCopy();
- undo();
- helper.typeIntoDocument('{ctrl}y');
- helper.selectAllText();
- helper.copy();
- helper.expectTextForClipboard('Hello World');
- });
-
- it('Repair Document', function() {
- helper.setDummyClipboardForCopy();
- helper.typeIntoDocument('Hello World');
- helper.typeIntoDocument('{enter}');
- calcHelper.dblClickOnFirstCell();
- helper.clearAllText();
- helper.typeIntoDocument('Hello');
- helper.typeIntoDocument('{enter}');
- repairHelper.rollbackPastChange('Undo', /* mobile */ false, /* nb */ true);
- calcHelper.dblClickOnFirstCell();
- helper.selectAllText();
- helper.copy();
- helper.expectTextForClipboard('Hello World');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/draw/esign_spec.js b/cypress_test/integration_tests/desktop/draw/esign_spec.js
deleted file mode 100644
index be45e18183d2e..0000000000000
--- a/cypress_test/integration_tests/desktop/draw/esign_spec.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* global describe it cy expect require */
-
-var helper = require('../../common/helper');
-
-describe(['tagdesktop'], 'Electronic sign operations.', function() {
-
- it('Create an electronic signature.', { env: { 'pdf-view': true } }, function() {
- // Given a document that can be signed:
- helper.setupAndLoadDocument('draw/esign.pdf', /*isMultiUser=*/false, /*copyCertificates=*/true);
-
- let sendHashResult;
- cy.fixture('fixtures/eideasy-send-hash.json').then((result) => {
- sendHashResult = result;
- });
- let getSignatureResult;
- cy.fixture('fixtures/eideasy-get-signature.json').then((result) => {
- getSignatureResult = result;
- });
- cy.getFrameWindow().then(function(win) {
- const sendUnoCommand = cy.stub(win.app.map, 'sendUnoCommand');
- sendUnoCommand.withArgs('.uno:PrepareSignature').as('sendHash').callsFake((commandName, args) => {
- expect(args.body.signature_redirect).to.satisfy(url => url.endsWith('/cool/signature'));
- // File name is like esign-Create-an-electronic-signature--0wvs9.pdf
- expect(args.body.files[0].fileName).to.match(/^esign.*pdf$/i);
- win.app.map.fire('commandresult', {commandName: '.uno:PrepareSignature', success: true, result: sendHashResult});
- });
- sendUnoCommand.withArgs('.uno:DownloadSignature').as('getSignature').callsFake(() => {
- win.app.map.fire('commandresult', {commandName: '.uno:DownloadSignature', success: true, result: getSignatureResult});
- });
- // Call the original sendUnoCommand() for other commands
- sendUnoCommand.callThrough();
- });
- cy.getFrameWindow()
- .then(function(win) {
- cy.stub(win, 'open').as('windowOpen');
- });
-
- // When signing that document:
- // Start signing:
- cy.cGet('#menu-insert').click();
- cy.cGet('#menu-insert-signatureline').click();
- // Finish electronic signing:
- cy.cGet('#snackbar-container #button').click();
- cy.get('@sendHash').should('be.called');
- cy.cGet('#ESignatureDialog #ok.ui-pushbutton-wrapper').click();
- cy.get('@windowOpen').should('be.called');
- const response = {
- type: "SUCCESS",
- };
- cy.window().then(win => {
- const app = win['0'].app;
- const eSignature = app.map.eSignature;
- eSignature.handleSigned(response);
- });
- cy.get('@getSignature').should('be.called');
- // Close the dialog showing the just created signature:
- cy.cGet('#DigitalSignaturesDialog #close.ui-pushbutton-wrapper button').click();
-
- // Then make sure the document now has a (test / "not OK") signature:
- cy.cGet('[id^="signstatus"] div').should('have.class', 'sign_not_ok');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/draw/navigator_spec.js b/cypress_test/integration_tests/desktop/draw/navigator_spec.js
deleted file mode 100644
index 8d713f7952b36..0000000000000
--- a/cypress_test/integration_tests/desktop/draw/navigator_spec.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/* global describe it cy require beforeEach */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe.skip(['tagdesktop'], 'Scroll through document, insert/delete items', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('draw/navigator.odg');
-
- desktopHelper.selectZoomLevel('100');
- cy.cGet('#menu-view').click();
- cy.cGet('#menu-navigator').click();
- });
-
- function checkIfItemNotExist(itemName) {
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', itemName).should('not.exist');
- }
-
- function checkIfItemSelectedAndVisible(itemName) {
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', itemName).should('be.visible');
- cy.cGet('#tree').find('.jsdialog.sidebar.ui-treeview-entry.ui-treeview-notexpandable.selected').find('.jsdialog.sidebar.ui-treeview-cell-text').should('have.text',itemName);
- }
-
- function checkIfItemExSelectedAndVisible(itemName) {
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', itemName).should('be.visible');
- cy.cGet('#tree').find('.jsdialog.sidebar.ui-treeview-entry.ui-treeview-expandable.selected').find('.jsdialog.sidebar.ui-treeview-cell-text').should('have.text',itemName);
- }
-
- it('Jump to element. Navigator -> Document', function() {
- // Click items in navigator, and check if it goes to the right page.
- // items should be visible (scrolled right), but that is not tested yet
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 2 (Text Frame \'Text1\')').dblclick();
- cy.cGet('#PageStatus').should('have.text', 'Page 2 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Object 2').dblclick();
- cy.cGet('#PageStatus').should('have.text', 'Page 4 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 1 (Text Frame \'Title1\')').dblclick();
- cy.cGet('#PageStatus').should('have.text', 'Page 1 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 5 (Image)').dblclick();
- cy.cGet('#PageStatus').should('have.text', 'Page 4 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 4 (Text Frame \'T3\')').dblclick();
- cy.cGet('#PageStatus').should('have.text', 'Page 3 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 1 (SVG)').dblclick();
- cy.cGet('#PageStatus').should('have.text', 'Page 4 of 4');
- });
-
- it('Jump to element. Document -> Navigator', function() {
- // Click some items in document, and check if Navigator will jump to it. (if the items row will be selected, and visible)
- // Risky: it clicks x,y coordinates, if scroll or layout change it may need to be changed
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('body').click(600,360);
- checkIfItemSelectedAndVisible('Shape 6 (Text Frame \'Text3\')');
-
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('body').click(370,270);
- checkIfItemSelectedAndVisible('Shape 1 (SVG)');
-
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('body').click(355,435);
- // T2 is part of a group. The group will be selected in Navigator.
- checkIfItemExSelectedAndVisible('Shape 3 (Group object)');
-
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('body').click(500,520);
- checkIfItemSelectedAndVisible('Object 3');
-
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('body').click(630,330);
- checkIfItemSelectedAndVisible('Shape 2 (Text Frame \'Some text\')');
- });
-
- it('Insert/delete updated on Navigator', function() {
- //create a new page
- cy.cGet('#presentation-toolbar #insertpage').click();
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Page 5').should('exist');
- cy.cGet('#toolbar-up > .ui-scroll-right').click();
-
- //Insert Shape
- cy.cGet('#insertshapes').click();
- cy.cGet('.col.w2ui-icon.symbolshapes').click();
- checkIfItemSelectedAndVisible('Shape 1 (Shape)');
- //delete
- helper.typeIntoDocument('{del}');
- checkIfItemNotExist('Shape 1 (Shape)');
-
- //Insert Chart
- cy.cGet('#insertobjectchart').click();
- checkIfItemSelectedAndVisible('Object 4');
- //delete
- helper.typeIntoDocument('{del}');
- checkIfItemNotExist('Object 4');
-
- //Insert Table
- cy.cGet('#menu-table').click();
- cy.cGet('body').contains('Insert Table...').click();
- cy.cGet('.lokdialog_canvas').click();
- helper.typeIntoDocument('{shift}{enter}');
- checkIfItemSelectedAndVisible('Shape 1 (Table)');
- // Table is inserted with the markers shown
- cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('exist');
- cy.cGet('path.leaflet-interactive').rightclick({force:true});
- cy.cGet('body').contains('.context-menu-item', 'Delete').click();
- checkIfItemNotExist('Shape 1 (Table)');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/draw/pdf_page_up_down_spec.js b/cypress_test/integration_tests/desktop/draw/pdf_page_up_down_spec.js
deleted file mode 100644
index 350986df1f214..0000000000000
--- a/cypress_test/integration_tests/desktop/draw/pdf_page_up_down_spec.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* global describe it cy require beforeEach */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'PDF View Tests', function() {
- var newFilePath;
-
- beforeEach(function() {
- newFilePath = helper.setupAndLoadDocument('draw/pdf_page_up_down.pdf');
- });
-
- it('PDF page down', { env: { 'pdf-view': true } }, function() {
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#preview-frame-part-1 img').should('have.class', 'preview-img-currentpart');
- cy.cGet('#map').type('{pageup}');
- cy.cGet('#map').type('{pageup}');
- cy.cGet('#preview-frame-part-0 img').should('have.class', 'preview-img-currentpart');
-
- // Page down to the end.
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
- cy.cGet('#map').type('{pagedown}');
-
- // We should have auto scrolled to the last page.
- cy.cGet('#preview-frame-part-5').should('be.visible');
- });
-
- it.skip('PDF insert comment', { env: { 'pdf-view': true }, defaultCommandTimeout: 60000 }, function() {
-
- // Insert some comment into the PDF.
- desktopHelper.insertComment();
- cy.cGet('.cool-annotation-content-wrapper').should('exist');
- cy.cGet('#annotation-content-area-1').should('contain','some text0');
-
- // Close to test save. PDFs cannot really be edited,
- // only comments can be inserted, so they are not saved
- // directly, rather save-as is used. This failed because
- // DocBroker expected to get ModifiedStatus=false, which
- // never happens with save-as and so we couldn't unload.
- helper.closeDocument(newFilePath);
-
- // TODO: verify comment still exists
- // helper.reloadDocument(newFilePath);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/draw/sign_spec.js b/cypress_test/integration_tests/desktop/draw/sign_spec.js
deleted file mode 100644
index e3eeab0391106..0000000000000
--- a/cypress_test/integration_tests/desktop/draw/sign_spec.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* global describe it cy require */
-
-var helper = require('../../common/helper');
-
-describe(['tagdesktop'], 'Signature operations.', function() {
-
- it('Create a visual signature.', { env: { 'pdf-view': true } }, function() {
- // Given a document that can be signed:
- helper.setupAndLoadDocument('draw/sign.pdf', /*isMultiUser=*/false, /*copyCertificates=*/true);
-
- cy.wait(1000); // wait for resize after the first tile is received
-
- // When visually signing that document:
- cy.cGet('#menu-insert').click();
- // Insert signature line/shape:
- cy.cGet('#menu-insert-signatureline').click();
- // Click on the only signature, not on the header:
- cy.cGet('#SelectCertificateDialog #signatures .ui-treeview-entry > div:first-child').click();
- cy.cGet('#SelectCertificateDialog #ok.ui-pushbutton-wrapper button').click();
- cy.cGet('#SelectCertificateDialog').should('not.exist');
- // Make sure the signature line has handles, so it can be moved/resized:
- cy.cGet('#test-div-shapeHandlesSection').should('exist');
- // Finish signing:
- cy.cGet('#menu-file').click();
- cy.cGet('#menu-signature').click();
-
- // Then make sure the resulting signature is valid:
- cy.cGet('[id^="signstatus"] div').should('have.class', 'sign_ok');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/annotation_spec.js b/cypress_test/integration_tests/desktop/impress/annotation_spec.js
deleted file mode 100644
index 3d87fde84c017..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/annotation_spec.js
+++ /dev/null
@@ -1,427 +0,0 @@
-/* global describe it cy require beforeEach Cypress */
-
-var desktopHelper = require('../../common/desktop_helper');
-var helper = require('../../common/helper');
-var { addSlide, changeSlide } = require('../../common/impress_helper');
-
-describe(['tagdesktop'], 'Annotation Tests', function() {
-
- beforeEach(function() {
- // Give more horizontal room so that comments do not fall off the right
- // side of the screen, causing scrolling or hidden buttons
- cy.viewport(1500, 600);
- helper.setupAndLoadDocument('impress/comment_switching.odp');
- desktopHelper.switchUIToNotebookbar();
-
- if (Cypress.env('INTEGRATION') === 'nextcloud') {
- desktopHelper.hideSidebar();
- }
-
- desktopHelper.getNbIcon('ModifyPage').click();
- desktopHelper.selectZoomLevel('50', false);
- });
-
- it('Insert', function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('contain','some text');
- });
-
- it('Insert into the second slide.', function() {
- addSlide(1);
- cy.cGet('#SlideStatus').should('contain','Slide 2 of 2');
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('contain','some text');
- });
-
- it('Modify', function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('[id^=annotation-content-area-]').should('contain','some text0');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('[id^=annotation-modify-textarea-]').type(', some other text');
- cy.cGet('[id^=annotation-save-]').click();
- cy.cGet('[id^=annotation-content-area-]').should('contain','some text0, some other text');
- cy.cGet('.annotation-marker').should('be.visible');
- });
-
- it('Remove',function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('contain','some text');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Remove').click();
- cy.cGet('.annotation-marker').should('not.exist');
- });
-
- // Skipping reply tests in Impress since reply functionality is temporarily disabled.
- it.skip('Reply',function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('contain','some text');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Reply').click();
- cy.cGet('[id^=annotation-reply-textarea-]').type('some reply text');
- cy.cGet('[id^=annotation-reply-].button-primary').click();
- cy.cGet('.cool-annotation-content > div').should('include.text','some reply text');
- });
-
- it('Tab Navigation', function() {
- desktopHelper.insertComment(undefined, false);
-
- cy.cGet('.annotation-button-autosaved').should('not.exist');
- cy.cGet('.annotation-button-delete').should('not.exist');
- cy.realPress('Tab');
- cy.cGet('.annotation-button-autosaved').should('not.exist');
- cy.cGet('.annotation-button-delete').should('not.exist');
- cy.cGet('#annotation-cancel-new:focus-visible');
-
- cy.realPress('Tab');
- cy.cGet('#annotation-save-new:focus-visible');
- cy.cGet('.annotation-button-autosaved').should('not.exist');
- cy.cGet('.annotation-button-delete').should('not.exist');
-
- cy.realPress('Tab');
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- });
-
- // This should be removed or updated once Reply is added.
- it('Reply option should not be visible', function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('exist');
- cy.cGet('.cool-annotation-content > div').should('contain', 'some text');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
-
- cy.cGet('.context-menu-list .context-menu-item span').should('not.contain.text', 'Reply');
- });
-});
-
-describe(['tagdesktop'], 'Collapsed Annotation Tests', function() {
- var newFilePath;
-
- beforeEach(function() {
- newFilePath = helper.setupAndLoadDocument('impress/comment_switching.odp');
- desktopHelper.switchUIToNotebookbar();
-
- if (Cypress.env('INTEGRATION') === 'nextcloud') {
- desktopHelper.hideSidebar();
- }
-
- desktopHelper.closeNavigatorSidebar(); // we expand again on very narrow space so avoid it
- desktopHelper.selectZoomLevel('50', false);
- });
-
- it('Insert', function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('contain','some text');
- });
-
- it('Modify', function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('[id^=annotation-content-area-]').should('contain','some text0');
- cy.cGet('.cool-annotation-table .avatar-img').click();
- cy.cGet('.cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('[id^=annotation-modify-textarea-]').type(', some other text');
- cy.cGet('[id^=annotation-save-]').click();
- cy.cGet('[id^=annotation-content-area-]').should('contain','some text0, some other text');
- cy.cGet('.annotation-marker').should('be.visible');
- });
-
- it('Remove',function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('contain','some text');
- cy.cGet('.cool-annotation-table .avatar-img').click();
- cy.cGet('.cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Remove').click();
- cy.cGet('.annotation-marker').should('not.exist');
- });
-
- // Skipping reply tests in Impress since reply functionality is temporarily disabled.
- it.skip('Reply',function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('contain','some text');
- cy.cGet('.cool-annotation-table .avatar-img').click();
- cy.cGet('.cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Reply').click();
- cy.cGet('[id^=annotation-reply-textarea-]').type('some reply text');
- cy.cGet('[id^=annotation-reply-].button-primary').click();
- cy.cGet('.cool-annotation-content > div').should('include.text','some reply text');
- });
-
- it('Autosave Collapse', function() {
- desktopHelper.insertComment(undefined, false);
- cy.cGet('#map').focus();
- helper.typeIntoDocument('{home}');
- cy.cGet('.cool-annotation-info-collapsed').should('have.text','!');
- cy.cGet('.cool-annotation-info-collapsed').should('be.visible');
- cy.cGet('.cool-annotation-img').click();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('[id^=annotation-save-]').click();
- cy.cGet('.cool-annotation-img').click();
- cy.cGet('[id^=annotation-content-area-]').should('have.text','some text0');
- cy.cGet('.annotation-button-autosaved').should('be.not.visible');
- cy.cGet('.annotation-button-delete').should('be.not.visible');
- cy.cGet('.cool-annotation-info-collapsed').should('not.have.text','!');
- cy.cGet('#map').focus();
- cy.cGet('.cool-annotation-info-collapsed').should('be.not.visible');
-
- helper.reloadDocument(newFilePath);
- desktopHelper.closeNavigatorSidebar();
- desktopHelper.getNbIcon('ModifyPage.selected').click();
- cy.cGet('.cool-annotation-img').click();
- cy.cGet('.cool-annotation-content-wrapper').should('exist');
- cy.cGet('[id^=annotation-content-area-]').should('have.text','some text0');
- cy.cGet('.cool-annotation-info-collapsed').should('be.not.visible');
- })
-});
-
-describe(['tagdesktop'], 'Comment Scrolling',function() {
-
- beforeEach(function() {
- cy.viewport(1500, 600);
- helper.setupAndLoadDocument('impress/comment_switching.odp');
- desktopHelper.switchUIToNotebookbar();
- desktopHelper.getNbIcon('ModifyPage').click();
- desktopHelper.selectZoomLevel('50', false);
- });
-
- it('no comment or one comment', function() {
- cy.cGet('.leaflet-control-scroll-down').should('not.exist');
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- });
-
- it.skip('omit slides without comments', function() {
- //scroll up
- desktopHelper.insertComment();
- addSlide(2);
- desktopHelper.insertComment();
- cy.cGet('.leaflet-control-scroll-up').should('be.visible');
- cy.cGet('.leaflet-control-scroll-up').click().wait(300);
- cy.cGet('#SlideStatus').should('contain','Slide 1 of 3');
-
- //scroll down
- cy.cGet('.leaflet-control-scroll-down').should('exist');
- cy.cGet('.leaflet-control-scroll-down').click().wait(1000);
- cy.cGet('#SlideStatus').should('contain','Slide 3 of 3');
- });
-
- it('switch to previous or next slide',function() {
- addSlide(1);
- desktopHelper.insertComment();
- desktopHelper.insertComment();
-
- //scroll up
- addSlide(1);
- cy.cGet('.leaflet-control-scroll-up').should('exist');
- cy.cGet('.leaflet-control-scroll-up').click().wait(300);
- cy.cGet('#SlideStatus').should('contain','Slide 2 of 3');
-
- //scroll down
- changeSlide(1,'previous');
- cy.cGet('.leaflet-control-scroll-down').should('exist');
- cy.cGet('.leaflet-control-scroll-down').click().wait(300);
- cy.cGet('#SlideStatus').should('contain','Slide 2 of 3');
- });
-});
-
-describe(['tagdesktop'], 'Annotation Autosave Tests', function() {
- var newFilePath;
-
- beforeEach(function() {
- cy.viewport(2400, 600);
- newFilePath = helper.setupAndLoadDocument('impress/comment_switching.odp');
- desktopHelper.switchUIToNotebookbar();
-
- // TODO: skip sidebar detection on reload
- // if (Cypress.env('INTEGRATION') === 'nextcloud') {
- // desktopHelper.hideSidebar();
- // }
- // cy.cGet('#options-modify-page').click();
-
- desktopHelper.selectZoomLevel('50', false);
- });
-
- it('Insert autosave', function() {
- desktopHelper.insertComment(undefined, false);
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
- });
-
- it('Insert autosave save', function() {
- desktopHelper.insertComment(undefined, false);
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
- cy.cGet('[id^=annotation-save-]').click();
- cy.cGet('.annotation-button-autosaved').should('be.not.visible');
- cy.cGet('.annotation-button-delete').should('be.not.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.not.visible');
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
- });
-
- it('Insert autosave cancel', function() {
- desktopHelper.insertComment(undefined, false);
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
- cy.cGet('.modify-annotation [id^=annotation-cancel-]').click();
- cy.cGet('.annotation-button-autosaved').should('not.exist');
- cy.cGet('.annotation-button-delete').should('not.exist');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('not.exist');
- cy.cGet('.annotation-marker').should('not.exist');
- cy.cGet('.cool-annotation-content > div').should('not.exist');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.annotation-marker').should('not.exist');
- cy.cGet('.cool-annotation-content > div').should('not.exist');
- });
-
- it('Modify autosave', function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('[id^=annotation-content-area-]').should('have.text','some text0');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('[id^=annotation-modify-textarea-]').type(', some other text');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0, some other text');
- });
-
- it('Modify autosave save', function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('[id^=annotation-content-area-]').should('have.text','some text0');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('[id^=annotation-modify-textarea-]').type(', some other text');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
- cy.cGet('[id^=annotation-save-]').click();
- cy.cGet('[id^=annotation-content-area-]').should('have.text','some text0, some other text');
- cy.cGet('.annotation-marker').should('be.visible');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0, some other text');
- });
-
- it('Modify autosave cancel', function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('[id^=annotation-content-area-]').should('have.text','some text0');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Modify').click();
- cy.cGet('[id^=annotation-modify-textarea-]').type(', some other text');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('.cool-annotation-edit.modify-annotation').should('be.visible');
- cy.cGet('.modify-annotation [id^=annotation-cancel-]').click();
- cy.cGet('[id^=annotation-content-area-]').should('have.text','some text0');
- cy.cGet('.annotation-marker').should('be.visible');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
- });
-
- // Skipping reply tests in Impress since reply functionality is temporarily disabled.
- it.skip('Reply autosave',function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Reply').click();
- cy.cGet('[id^=annotation-reply-textarea-]').type('some reply text');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('[id^=annotation-modify-textarea-]').should('be.visible');
- cy.cGet('[id^=annotation-modify-textarea-]').should('include.text', 'some text0');
- cy.cGet('[id^=annotation-modify-textarea-]').should('include.text', 'some reply text');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation-edit.reply-annotation').should('be.not.visible');
- cy.cGet('.cool-annotation-content > div').should('include.text','some reply text');
- });
-
- it.skip('Reply autosave save',function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Reply').click();
- cy.cGet('[id^=annotation-reply-textarea-]').type('some reply text');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('[id^=annotation-modify-textarea-]').should('be.visible');
- cy.cGet('[id^=annotation-modify-textarea-]').should('include.text', 'some text0');
- cy.cGet('[id^=annotation-modify-textarea-]').should('include.text', 'some reply text');
- cy.cGet('[id^=annotation-save-]').click();
- cy.cGet('.annotation-button-autosaved').should('be.not.visible');
- cy.cGet('.annotation-button-delete').should('be.not.visible');
- cy.cGet('.cool-annotation-edit.reply-annotation').should('be.not.visible');
- cy.cGet('.cool-annotation-content > div').should('include.text','some text0');
- cy.cGet('.cool-annotation-content > div').should('include.text','some reply text');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation-edit.reply-annotation').should('be.not.visible');
- cy.cGet('.cool-annotation-content > div').should('include.text','some reply text');
- });
-
- it.skip('Reply autosave cancel',function() {
- desktopHelper.insertComment();
- cy.cGet('.annotation-marker').should('be.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
- cy.cGet('.cool-annotation-content-wrapper:visible .cool-annotation-menu').click();
- cy.cGet('body').contains('.context-menu-item','Reply').click();
- cy.cGet('[id^=annotation-reply-textarea-]').type('some reply text');
- cy.cGet('#map').focus();
- cy.cGet('.annotation-button-autosaved').should('be.visible');
- cy.cGet('.annotation-button-delete').should('be.visible');
- cy.cGet('[id^=annotation-modify-textarea-]').should('be.visible');
- cy.cGet('[id^=annotation-modify-textarea-]').should('include.text', 'some text0');
- cy.cGet('[id^=annotation-modify-textarea-]').should('include.text', 'some reply text');
- cy.cGet('.modify-annotation [id^=annotation-cancel-]').click();
- cy.cGet('.annotation-button-autosaved').should('be.not.visible');
- cy.cGet('.annotation-button-delete').should('be.not.visible');
- cy.cGet('.cool-annotation-edit.reply-annotation').should('be.not.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
-
- helper.reloadDocument(newFilePath);
- cy.cGet('.cool-annotation-edit.reply-annotation').should('be.not.visible');
- cy.cGet('.cool-annotation-content > div').should('have.text','some text0');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/apply_paragraph_props_text_spec.js b/cypress_test/integration_tests/desktop/impress/apply_paragraph_props_text_spec.js
deleted file mode 100644
index a3272877bfd1a..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/apply_paragraph_props_text_spec.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var impressHelper = require('../../common/impress_helper');
-const desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties on selected shape.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/apply_paragraph_props_text.odp');
- desktopHelper.switchUIToCompact();
-
- cy.cGet('.close-navigation-button').click();
- cy.cGet('#navigator-sidebar').should('not.exist');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- function selectText(win) {
- impressHelper.triggerNewSVGForShapeInTheCenter();
- impressHelper.selectTextOfShape();
- helper.processToIdle(win);
- }
-
- it.skip('Apply horizontal alignment on selected text.', function() {
- selectText();
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '1400');
-
- // Set right alignment
- cy.cGet('#rightpara').click();
- cy.wait(500);
-
- selectText();
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition[x="23583"], #document-container g.Page .TextParagraph .TextPosition[x="23584"]')
- .should('exist');
-
- // Set left alignment
- cy.cGet('#leftpara').click();
- cy.wait(500);
-
- selectText();
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '1400');
-
- // Set centered alignment
- cy.cGet('#centerpara').click();
- cy.wait(500);
-
- selectText();
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition[x="12491"], #document-container g.Page .TextParagraph .TextPosition[x="12492"]')
- .should('exist');
-
- // Set justified alignment
- cy.cGet('#justifypara').click();
- cy.wait(500);
-
- selectText();
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '1400');
- });
-
- it('Apply default bulleting on selected text.', function() {
- selectText(this.win);
-
- // We have no bulleting by default
- cy.cGet('#document-container g.Page .BulletChars')
- .should('not.exist');
-
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
-
- // Apply bulleting
- desktopHelper.getCompactIcon('DefaultBullet').click();
-
- selectText(this.win);
- cy.cGet('#document-container g.Page .BulletChars')
- .should('exist');
- });
-
- it('Apply default numbering on selected text.', function() {
- selectText(this.win);
-
- // We have no numbering by default
- cy.cGet('#document-container g.Page .SVGTextShape tspan[ooo\\:numbering-type]')
- .should('not.exist');
-
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
-
- // Apply numbering
- desktopHelper.getCompactIcon('DefaultNumbering').click();
-
- selectText(this.win);
- cy.cGet('#document-container g.Page .SVGTextShape tspan[ooo\\:numbering-type="number-style"]')
- .should('exist');
- });
-
- // FIXME: fails on 6600 might be related to recent core margin updates
- it.skip('Increase/decrease spacing of selected text.', function() {
- selectText();
- cy.cGet('#document-container g.Page .TextParagraph:nth-of-type(2) tspan')
- .should('have.attr', 'y', '6600');
-
- // Increase spacing
- desktopHelper.getCompactIconArrow('LineSpacing').click();
- cy.cGet('#linespacing-dropdown .ui-combobox-entry').contains('Increase Paragraph Spacing').click();
-
- selectText();
- cy.cGet('#document-container g.Page .TextParagraph:nth-of-type(2) tspan')
- .should('have.attr', 'y', '6700');
-
- // Decrease spacing
- desktopHelper.getCompactIconArrow('LineSpacing').click();
- cy.cGet('#linespacing-dropdown .ui-combobox-entry').contains('Decrease Paragraph Spacing').click();
-
- selectText();
- cy.cGet('#document-container g.Page .TextParagraph:nth-of-type(2) tspan')
- .should('have.attr', 'y', '6600');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/delete_objects_spec.js b/cypress_test/integration_tests/desktop/impress/delete_objects_spec.js
deleted file mode 100644
index 2185fddfba834..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/delete_objects_spec.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/* global describe it cy require beforeEach expect Cypress */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Delete Objects', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/delete_objects.odp');
- desktopHelper.switchUIToCompact();
- });
-
- it('Delete Text', function() {
- helper.setDummyClipboardForCopy();
- cy.cGet('#document-container').dblclick('center');
- cy.cGet('#document-container svg g').should('exist');
- cy.wait(500);
- helper.typeIntoDocument('text');
- helper.selectAllText();
- helper.copy();
- helper.expectTextForClipboard('text');
- helper.typeIntoDocument('{del}');
- helper.typeIntoDocument('{ctrl}a');
- helper.textSelectionShouldNotExist();
- });
-
- it('Delete Text From Second Page', function() {
- // Insert second page.
- cy.cGet('#insertpage-button').click();
-
- // Check / wait for the inserted page.
- cy.cGet('#preview-img-part-1').should('exist');
-
- // Activate the inserted page.
- cy.cGet('#preview-img-part-1').click();
-
- // Click on canvas to activate the document.
- cy.cGet('#document-canvas').click(100, 100);
-
- // Press delete button. If the document is correctly activated, the second page shouldn't be deleted.
- helper.typeIntoDocument('{del}');
-
- /*
- Manually tested the failing case.
- This wait is a little long but it takes more than 3 seconds to remove the preview while testing.
- We are testing if we accidentaly delete the slide or not. To be sure we didn't delete it, we need to wait.
- Or below condition will succeed first, then the page will be deleted = false positive.
- */
- cy.wait(5000);
-
- // Check if the second page still exists.
- cy.cGet('#preview-img-part-1').should('exist');
- });
-
- it('Delete Shapes', function() {
- //insert
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- desktopHelper.getCompactIconArrow('BasicShapes').click();
- cy.cGet('.col.w2ui-icon.symbolshapes').should($el => { expect(Cypress.dom.isDetached($el)).to.eq(false); }).click();
- cy.cGet('#test-div-shapeHandlesSection').should('exist');
-
- //delete
- helper.typeIntoDocument('{del}');
- cy.cGet('#test-div-shapeHandlesSection').should('not.exist');
- });
-
- it('Delete Chart' , function() {
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- //insert
- desktopHelper.getCompactIcon('InsertObjectChart').click();
- cy.cGet('#test-div-shapeHandlesSection').should('exist');
- //delete
- helper.typeIntoDocument('{del}');
- cy.cGet('#test-div-shapeHandlesSection').should('not.exist');
- });
-
- it('Delete Table',function() {
- desktopHelper.selectZoomLevel('50', false);
-
- cy.cGet('#menu-table').click();
- cy.cGet('body').contains('Insert Table...').click();
- cy.cGet('.lokdialog_canvas').click();
-
- helper.typeIntoDocument('{shift}{enter}');
-
- // Table is inserted with the markers shown
- cy.cGet('.table-column-resize-marker').should('exist');
- cy.cGet('#test-div-shapeHandlesSection').then(function(element) {
- const x = element[0].getBoundingClientRect().left;
- const y = element[0].getBoundingClientRect().top;
-
- cy.cGet('body').rightclick(x + 20, y + 20);
- });
-
- cy.cGet('body').contains('.context-menu-item', 'Delete').click();
- cy.cGet('.table-column-resize-marker').should('not.exist');
- });
-
- it('Delete Fontwork', function() {
- cy.cGet('#menu-insert').click();
- cy.cGet('body').contains('a','Fontwork...').click();
- cy.cGet('#ok').click();
- cy.cGet('#test-div-shapeHandlesSection').should('exist');
-
- //delete
- helper.typeIntoDocument('{del}');
-
- cy.cGet('#test-div-shapeHandlesSection').should('not.exist');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/editable_area_spec.js b/cypress_test/integration_tests/desktop/impress/editable_area_spec.js
deleted file mode 100644
index 17187a9e82abd..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/editable_area_spec.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/* global describe expect it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var impressHelper = require('../../common/impress_helper');
-var ceHelper = require('../../common/contenteditable_helper');
-
-function selectTextShape(i) {
- cy.log('Selecting text shape - start.');
- if (typeof i !== 'number' || i <= 0 || i > 2)
- return;
-
- var n = 2;
- var parts = n + 1;
- // Click on the top-center of the slide to select the text shape there
- cy.cGet('#document-container')
- .then(function(items) {
- expect(items).to.have.length(1);
- var XPos = (items[0].getBoundingClientRect().left + items[0].getBoundingClientRect().right) / 2;
- var YPos = i * (items[0].getBoundingClientRect().top + items[0].getBoundingClientRect().bottom) / parts;
- cy.cGet('body').click(XPos, YPos);
- });
-
- cy.cGet('[id^="test-div-shape-handle-"]').should('have.length', 9);
- cy.cGet('#document-container svg g path').should('exist');
- cy.log('Selecting text shape - end.');
-}
-
-describe(['taga11yenabled'], 'Editable area - Basic typing and caret moving', function() {
-
- beforeEach(function () {
- helper.setupAndLoadDocument('impress/two_text_shapes.odp');
- cy.cGet('#optionstoolboxdown .unoModifyPage').click();
- // do not cover shapes with sidebar
- cy.cGet('#sidebar-panel').should('not.be.visible');
- cy.cGet('div.clipboard').as('clipboard');
- });
-
- it.skip('Editing top text shape', function () {
- // select shape and activate editing
- selectTextShape(1);
- impressHelper.dblclickOnSelectedShape();
- // initial position
- ceHelper.checkHTMLContent('');
- ceHelper.checkCaretPosition(0);
- // typing
- ceHelper.type('Hello World');
- ceHelper.checkPlainContent('Hello World');
- ceHelper.checkCaretPosition(11);
- // remove shape selection
- impressHelper.removeShapeSelection();
- ceHelper.checkHTMLContent('');
- // activate editing again
- selectTextShape(1);
- impressHelper.dblclickOnSelectedShape();
- ceHelper.checkPlainContent('Hello World');
- ceHelper.moveCaret('end');
- ceHelper.checkCaretPosition(11);
- impressHelper.removeShapeSelection();
- });
-
- it('Deleting text', function () {
- // select shape and activate editing
- selectTextShape(1);
- impressHelper.dblclickOnSelectedShape();
- // initial position
- ceHelper.checkHTMLContent('');
- ceHelper.checkCaretPosition(0);
- // typing
- ceHelper.type('Hello World');
- ceHelper.checkPlainContent('Hello World');
- ceHelper.checkCaretPosition(11);
- // backspace
- ceHelper.moveCaret('left', '', 4);
- ceHelper.type('{backspace}');
- ceHelper.checkPlainContent('Hello orld');
- ceHelper.checkCaretPosition(6);
- // delete
- ceHelper.moveCaret('left', '', 4);
- ceHelper.type('{del}');
- ceHelper.checkPlainContent('Helo orld');
- ceHelper.checkCaretPosition(2);
- impressHelper.removeShapeSelection();
- });
-
- it.skip('Editing bottom text shape', function () {
- // select shape and activate editing
- selectTextShape(2);
- impressHelper.dblclickOnSelectedShape();
- // initial position
- ceHelper.checkHTMLContent('');
- ceHelper.checkCaretPosition(0);
- // typing
- ceHelper.type('Hello World');
- ceHelper.checkHTMLContent('Hello World');
- ceHelper.checkCaretPosition(11);
- impressHelper.removeShapeSelection();
- // activate editing again
- selectTextShape(2);
- impressHelper.dblclickOnSelectedShape();
- ceHelper.checkPlainContent('Hello World');
- ceHelper.moveCaret('end');
- ceHelper.checkCaretPosition(11);
- // typing paragraph 2
- ceHelper.type('{enter}');
- ceHelper.type('Green red');
- ceHelper.checkPlainContent('Green red');
- impressHelper.removeShapeSelection();
- // activate editing again
- selectTextShape(2);
- impressHelper.dblclickOnSelectedShape();
- // navigating between paragraphs
- ceHelper.checkPlainContent('Green red');
- ceHelper.moveCaret('up');
- ceHelper.checkPlainContent('Hello World');
- impressHelper.removeShapeSelection();
- });
-
- it.skip('Editing both text shapes', function () {
- // select top shape and activate editing
- selectTextShape(1);
- impressHelper.dblclickOnSelectedShape();
- // initial position
- ceHelper.checkHTMLContent('');
- ceHelper.checkCaretPosition(0);
- // typing
- ceHelper.type('Hello World');
- ceHelper.checkPlainContent('Hello World');
- ceHelper.checkCaretPosition(11);
- // select bottom shape and activate editing
- selectTextShape(2);
- ceHelper.checkHTMLContent('');
- impressHelper.dblclickOnSelectedShape();
- // typing
- ceHelper.checkHTMLContent('');
- ceHelper.checkCaretPosition(0);
- ceHelper.type('Green red');
- ceHelper.checkPlainContent('Green red');
- ceHelper.checkCaretPosition(9);
- // select top shape and activate editing
- selectTextShape(1);
- ceHelper.checkHTMLContent('');
- impressHelper.dblclickOnSelectedShape();
- ceHelper.checkPlainContent('Hello World');
- ceHelper.moveCaret('end');
- ceHelper.type(' Yellow');
- ceHelper.checkPlainContent('Hello World Yellow');
- // select bottom shape and activate editing
- selectTextShape(2);
- ceHelper.checkHTMLContent('');
- impressHelper.dblclickOnSelectedShape();
- ceHelper.checkPlainContent('Green red');
- // remove shape selection
- impressHelper.removeShapeSelection();
- ceHelper.checkHTMLContent('');
- });
-
- it('Selection rectangle', function() {
- cy.cGet('#test-div-selection-rectangle').should('exist');
- cy.cGet('#test-div-tiles').should('exist');
-
- // Selection section should overlap with tiles section.
- cy.cGet('#test-div-selection-rectangle').then(function(section1) {
- cy.cGet('#test-div-tiles').then(function(section2) {
- expect(section1[0].style.width).to.be.equal(section2[0].style.width);
- expect(section1[0].style.height).to.be.equal(section2[0].style.height);
- });
- });
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/find_dialog_spec.js b/cypress_test/integration_tests/desktop/impress/find_dialog_spec.js
deleted file mode 100644
index b58286ea8fe61..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/find_dialog_spec.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/* global describe it cy expect beforeEach require */
-
-var helper = require('../../common/helper');
-var findHelper = require('../../common/find_helper');
-
-describe(['tagdesktop'], 'Searching via find dialog' ,function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/search_bar.odp');
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- it('Search existing word.', function() {
- helper.setDummyClipboardForCopy();
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
-
- findHelper.findNext();
- findHelper.closeFindDialog(); // we cant copy the document text while the dialog is still open
- // A shape and some text should be selected
- //cy.get('.transform-handler--rotate')
- // .should('be.not.visible');
-
- helper.textSelectionShouldExist();
-
- helper.copy();
- helper.expectTextForClipboard('a');
- });
-
- it('Search not existing word.', function() {
- cy.cGet('#document-container').dblclick('center');
- helper.selectAllText();
- helper.textSelectionShouldExist();
-
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('q');
- findHelper.findNext();
-
- helper.textSelectionShouldNotExist();
- });
-
- it('Search next / prev instance.', function() {
- helper.setDummyClipboardForCopy();
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
-
- findHelper.findNext();
- findHelper.closeFindDialog();
-
- // A shape and some text should be selected
- //cy.get('.transform-handler--rotate')
- // .should('be.not.visible');
-
- helper.getCursorPos('left', 'cursorOrigLeft');
-
- helper.textSelectionShouldExist();
- helper.copy();
- helper.expectTextForClipboard('a');
-
- // Search next instance
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
- findHelper.findNext();
- findHelper.closeFindDialog();
-
- //cy.get('.transform-handler--rotate')
- // .should('be.not.visible');
-
- helper.textSelectionShouldExist();
- helper.copy();
- helper.expectTextForClipboard('a');
-
- cy.get('@cursorOrigLeft')
- .then(function(cursorOrigLeft) {
- cy.cGet('.blinking-cursor')
- .should(function(cursor) {
- expect(cursor.offset().left).to.be.greaterThan(cursorOrigLeft);
- });
- });
-
- // Search prev instance
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
- findHelper.findPrev();
- findHelper.closeFindDialog();
-
- //cy.get('.transform-handler--rotate')
- // .should('be.not.visible');
-
- helper.textSelectionShouldExist();
- helper.copy();
- helper.expectTextForClipboard('a');
-
- cy.get('@cursorOrigLeft')
- .then(function(cursorOrigLeft) {
- cy.cGet('.blinking-cursor')
- .should(function(cursor) {
- expect(cursor.offset().left).to.be.equal(cursorOrigLeft);
- });
- });
- });
-
- it('Search wrap at the document end.', function() {
- helper.setDummyClipboardForCopy();
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
-
- findHelper.findNext();
- findHelper.closeFindDialog();
-
- // A shape and some text should be selected
- //cy.get('.transform-handler--rotate')
- // .should('be.not.visible');
- helper.textSelectionShouldExist();
- helper.copy();
- helper.expectTextForClipboard('a');
-
- helper.getCursorPos('left', 'cursorOrigLeft');
-
- // Search next instance
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
- findHelper.findNext();
- findHelper.closeFindDialog();
-
- //cy.get('.transform-handler--rotate')
- // .should('be.not.visible');
- helper.textSelectionShouldExist();
- helper.copy();
- helper.expectTextForClipboard('a');
-
- cy.get('@cursorOrigLeft')
- .then(function(cursorOrigLeft) {
- cy.cGet('.blinking-cursor')
- .should(function(cursor) {
- expect(cursor.offset().left).to.be.greaterThan(cursorOrigLeft);
- });
- });
-
- // Search next instance, which is in the beginning of the document.
- findHelper.openFindDialog(this.win);
- findHelper.typeIntoSearchField('a');
- findHelper.findNext();
- findHelper.closeFindDialog();
-
- //cy.get('.transform-handler--rotate')
- // .should('be.not.visible');
- helper.textSelectionShouldExist();
- helper.copy();
- helper.expectTextForClipboard('a');
-
- cy.get('@cursorOrigLeft')
- .then(function(cursorOrigLeft) {
- cy.cGet('.blinking-cursor')
- .should(function(cursor) {
- expect(cursor.offset().left).to.be.equal(cursorOrigLeft);
- });
- });
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/fullscreen_presentation_spec.js b/cypress_test/integration_tests/desktop/impress/fullscreen_presentation_spec.js
deleted file mode 100644
index 7e4adb55e6419..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/fullscreen_presentation_spec.js
+++ /dev/null
@@ -1,256 +0,0 @@
-/* global describe it cy require expect */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe.skip(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Fullscreen Presentation.', function() {
-
- function getSlideShowContent() {
- return cy.cGet().find('.leaflet-slideshow').then(($iframe) =>{
- cy.wrap($iframe.contents());
- });
- }
-
- function before(filePath) {
- helper.setupAndLoadDocument(filePath);
-
- desktopHelper.hideSidebar();
-
- cy.cGet('#menu-slide > a').click();
- cy.cGet('#menu-fullscreen-presentation > a').click();
- }
-
- it('Text fields.', function() {
- before('impress/text_fields.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id1').should('have.class', 'Slide');
-
- getSlideShowContent().find('#tf2 > g > text > tspan > tspan > tspan')
- .should('have.class', 'PlaceholderText')
- .should('contain', '1');
-
- getSlideShowContent().find('#tf6 > g > text > tspan > tspan > tspan')
- .should('have.class', 'PlaceholderText')
- .should('contain', '1');
-
- getSlideShowContent().find('#tf5 > g > text > tspan > tspan > tspan')
- .should('have.class', 'PlaceholderText')
- .should('contain', 'SlideOne');
-
- // go to second slide
- getSlideShowContent().find('#id1').click();
-
- getSlideShowContent().find('#id2').should('have.class', 'Slide');
-
- getSlideShowContent().find('#tf7 > g > text > tspan > tspan > tspan')
- .should('have.class', 'PlaceholderText')
- .should('contain', '2');
-
- getSlideShowContent().find('#tf9 > g > text > tspan > tspan > tspan')
- .should('have.class', 'PlaceholderText')
- .should('contain', '2');
-
- getSlideShowContent().find('#tf8 > g > text > tspan > tspan > tspan')
- .should('have.class', 'PlaceholderText')
- .should('contain', 'SlideHello');
- });
-
- it('Custom background.', function() {
- before('impress/slide-bitmap-background.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id1')
- .should('have.class', 'Slide');
- getSlideShowContent().find('#id1 > g').its('0')
- .should('have.class', 'MasterPageView');
- getSlideShowContent().find('#id1 > g > use')
- .should('have.class', 'Background')
- .should('have.attr', 'href', '#bg-id1');
-
- getSlideShowContent().find('#id1 > .Page > .SlideBackground > .Background')
- .should('have.attr', 'id', 'bg-id1');
- });
-
- it.skip('Leading spaces shorter than a text line.', function() {
- before('impress/white-spaces.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id8 > .SVGTextShape > .TextParagraph > .TextPosition')
- .as('textLines')
- .should('contain', '2');
-
- getSlideShowContent().get('@textLines').eq(0).find('tspan').first()
- .should('have.text', ' ')
- .then((spaces) => {
- const spacesLength = spaces.prop('textLength').baseVal.valueAsString;
- getSlideShowContent().get('@textLines').eq(1).find('tspan').first()
- .should('have.text', '1234')
- .then((template) => {
- const templateLength = template.prop('textLength').baseVal.valueAsString;
- expect(spacesLength).to.eq(templateLength);
- });
- });
- });
-
- it('Leading spaces as long as a text line.', function() {
- before('impress/white-spaces.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id10 > .SVGTextShape > .TextParagraph > .TextPosition')
- .as('textLines')
- .should('contain', '2');
-
- getSlideShowContent().get('@textLines').eq(0).find('tspan').first()
- .then((spaces) => {
- expect(spaces).to.have.prop('textContent').match(/ +/);
- const spacesLength = spaces.prop('textLength').baseVal.value;
- getSlideShowContent().get('@textLines').eq(1).find('tspan').first()
- .should('have.text', '1234567890')
- .then((template) => {
- const templateLength = template.prop('textLength').baseVal.value;
- expect(spacesLength).to.be.gte(templateLength);
- const textX = parseFloat(this.textLines[1].getAttribute('x'));
- expect(template.get(0).getBBox().x).to.be.closeTo(textX, 0.001);
- });
- });
- });
-
- it('Leading spaces longer than a text line.', function() {
- before('impress/white-spaces.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id12 > .SVGTextShape > .TextParagraph > .TextPosition')
- .as('textLines')
- .should('contain', '3');
-
- getSlideShowContent().get('@textLines').eq(1).find('tspan').first()
- .should('have.text', ' ')
- .then((spaces) => {
- const spacesLength = spaces.prop('textLength').baseVal.valueAsString;
- getSlideShowContent().get('@textLines').eq(2).find('tspan').first()
- .should('have.text', '1234')
- .then((template) => {
- const templateLength = template.prop('textLength').baseVal.valueAsString;
- expect(spacesLength).to.eq(templateLength);
- });
- });
- });
-
- it('Internal spaces up to the end of the line.', function() {
- before('impress/white-spaces.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id14 > .SVGTextShape > .TextParagraph > .TextPosition')
- .as('textLines')
- .should('contain', '2');
-
- getSlideShowContent().get('@textLines').eq(0).find('tspan').first()
- .then((spaces) => {
- expect(spaces).to.have.prop('textContent').match(/1 +/);
- getSlideShowContent().get('@textLines').eq(1).find('tspan').first()
- .should('have.text', '1234567890')
- .then((template) => {
- const textX = parseFloat(this.textLines[1].getAttribute('x'));
- expect(template.get(0).getBBox().x).to.be.closeTo(textX, 0.001);
- });
- });
- });
-
- it('Internal spaces crossing two lines.', function() {
- before('impress/white-spaces.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id16 > .SVGTextShape > .TextParagraph > .TextPosition')
- .as('textLines')
- .should('contain', '3');
-
- getSlideShowContent().get('@textLines').eq(1).find('tspan').first()
- .should('have.text', ' 567890')
- .then((spaces) => {
- const spacesLength = spaces.prop('textLength').baseVal.valueAsString;
- getSlideShowContent().get('@textLines').eq(2).find('tspan').first()
- .should('have.text', '1234567890')
- .then((template) => {
- const templateLength = template.prop('textLength').baseVal.valueAsString;
- expect(spacesLength).to.eq(templateLength);
- });
- });
- });
-
- it('Animation: Emphasis: Spin.', function() {
- before('impress/anim-spin.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id1')
- .should('have.class', 'Slide');
- getSlideShowContent().find('#id1 > g').its('1')
- .should('have.class', 'Page');
- getSlideShowContent().find('#id3')
- .then((shape) => {
- const matrix = shape.prop('transform').baseVal.getItem(0).matrix;
- expect(matrix.a).to.eq(1);
- expect(matrix.b).to.eq(0);
- expect(matrix.c).to.eq(0);
- expect(matrix.d).to.eq(1);
- expect(matrix.e).to.eq(0);
- expect(matrix.f).to.eq(0);
- })
- .click();
-
- cy.wait(3000);
- getSlideShowContent().find('#id3')
- .then((shape) => {
- const matrix = shape.prop('transform').baseVal.getItem(0).matrix;
- expect(Math.round(matrix.a)).to.eq(0);
- expect(matrix.b).to.eq(1);
- expect(matrix.c).to.eq(-1);
- expect(Math.round(matrix.d)).to.eq(0);
- expect(matrix.e).to.eq(22501);
- expect(matrix.f).to.eq(-5500);
- });
- });
-
- it.skip('Animation: Emphasis: Grow and Shrink.', function() {
- before('impress/anim-grow-and-shrink.odp');
-
- cy.wait(3000);
-
- getSlideShowContent().find('#id1')
- .should('have.class', 'Slide');
- getSlideShowContent().find('#id1 > g').its('1')
- .should('have.class', 'Page');
- getSlideShowContent().find('#id3')
- .then((shape) => {
- const matrix = shape.prop('transform').baseVal.getItem(0).matrix;
- expect(matrix.a).to.eq(1);
- expect(matrix.b).to.eq(0);
- expect(matrix.c).to.eq(0);
- expect(matrix.d).to.eq(1);
- expect(matrix.e).to.eq(0);
- expect(matrix.f).to.eq(0);
- })
- .click();
-
- cy.wait(3000);
- getSlideShowContent().find('#id3')
- .then((shape) => {
- const matrix = shape.prop('transform').baseVal.getItem(0).matrix;
- expect(matrix.a).to.eq(2.5);
- expect(matrix.b).to.eq(0);
- expect(matrix.c).to.eq(0);
- expect(matrix.d).to.eq(2.5);
- expect(matrix.e).to.eq(-21000.75);
- expect(matrix.f).to.eq(-12750.75);
- });
- });
-
-});
diff --git a/cypress_test/integration_tests/desktop/impress/image_operation_spec.js b/cypress_test/integration_tests/desktop/impress/image_operation_spec.js
deleted file mode 100644
index 36ed1c8876400..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/image_operation_spec.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/* global describe it require cy beforeEach */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-var { triggerNewSVGForShapeInTheCenter } = require('../../common/impress_helper');
-
-describe(['tagdesktop'], 'Image Operation Tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/image_operation.odp');
- desktopHelper.switchUIToNotebookbar();
- cy.viewport(1920,1080);
- });
-
- it('Insert/Delete image',function() {
- desktopHelper.insertImage();
-
- //make sure that image is in focus
- cy.cGet('#document-container svg g')
- .should('exist');
-
- desktopHelper.deleteImage();
- });
-
- it("Insert multimedia", function () {
- desktopHelper.insertVideo();
- });
-
- it.skip('Crop Image', function () {
- desktopHelper.insertImage();
- helper.assertImageSize(438, 111);
-
- cy.cGet('#Crop').should('be.visible');
- cy.cGet('#Crop').click();
-
- cy.cGet('#test-div-shape-handle-3').then(($handle) => {
- const rect = $handle[0].getBoundingClientRect();
- const startX = rect.left + rect.width / 2;
- const startY = rect.top + rect.height / 2;
- const moveX = 20;
-
- cy.cGet('body').realMouseDown({ x: startX, y: startY });
- cy.cGet('body').realMouseMove(startX + moveX, startY);
- cy.cGet('body').realMouseUp();
- });
-
- cy.wait(1000);
-
- cy.cGet('#canvas-container > svg').should('exist');
- cy.cGet('#test-div-shape-handle-3').should('exist');
- helper.assertImageSize(418, 111);
- });
-
-
- it('Resize image when keep ratio option enabled and disabled', function() {
- cy.cGet('#optionstoolboxdown .unoModifyPage button').click();
- cy.cGet('#sidebar-panel').should('not.be.visible');
-
- desktopHelper.insertImage();
- //when Keep ratio is unchecked
- helper.assertImageSize(438, 111);
- cy.viewport(1000,660);
-
- cy.cGet('#optionstoolboxdown .unoModifyPage button').click();
- cy.cGet('#sidebar-panel').should('be.visible');
-
- //sidebar needs more time
- cy.cGet('#sidebar-dock-wrapper').should('be.visible').wait(2000).scrollTo('bottom');
-
- cy.cGet('.ui-expander-label').contains('Position and Size').should('be.visible').click();
-
- cy.cGet('#selectwidth input').type('{selectAll}{backspace}10{enter}');
-
- cy.cGet('#selectheight input').type('{selectAll}{backspace}4{enter}');
-
- triggerNewSVGForShapeInTheCenter();
-
- helper.assertImageSize(463, 185);
-
- //Keep ratio checked
- //sidebar needs more time
- cy.cGet('#sidebar-dock-wrapper').should('be.visible').wait(2000).scrollTo('bottom');
-
- cy.cGet('.ui-expander-label').contains('Position and Size').should('be.visible').click();
-
- cy.cGet('#ratio input').check();
-
- cy.cGet('#selectheight input').type('{selectAll}{backspace}5{enter}');
-
- triggerNewSVGForShapeInTheCenter();
-
- helper.assertImageSize(579, 232);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/jsdialog_spec.js b/cypress_test/integration_tests/desktop/impress/jsdialog_spec.js
deleted file mode 100644
index 49fcfbb4283c1..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/jsdialog_spec.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* global describe it cy require beforeEach */
-
-var helper = require('../../common/helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'JSDialog Tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/jsdialog.odp');
- });
-
- // fails on Panel6
- it.skip('Check disabled state in animation sidebar', function() {
- // open animation deck
- cy.cGet('#options-custom-animation-button').should('not.have.class', 'selected');
- cy.cGet('#options-custom-animation-button').click();
- cy.cGet('#options-custom-animation-button').should('have.class', 'selected');
-
- cy.cGet('#Panel6').should('be.visible');
-
- // all options are disabled
- cy.cGet('#start_effect_list-input').should('be.disabled');
- cy.cGet('#combo-input').should('be.disabled');
- cy.cGet('#anim_duration-input').should('be.disabled');
- cy.cGet('#delay_value-input').should('be.disabled');
-
- // select animation entry
- cy.cGet('#categorylb-input').should('be.disabled');
-
- cy.cGet('#custom_animation_list')
- .contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 1').click();
-
- cy.cGet('#categorylb-input').should('not.be.disabled');
-
- cy.wait(1000);
-
- // some options are enabled
- cy.cGet('#start_effect_list-input').should('not.be.disabled');
- cy.cGet('#combo-input').should('not.be.visible');
- cy.cGet('#anim_duration-input').should('not.be.disabled');
- cy.cGet('#delay_value-input').should('not.be.disabled');
-
- // use different type of animation
- cy.cGet('#categorylb-input').should('be.visible').select('Entrance');
- cy.cGet('#effect_list').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Fly In').click();
-
- // all options are enabled
- cy.cGet('#start_effect_list-input').should('not.be.disabled');
- cy.cGet('#combo-input').should('not.be.disabled');
- cy.cGet('#anim_duration-input').should('not.be.disabled');
- cy.cGet('#delay_value-input').should('not.be.disabled');
- });
-});
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Master Page Preview', function() {
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/masterpagepreview.odp');
- });
-
- it('To - from master page switch should update previews.', function() {
- cy.cGet('#masterslidebutton').click();
- cy.wait(500);
- cy.cGet('#preview-img-part-0').compareSnapshot('master_page_preview_0', 0.25);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/navigator_spec.js b/cypress_test/integration_tests/desktop/impress/navigator_spec.js
deleted file mode 100644
index ec69d94f47f9a..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/navigator_spec.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe.skip(['tagdesktop'], 'Scroll through document, insert/delete items', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/navigator.odp');
-
- desktopHelper.selectZoomLevel('100');
- cy.cGet('#menu-view').click();
- cy.cGet('#menu-navigator').click();
- });
-
- function checkIfItemNotExist(itemName) {
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', itemName).should('not.exist');
- }
-
- function checkIfItemSelectedAndVisible(itemName) {
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', itemName).should('be.visible');
- cy.cGet('#tree').find('.jsdialog.sidebar.ui-treeview-entry.ui-treeview-notexpandable.selected').find('.jsdialog.sidebar.ui-treeview-cell-text').should('have.text',itemName);
- }
-
- function checkIfItemExSelectedAndVisible(itemName) {
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', itemName).should('be.visible');
- cy.cGet('#tree').find('.jsdialog.sidebar.ui-treeview-entry.ui-treeview-expandable.selected').find('.jsdialog.sidebar.ui-treeview-cell-text').should('have.text',itemName);
- }
-
- it('Jump to element. Navigator -> Document', function() {
- // Click items in navigator, and check if it goes to the right slide.
- // items should be visible (scrolled right), but that is not tested yet
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 2 (Text Frame \'Text1\')').dblclick();
- cy.cGet('#SlideStatus').should('have.text', 'Slide 2 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Object 2').dblclick();
- cy.cGet('#SlideStatus').should('have.text', 'Slide 4 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 1 (Title text \'Title1\')').dblclick();
- cy.cGet('#SlideStatus').should('have.text', 'Slide 1 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 5 (Image)').dblclick();
- cy.cGet('#SlideStatus').should('have.text', 'Slide 4 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 4 (Text Frame \'T3\')').dblclick();
- cy.cGet('#SlideStatus').should('have.text', 'Slide 3 of 4');
-
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Shape 1 (SVG)').dblclick();
- cy.cGet('#SlideStatus').should('have.text', 'Slide 4 of 4');
- });
-
- it('Jump to element. Document -> Navigator', function() {
- // Click some items in document, and check if Navigator will jump to it
- // Risky: it clicks x,y coordinates, if scroll or layout change it may need to be changed
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('body').click(600,360);
- checkIfItemSelectedAndVisible('Shape 6 (Text Frame \'Text3\')');
-
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('body').click(370,270);
- checkIfItemSelectedAndVisible('Shape 1 (SVG)');
-
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('body').click(355,435);
- // T2 is part of a group. The group will be selected in Navigator.
- checkIfItemExSelectedAndVisible('Shape 3 (Group object)');
-
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('body').click(500,520); //Object 3
- checkIfItemSelectedAndVisible('Object 3');
-
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('body').click(630,330); //Some text
- checkIfItemSelectedAndVisible('Shape 2 (Text Frame \'Some text\')');
- });
-
- it('Insert/delete updated on Navigator', function() {
- //create a new sheet
- cy.cGet('#presentation-toolbar #insertpage').click();
- cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Slide 5').should('exist');
- cy.cGet('#toolbar-up > .ui-scroll-right').click();
-
- //Insert Shape
- cy.cGet('#insertshapes').click();
- cy.cGet('.col.w2ui-icon.symbolshapes').click();
- checkIfItemSelectedAndVisible('Shape 3 (Shape)');
- //delete
- helper.typeIntoDocument('{del}');
- checkIfItemNotExist('Shape 3 (Shape)');
-
- //Insert Chart
- cy.cGet('#insertobjectchart').click();
- checkIfItemSelectedAndVisible('Object 4');
- //delete
- helper.typeIntoDocument('{del}');
- checkIfItemNotExist('Object 4');
-
- //Insert Table
- cy.cGet('#menu-table').click();
- cy.cGet('body').contains('Insert Table...').click();
- cy.cGet('.lokdialog_canvas').click();
- helper.typeIntoDocument('{shift}{enter}');
- checkIfItemSelectedAndVisible('Shape 2 (Table)');
- // Table is inserted with the markers shown
- cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('exist');
- cy.cGet('path.leaflet-interactive').rightclick({force:true});
- cy.cGet('body').contains('.context-menu-item', 'Delete').click();
- checkIfItemNotExist('Shape 2 (Table)');
-
- //Insert Fontwork
- cy.cGet('#menu-insert').click();
- cy.cGet('body').contains('a','Fontwork...').click();
- cy.cGet('#ok').click();
- checkIfItemSelectedAndVisible('Simple');
- //delete
- helper.typeIntoDocument('{del}');
- checkIfItemNotExist('Simple');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/notebookbar_spec.js b/cypress_test/integration_tests/desktop/impress/notebookbar_spec.js
deleted file mode 100644
index 7d2df10e3f3a6..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/notebookbar_spec.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop'], 'Notebookbar tests', function() {
- var newFilePath;
-
- beforeEach(function() {
- newFilePath = helper.setupAndLoadDocument('impress/statusbar.odp');
- desktopHelper.switchUIToNotebookbar();
- });
-
- it('Ruler visible after reload', function() {
- // Visible check and enable if needed
- cy.cGet('#View-tab-label').click();
-
- cy.cGet('#showruler-input').then(($input) => {
- if (!$input.is(':checked')) {
- cy.wrap($input).check();
- }
- });
-
- // Verify ruler is visible
- cy.cGet('#showruler-input').should('be.checked');
- cy.cGet('.cool-ruler').should('be.visible');
-
- // Reload
- helper.reloadDocument(newFilePath);
-
- // Verify ruler is still visible
- cy.cGet('.cool-ruler').should('be.visible');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/open_different_file_types_spec.js b/cypress_test/integration_tests/desktop/impress/open_different_file_types_spec.js
deleted file mode 100644
index 915c9bfd5957c..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/open_different_file_types_spec.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/* global describe it cy require expect */
-var helper = require('../../common/helper');
-const { selectZoomLevel } = require('../../common/desktop_helper');
-var desktopHelper = require('../../common/desktop_helper');
-// const { selectTextShapeInTheCenter } = require('../../common/impress_helper');
-
-describe.skip(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Open different file types', function() {
-
- function before(filePath) {
- helper.setupAndLoadDocument(filePath);
-
- selectZoomLevel('50');
-
- cy.cGet('#modifypage').click();
- }
-
- function assertData() {
- //select all the content of doc
- helper.typeIntoDocument('{ctrl}{a}');
-
- //assert image and size
- cy.cGet('.leaflet-overlay-pane g.Graphic image').should('exist')
- .then($ele => {
- const width = parseInt($ele.attr('width'));
- const height = parseInt($ele.attr('height'));
- expect(width).to.be.closeTo(18969, 10);
- expect(height).to.be.closeTo(7397, 10);
- });
-
- var selector = '#document-container g.Page';
-
- cy.cGet(selector + ' g')
- .should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of table cells
- cy.cGet(selector + ' path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(6);
- });
-
- //assert text properties
- cy.cGet(selector + ' g')
- .should('have.class', 'com.sun.star.drawing.CustomShape');
-
- cy.cGet(selector + ' .TextParagraph')
- .should('have.attr', 'font-family', 'Calibri, sans-serif');
-
- cy.cGet(selector + ' .TextParagraph')
- .should('have.attr', 'font-size', '1552px');
-
- cy.cGet(selector + ' .TextParagraph .TextPosition tspan')
- .should('have.text', 'LibreOffice');
- }
-
- it('Open pptx file', { defaultCommandTimeout: 60000 }, function() {
- before('impress/testfile.pptx');
-
- assertData();
- });
-
- it('Open ppt file', { defaultCommandTimeout: 60000 }, function() {
- before('impress/testfile.ppt');
-
- assertData();
- });
-
- it('Open pptm file', { defaultCommandTimeout: 60000 }, function() {
- before('impress/testfile.pptm');
-
- assertData();
- });
-
- it('Open pot file', { defaultCommandTimeout: 60000 }, function() {
- desktopHelper.openReadOnlyFile('impress/testfile.pot');
- });
-
- it('Open potx file', { defaultCommandTimeout: 60000 }, function() {
- desktopHelper.openReadOnlyFile('impress/testfile.potx');
- });
-
- it('Open potm file', { defaultCommandTimeout: 60000 }, function() {
- desktopHelper.openReadOnlyFile('impress/testfile.potm');
- });
-
- it('Open fodp file', { defaultCommandTimeout: 60000 }, function() {
- before('impress/testfile.fodp');
-
- assertData();
- });
-
- it('Open ppsx file', { defaultCommandTimeout: 60000 }, function() {
- before('impress/testfile.ppsx');
-
- assertData();
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/presenter_console_spec.js b/cypress_test/integration_tests/desktop/impress/presenter_console_spec.js
deleted file mode 100644
index b0c03621e1681..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/presenter_console_spec.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-
-/* global describe it cy require beforeEach expect */
-
-var helper = require('../../common/helper');
-
-describe(['tagdesktop'], 'Presenter Console.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/slide-bitmap-background.odp');
- });
-
- it('Presenter Console class', function() {
- cy.getFrameWindow().then(function(win) {
- var elem;
- var fakeMap = win.L.Evented.extend({
- getPreview: function() {
- return {width: 50, height: 50};
- }
- });
-
- var map = new fakeMap();
-
- class FakeWindowProxy {
- addEventListener() {}
- close() {}
- }
-
- class FakeCompositor {
- computeLayerResolution(width, height) {
- return [width, height];
- }
- computeLayerSize(width, height) {
- return [width, height];
- }
- };
-
- class FakePresenter {
- constructor() {
- this._slideCompositor = new FakeCompositor();
- // fake window
- this._slideShowWindowProxy = new FakeWindowProxy();
- }
-
- _getSlidesCount() {
- return 2;
- }
-
- getVisibleSlidesCount() {
- this._getSlidesCount();
- }
-
- _getRepeatDuration() {
- return 0;
- }
-
- isSlideHidden() {
- return false;
- }
-
- getNextVisibleSlide(slideNumber) {
- return slideNumber + 1;
- }
-
- getNotes() {
- return "test notes";
- }
-
- slideshowWindowCleanUp() {
- // empty body
- }
-
- endPresentation() {
-
- }
- }
-
- var fakePresenter = new FakePresenter();
- var fakeConsole = new win.SlideShow.PresenterConsole(map, fakePresenter);
-
- // create popup window
- map.fire('newpresentinconsole');
-
- expect(fakeConsole._proxyPresenter).to.not.equal(null);
-
- // start presentation
- map.fire('presentationinfo');
-
- expect(fakeConsole._previews).to.have.lengthOf(2);
-
- {
- // create a frame image
- var width = 50;
- var height = 50;
- const offscreen = new OffscreenCanvas(width, height);
- const ctx = offscreen.getContext('2d');
- ctx.fillStyle = 'blue';
- ctx.fillRect(0, 0, width, height);
-
- map.fire('newslideshowframe', { frame: offscreen.transferToImageBitmap() });
-
- elem = fakeConsole._proxyPresenter.document.querySelector('#current-presentation');
- expect(elem).to.not.equal(null);
- expect(elem).to.not.equal(undefined);
- }
-
- map.fire('transitionend', { slide: 0 });
-
- elem = fakeConsole._proxyPresenter.document.querySelector('#next-presentation');
- expect(elem).to.not.equal(null);
- expect(elem).to.not.equal(undefined);
-
- elem = fakeConsole._proxyPresenter.document.querySelector('#notes');
- expect(elem).to.not.equal(null);
- expect(elem).to.not.equal(undefined);
-
- var smile = win.document.querySelector('meta[name="previewSmile"]').content;
- map.fire('tilepreview', {
- id : '2000',
- part : 1,
- tile: { src: smile }
- });
-
- expect(fakeConsole._previews[1]).to.equal(smile);
-
- fakeConsole._proxyPresenter.close();
- });
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/scrolling_spec.js b/cypress_test/integration_tests/desktop/impress/scrolling_spec.js
deleted file mode 100644
index 7e8b020e2e2cb..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/scrolling_spec.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* global describe it cy beforeEach require expect */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Scroll through document', function() {
-
- beforeEach(function() {
- cy.viewport(1500, 600);
- helper.setupAndLoadDocument('impress/scrolling.odp');
- desktopHelper.switchUIToCompact();
- // close the default slide-sorter navigation sidebar
- desktopHelper.closeNavigatorSidebar();
- desktopHelper.getCompactIcon('ModifyPage').click();
- desktopHelper.selectZoomLevel('200', false);
- });
-
- function clickOnTheCenter() {
- cy.cGet('#document-container')
- .then(function(items) {
- expect(items).to.have.length(1);
- var XPos = (items[0].getBoundingClientRect().left + items[0].getBoundingClientRect().right) / 2;
- var YPos = (items[0].getBoundingClientRect().top + items[0].getBoundingClientRect().bottom) / 2;
- cy.cGet('body')
- .dblclick(XPos, YPos)
- .wait(500);
- });
- }
- it('Scrolling to bottom/top', function() {
- //show vertical scrollbar
- cy.cGet('#document-container').click('right');
- cy.wait(1000);
- clickOnTheCenter();
- desktopHelper.pressKey(15,'uparrow');
- desktopHelper.assertScrollbarPosition('vertical', 0, 10);
- desktopHelper.pressKey(18,'downarrow');
- desktopHelper.assertScrollbarPosition('vertical', 280, 330);
- });
-
- it('Scrolling to left/right', function() {
- //show horizontal scrollbar
- cy.cGet('#document-container').click('bottom');
- cy.wait(500);
- clickOnTheCenter();
- cy.wait(500);
- helper.typeIntoDocument('{home}');
- desktopHelper.assertScrollbarPosition('horizontal', 0, 1);
- helper.typeIntoDocument('{end}');
- desktopHelper.assertScrollbarPosition('horizontal', 340, 660);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/sidebar_spec.js b/cypress_test/integration_tests/desktop/impress/sidebar_spec.js
deleted file mode 100644
index 674c4ee7b9b33..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/sidebar_spec.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* global describe it cy require beforeEach */
-
-var helper = require('../../common/helper');
-var impressHelper = require('../../common/impress_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Sidebar Tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/sidebar.odp');
- });
-
- it('Set gradient background color', function() {
- cy.cGet('#fillattr2').should('not.be.visible');
-
- cy.cGet('#fillstyle select').select('Gradient');
- cy.cGet('#fillattr2').should('be.visible');
- cy.cGet('#fillattr3').should('be.visible');
- cy.cGet('#fillattr2').click();
- cy.cGet('.modalpopup .jsdialog-container').should('be.visible');
- cy.cGet('#colorwindow_iv_colors.ui-iconview').should('be.visible');
- });
-
- it.skip('Set underline using popup', function() {
- cy.cGet('#layoutvalueset').should('be.visible');
- impressHelper.selectTextShapeInTheCenter();
- impressHelper.selectTextOfShape();
- cy.cGet('#layoutvalueset').should('not.be.visible');
- cy.cGet('#Underline .arrowbackground').click();
- cy.cGet('.modalpopup .jsdialog-container').should('be.visible');
- cy.cGet('#single').click();
- impressHelper.triggerNewSVGForShapeInTheCenter();
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition tspan')
- .should('have.attr', 'text-decoration', 'underline');
- });
-
- it('Sidebar menubutton visual test', function() {
- cy.cGet('#fillstyle select').select('Color');
- cy.cGet('#fillattr').should('be.visible');
- cy.cGet('#fillattr').compareSnapshot('sidebar_menubutton_color', 0.1);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/slide_navigation_spec.js b/cypress_test/integration_tests/desktop/impress/slide_navigation_spec.js
deleted file mode 100644
index ac9247b1027a4..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/slide_navigation_spec.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-/* global describe it cy require beforeEach*/
-
-var helper = require('../../common/helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Slide Navigation', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/slide_navigation.odp');
- });
-
- it('Arrow navigation', function() {
- cy.cGet('#preview-img-part-0').click();
-
- cy.cGet('#preview-img-part-0').type('{downarrow}');
- cy.wait(500);
- helper.assertFocus('id', 'preview-img-part-1');
-
- cy.cGet('#preview-img-part-1').type('{downarrow}');
- cy.wait(500);
- helper.assertFocus('id', 'preview-img-part-2');
- cy.cGet('#preview-img-part-2').should('have.class', 'preview-img-currentpart');
-
- cy.cGet('#preview-img-part-2').type('{uparrow}');
- cy.wait(500);
- helper.assertFocus('id', 'preview-img-part-1');
-
- cy.cGet('#preview-img-part-1').type('{uparrow}');
- cy.wait(500);
- helper.assertFocus('id', 'preview-img-part-0');
- cy.cGet('#preview-img-part-0').should('have.class', 'preview-img-currentpart');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/slide_operations_spec.js b/cypress_test/integration_tests/desktop/impress/slide_operations_spec.js
deleted file mode 100644
index a8b3ae64b908d..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/slide_operations_spec.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- js-indent-level: 8 -*- */
-/* global describe it cy require expect beforeEach*/
-
-var helper = require('../../common/helper');
-var impressHelper = require('../../common/impress_helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Slide operations', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/slide_operations.odp');
- desktopHelper.switchUIToNotebookbar();
- cy.getFrameWindow().then((win) => {
- this.win = win;
- });
- });
-
- it('Add slides', function() {
- cy.cGet('#presentation-toolbar #insertpage').click();
-
- impressHelper.assertSlidePreviewCountAfterIdle(this.win, 2);
- });
-
- it('Remove slides', function() {
- // Add slides
- cy.cGet('#presentation-toolbar #insertpage').click();
-
- impressHelper.assertSlidePreviewCountAfterIdle(this.win, 2);
-
- // Remove Slides
- cy.cGet('#presentation-toolbar #deletepage')
- .should('not.have.attr', 'disabled');
-
- cy.cGet('#presentation-toolbar #deletepage')
- .click();
-
- cy.cGet('#modal-dialog-deleteslide-modal .button-primary').click();
-
- cy.cGet('#presentation-toolbar #deletepage')
- .should('have.attr', 'disabled')
-
- impressHelper.assertSlidePreviewCountAfterIdle(this.win, 1);
-
- });
-
- it('Check slide sorter focus', function() {
- cy.cGet('#insertpage-button').click();
- helper.processToIdle(this.win);
-
- // Set the focus to slide sorter.
- cy.cGet('#preview-frame-part-0').click();
- cy.cGet('#preview-frame-part-1').click();
-
- // Slide sorter should keep focus while user clicks on different slides.
- cy.window().then(win => {
- const app = win['0'].app;
- cy.expect(app.map._docLayer._preview.partsFocused).to.be.equal(true);
- });
-
- cy.cGet('#toolbar-up').click();
- // Slide sorter should have lost the focus after user clicked somewhere.
- cy.window().then(win => {
- const app = win['0'].app;
- cy.expect(app.map._docLayer._preview.partsFocused).to.be.equal(false);
- });
- });
-
- it('Duplicate slide', function() {
- // Also check if comments are getting duplicated
- desktopHelper.closeNavigatorSidebar();
- desktopHelper.getNbIcon('ModifyPage').click();
- desktopHelper.insertComment();
- cy.cGet('[id^=annotation-content-area-]').should('include.text', 'some text0');
- cy.cGet('#Insert-tab-label').click();
- desktopHelper.getNbIcon('DuplicatePage', 'Insert').click();
-
- impressHelper.assertSlidePreviewCountAfterIdle(this.win, 2);
- cy.cGet('#SlideStatus').should('have.text', 'Slide 2 of 2');
- cy.cGet('[id^=annotation-content-area-]').should('include.text', 'some text0');
-
- });
-
- it('Navigator height test', function() {
- var navigationContainer, navOptionContainer, presentationWrapper, navHeading;
-
- cy.cGet('.navigation-header')
- .then(function(items) {
- expect(items).to.have.lengthOf(1);
- navHeading = items[0].getBoundingClientRect();
- });
-
- cy.cGet('.navigation-options-container')
- .then(function(items) {
- expect(items).to.have.lengthOf(1);
- navOptionContainer = items[0].getBoundingClientRect();
- });
-
-
- cy.cGet('#presentation-controls-wrapper')
- .then(function(items) {
- expect(items).to.have.lengthOf(1);
- presentationWrapper = items[0].getBoundingClientRect();
- });
-
- cy.cGet('#navigation-sidebar')
- .then(function(items) {
- expect(items).to.have.lengthOf(1);
- navigationContainer = items[0].getBoundingClientRect();
- expect(navigationContainer.height).equal(navHeading.height + navOptionContainer.height + presentationWrapper.height);
- });
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/slideshow_spec.js b/cypress_test/integration_tests/desktop/impress/slideshow_spec.js
deleted file mode 100644
index 4eab81c108a61..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/slideshow_spec.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* global describe it cy require beforeEach */
-
-var helper = require('../../common/helper');
-
-function getSlideShowContent() {
- return cy.cGet('#slideshow-cypress-iframe');
-}
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Some app', function() {
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/slideshow.odp');
- cy.cGet('.notebookbar #Slideshow-tab-label').click();
- cy.cGet('.notebookbar #slide-fullscreen-presentation-button').click();
- });
-
- it('Should see an empty slideshow', function () {
- getSlideShowContent().should('be.visible');
- //FIXME: remove explicit wait. I tried to assert slideshow's canvas but for some reason cypress can't find slideshow iframe
- cy.wait(1000);
- getSlideShowContent().compareSnapshot('slideshow', 0.15);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/statusbar_spec.js b/cypress_test/integration_tests/desktop/impress/statusbar_spec.js
deleted file mode 100644
index 699ce3295a522..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/statusbar_spec.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* global describe it cy beforeEach require Cypress */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Statubar tests.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/statusbar.odp');
- if (Cypress.env('INTEGRATION') === 'nextcloud') {
- desktopHelper.showStatusBarIfHidden ();
- }
- desktopHelper.shouldHaveZoomLevel('70');
- });
-
- it('Selected slide.', function() {
- cy.cGet('#SlideStatus').should('have.text', 'Slide 1 of 2');
- cy.cGet('#toolbar-down #nextpage').click();
- cy.cGet('#SlideStatus').should('have.text', 'Slide 2 of 2');
- cy.cGet('#toolbar-down #prevpage').click();
- cy.cGet('#SlideStatus').should('have.text', 'Slide 1 of 2');
- });
-
- it('Change zoom level.', function() {
- desktopHelper.resetZoomLevel();
- desktopHelper.shouldHaveZoomLevel('100');
- desktopHelper.zoomIn();
- desktopHelper.shouldHaveZoomLevel('120');
- desktopHelper.zoomOut();
- desktopHelper.shouldHaveZoomLevel('100');
- });
-
- it('Select zoom level.', function() {
- desktopHelper.resetZoomLevel();
- desktopHelper.shouldHaveZoomLevel('100');
- desktopHelper.selectZoomLevel('280', false);
- desktopHelper.shouldHaveZoomLevel('280');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/table_operation_spec.js b/cypress_test/integration_tests/desktop/impress/table_operation_spec.js
deleted file mode 100644
index 263dcdde994c3..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/table_operation_spec.js
+++ /dev/null
@@ -1,264 +0,0 @@
-/* global describe cy beforeEach it expect require */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-var impressHelper = require('../../common/impress_helper');
-
-describe(['tagdesktop'], 'Table operations', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/table_operation.odp');
- cy.viewport(1920,1080);
-
- desktopHelper.switchUIToNotebookbar();
- });
-
- function retriggerNewSvgForTableInTheCenter() {
- impressHelper.removeShapeSelection();
-
- helper.typeIntoDocument('{ctrl}{a}');
- }
-
- function selectFullTable() {
- helper.typeIntoDocument('{ctrl}{a}');
-
- impressHelper.selectTableInTheCenter();
- cy.cGet('.table-row-resize-marker')
- .should('have.length', 3);
- cy.cGet('.table-column-resize-marker')
- .should('have.length', 3); // One is invisible but it is included here.
-
- // Click doesn't work without wait
- cy.wait(500);
- cy.cGet('text.SVGTextShape').click({force: true});
-
- }
-
- it('Insert Row Before', function() {
- selectFullTable();
- desktopHelper.getNbIcon('InsertRowsBefore', 'Table').click();
- cy.cGet('.table-row-resize-marker').should('have.length', 4);
- retriggerNewSvgForTableInTheCenter();
- cy.cGet('#document-container g.Page g').should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of cells
- cy.cGet('g.Page path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(8);
- });
-
- //assert the text position
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition').should('have.attr', 'x', '7290');
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition').should('have.attr', 'y', '5644');
- });
-
- it('Insert Row After', function() {
- selectFullTable();
- desktopHelper.getNbIcon('InsertRowsAfter', 'Table').click();
-
- cy.cGet('.table-row-resize-marker').should('have.length', 4);
- retriggerNewSvgForTableInTheCenter();
-
- cy.cGet('#document-container g.Page g')
- .should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of cells
- cy.cGet('g.Page path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(8);
- });
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '7290');
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'y', '5644');
- });
-
- it('Insert column before.', function() {
- selectFullTable();
- desktopHelper.getNbIcon('InsertColumnsBefore', 'Table').click();
-
- cy.cGet('.table-column-resize-marker')
- .should('have.length', 4);
-
- retriggerNewSvgForTableInTheCenter();
-
- cy.cGet('#document-container g.Page g')
- .should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of cells
- cy.cGet('g.Page path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(9);
- });
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '14339');
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'y', '5644');
- });
-
- it('Insert column after.', function() {
- selectFullTable();
- desktopHelper.getNbIcon('InsertColumnsAfter', 'Table').click();
-
- cy.cGet('.table-column-resize-marker')
- .should('have.length', 4);
-
- retriggerNewSvgForTableInTheCenter();
-
- cy.cGet('#document-container g.Page g')
- .should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of cells
- cy.cGet('g.Page path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(9);
- });
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '7290');
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'y', '5644');
- });
-
- it('Delete row.', function() {
- selectFullTable();
- desktopHelper.getNbIcon('DeleteRows', 'Table').click();
-
- cy.cGet('.table-row-resize-marker')
- .should('have.length', 2);
-
- retriggerNewSvgForTableInTheCenter();
-
- cy.cGet('#document-container g.Page g')
- .should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of cells
- cy.cGet('g.Page path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(4);
- });
-
- //cy.cGet('#document-container g.Page .TextParagraph .TextPosition').should('not.exist');
- });
-
- it('Delete Column.', function() {
- selectFullTable();
- desktopHelper.getNbIcon('InsertColumnsBefore', 'Table').click();
-
- cy.cGet('.table-column-resize-marker')
- .should('have.length', 4);
-
- desktopHelper.getNbIcon('DeleteColumns', 'Table').click();
-
- cy.cGet('.table-column-resize-marker')
- .should('have.length', 3);
-
- retriggerNewSvgForTableInTheCenter();
-
- cy.cGet('#document-container g.Page g')
- .should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of cells
- cy.cGet('g.Page path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(6);
- });
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '7290');
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'y', '5644');
- });
-
- it('Delete Table', function() {
- selectFullTable();
- desktopHelper.getNbIcon('DeleteTable', 'Table').click();
-
- retriggerNewSvgForTableInTheCenter();
-
- cy.cGet('.table-column-resize-marker')
- .should('not.exist');
-
- cy.cGet('#document-container g.Page g')
- .should('not.exist');
- });
-
- it('Merge Row', function() {
- selectFullTable();
-
- cy.cGet('.table-row-resize-marker')
- .should('have.length', 3);
-
- desktopHelper.getNbIcon('EntireRow', 'Table').click();
- desktopHelper.getNbIcon('MergeCells', 'Table').should('not.be.disabled').click();
-
- retriggerNewSvgForTableInTheCenter();
-
- cy.cGet('#document-container g.Page g')
- .should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of cells
- cy.cGet('g.Page path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(5);
- });
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '7290');
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'y', '5644');
- });
-
- it('Merge Column', function() {
- selectFullTable();
-
- cy.cGet('.table-row-resize-marker')
- .should('have.length', 3);
-
- desktopHelper.getNbIcon('EntireColumn', 'Table').click();
- desktopHelper.getNbIcon('MergeCells', 'Table').should('not.be.disabled').click();
-
- retriggerNewSvgForTableInTheCenter();
-
- cy.cGet('#document-container g.Page g')
- .should('have.class', 'com.sun.star.drawing.TableShape');
-
- //assert the number of cells
- cy.cGet('g.Page path[fill^="rgb"]')
- .should(function(cells) {
- expect(cells).to.have.lengthOf(4);
- });
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'x', '7290');
-
- cy.cGet('#document-container g.Page .TextParagraph .TextPosition')
- .should('have.attr', 'y', '5644');
- });
-
- it.skip('Split Cells', function() {
- // ToDo: Merge cells before calling split cells function.
- impressHelper.selectTableInTheCenter();
-
- cy.cGet('.table-row-resize-marker')
- .should('have.length', 4);
-
- desktopHelper.getNbIcon('SplitCell', 'Table').click();
-
- cy.cGet('#SplitCellsDialog').should('be.visible');
-
- cy.cGet('#SplitCellsDialog .ui-pushbutton.jsdialog.button-primary')
- .click();
-
- cy.cGet('.table-row-resize-marker')
- .should('have.length', 4);
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js b/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js
deleted file mode 100644
index b13717ef193c0..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js
+++ /dev/null
@@ -1,177 +0,0 @@
-/* global describe it cy beforeEach require Cypress */
-
-var helper = require('../../common/helper');
-var impressHelper = require('../../common/impress_helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Top toolbar tests.', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/top_toolbar.odp');
- desktopHelper.switchUIToCompact();
-
- if (Cypress.env('INTEGRATION') === 'nextcloud') {
- desktopHelper.hideSidebar();
- } else {
- desktopHelper.hideSidebarImpress();
- }
-
- cy.getFrameWindow().then((win) => {
- this.win = win;
- helper.processToIdle(win);
- });
-
- impressHelper.selectTextShapeInTheCenter();
- });
-
- it('Apply bold on text shape.', function() {
- desktopHelper.getCompactIcon('Bold').click();
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'font-weight', '700');
- });
-
- it('Apply italic on text shape.', function() {
- desktopHelper.getCompactIcon('Italic').click();
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'font-style', 'italic');
- });
-
- it('Apply underline on text shape.', function() {
- desktopHelper.getCompactIcon('Underline').click();
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'text-decoration', 'underline');
- });
-
- it('Apply strikethrough on text shape.', function() {
- desktopHelper.getCompactIcon('Strikeout').click();
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'text-decoration', 'line-through');
- });
-
- it('Apply font color on text shape.', function() {
- desktopHelper.getCompactIconArrow('FontColor').click();
- desktopHelper.getCompactIconArrow('Color').click();
- desktopHelper.selectColorFromPalette('FFFF00');
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'fill', 'rgb(255,255,0)');
- });
-
- it('Apply highlight color on text shape.', function() {
- desktopHelper.getCompactIconArrow('FontColor').click();
- desktopHelper.getCompactIconArrow('CharBackColor').click();
- desktopHelper.selectColorFromPalette('FFBF00');
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- //highlight color is not in the SVG
- // that's why we didn't test there
- });
-
- it('Apply a selected font name on the text shape', function() {
- cy.cGet('#fontnamecombobox .ui-combobox-button').click();
- desktopHelper.selectFromListbox('Liberation Mono');
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'font-family', 'Liberation Mono');
- });
-
- it('Apply a selected font size on the text shape', function() {
- cy.cGet('#fontsizecombobox .ui-combobox-button').click();
- desktopHelper.selectFromListbox('22');
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'font-size', '776px');
- });
-
- it.skip('Apply left/right alignment on text selected text.', function() {
- impressHelper.selectTextOfShape();
- cy.cGet('text tspan.TextPosition').should('have.attr', 'x', '1400');
-
- // Set right alignment first
- cy.cGet('#rightpara').click();
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition').should('have.attr', 'x', '24530');
-
- // Set left alignment
- impressHelper.selectTextOfShape();
- cy.cGet('#leftpara').click();
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition').should('have.attr', 'x', '1400');
- });
-
- it.skip('Apply superscript on selected text.', function() {
- impressHelper.selectTextOfShape();
-
- cy.cGet('text tspan.TextPosition').should('have.attr', 'y', '8643');
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'font-size', '1129px');
-
- helper.typeIntoDocument('{ctrl}{shift}p');
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition').invoke('attr','y').then((y)=>+y).should('be.gt',8200);
- cy.cGet('text tspan.TextPosition').invoke('attr','y').then((y)=>+y).should('be.lt',8300);
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'font-size', '655px');
- });
-
- it.skip('Apply subscript on selected text.', function() {
- impressHelper.selectTextOfShape();
-
- cy.cGet('text tspan.TextPosition').should('have.attr', 'y', '8643');
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'font-size', '1129px');
-
- helper.typeIntoDocument('{ctrl}{shift}b');
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
-
- cy.cGet('text tspan.TextPosition').invoke('attr','y').then((y)=>+y).should('be.gt',8700);
- cy.cGet('text tspan.TextPosition').invoke('attr','y').then((y)=>+y).should('be.lt',8750);
- cy.cGet('text tspan.TextPosition tspan').should('have.attr', 'font-size', '655px');
- });
-
- it('Click shape hyperlink.', function() {
- // Insert shape
- desktopHelper.getCompactIconArrow('DefaultNumbering').click();
- desktopHelper.getCompactIconArrow('BasicShapes').click();
- cy.cGet('.col.w2ui-icon.basicshapes_round-quadrat').click();
- cy.cGet('#test-div-shapeHandlesSection').should('exist');
-
- // Select shape at center of document
- impressHelper.clickCenterOfSlide( { } );
-
- helper.typeIntoDocument('{ctrl}k');
- cy.cGet('#target').should('exist').should('be.visible');
- cy.cGet('#indication').should('exist').should('not.be.visible');
- cy.cGet('#name').should('exist').should('not.be.visible');
-
- cy.cGet('#target-input').type('www.something.com');
- cy.cGet('#ok').click();
-
- helper.processToIdle(this.win);
-
- impressHelper.removeShapeSelection();
-
- // Ctrl-click to open hyperlink pop-up
- impressHelper.clickCenterOfSlide( {ctrlKey: true} );
- helper.processToIdle(this.win);
-
- cy.cGet('[id^="info-modal-label2"]').should('have.text', 'http://www.something.com/');
- cy.cGet('#openlink-response').should('exist');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/transition_spec.js b/cypress_test/integration_tests/desktop/impress/transition_spec.js
deleted file mode 100644
index 446ef882b54e5..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/transition_spec.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* global describe it cy beforeEach require */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-
-describe(['tagdesktop'], 'Impress Transition Tab Tests', function() {
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/slideshow.odp');
- desktopHelper.switchUIToNotebookbar();
- });
-
- it('Transition tab exists in notebookbar', function() {
- cy.cGet('#Transition-tab-label')
- .should('exist')
- .should('be.visible')
- .should('have.text', 'Transition');
- });
-
- it('Apply to All Slides button exists', function() {
- cy.cGet('#Transition-tab-label').click();
- cy.cGet('#Transition-tab-label').should('have.class', 'selected');
- cy.cGet('#apply_to_all').should('exist');
- });
-});
diff --git a/cypress_test/integration_tests/desktop/impress/undo_redo_spec.js b/cypress_test/integration_tests/desktop/impress/undo_redo_spec.js
deleted file mode 100644
index ad74620130533..0000000000000
--- a/cypress_test/integration_tests/desktop/impress/undo_redo_spec.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/* global describe it beforeEach require cy */
-
-var helper = require('../../common/helper');
-var impressHelper = require('../../common/impress_helper');
-var desktopHelper = require('../../common/desktop_helper');
-var repairHelper = require('../../common/repair_document_helper');
-
-describe(['tagdesktop'], 'Editing Operations', function() {
-
- function expectInitialText() {
- impressHelper.triggerNewSVGForShapeInTheCenter();
- impressHelper.dblclickOnSelectedShape();
- helper.typeIntoDocument('{ctrl+a}');
- helper.copy();
- helper.clipboardTextShouldBeDifferentThan('Hello World');
- }
-
- function expectTypedText() {
- cy.log('expectTypedText - START');
-
- impressHelper.triggerNewSVGForShapeInTheCenter();
- impressHelper.dblclickOnSelectedShape();
- helper.typeIntoDocument('{ctrl+a}');
- helper.copy();
-
- impressHelper.dblclickOnSelectedShape();
- helper.expectTextForClipboard('Hello World');
-
- cy.log('expectTypedText - END');
- }
-
- beforeEach(function() {
- helper.setupAndLoadDocument('impress/undo_redo.odp');
- // close the default slide-sorter navigation sidebar
- desktopHelper.closeNavigatorSidebar();
- desktopHelper.selectZoomLevel('30', false);
-
- impressHelper.selectTextShapeInTheCenter();
- cy.wait(500); // Wait a little for server response.
- impressHelper.dblclickOnSelectedShape();
- });
-
- function undo() {
- cy.wait(500); // Same, wait for server response.
- helper.typeIntoDocument('Hello World');
- expectTypedText();
- helper.typeIntoDocument('{ctrl+z}');
- expectInitialText();
- }
-
- it('Undo', function() {
- helper.setDummyClipboardForCopy();
- undo();
- });
-
- it('Redo', function() {
- helper.setDummyClipboardForCopy();
- undo();
- helper.typeIntoDocument('{ctrl+y}');
- cy.wait(500); // Wait a little for server response.
- expectTypedText();
- });
-
- it('Repair Document', function() {
- helper.setDummyClipboardForCopy();
- helper.typeIntoDocument('Hello World');
- impressHelper.triggerNewSVGForShapeInTheCenter();
- impressHelper.dblclickOnSelectedShape();
- helper.typeIntoDocument('Overwrite Text');
- impressHelper.triggerNewSVGForShapeInTheCenter();
- repairHelper.rollbackPastChange('Undo', false, true);
- impressHelper.triggerNewSVGForShapeInTheCenter();
- expectTypedText();
- });
-});
diff --git a/cypress_test/integration_tests/desktop/writer/a11y_dialog_spec.js b/cypress_test/integration_tests/desktop/writer/a11y_dialog_spec.js
deleted file mode 100644
index 201031987021d..0000000000000
--- a/cypress_test/integration_tests/desktop/writer/a11y_dialog_spec.js
+++ /dev/null
@@ -1,380 +0,0 @@
-/* global describe expect it cy before after afterEach require Cypress */
-
-var helper = require('../../common/helper');
-var desktopHelper = require('../../common/desktop_helper');
-var a11yHelper = require('../../common/a11y_helper');
-
-const allWriterDialogs = [
- '.uno:ChapterNumberingDialog',
- '.uno:EditRegion',
- '.uno:EditStyle?Param:string=Example&Family:short=1',
- '.uno:EditStyle?Param:string=Heading&Family:short=2',
- { command: '.uno:ExportToEPUB', args: { SynchronMode: { type: 'boolean', value: false } } },
- '.uno:FieldDialog',
- '.uno:FontDialog',
- '.uno:FootnoteDialog',
- '.uno:FormatColumns',
- '.uno:InsertBreak',
- '.uno:InsertBookmark',
- '.uno:InsertCaptionDialog',
- '.uno:InsertFieldCtrl',
- '.uno:InsertFrame',
- '.uno:InsertIndexesEntry',
- '.uno:InsertMultiIndex',
- '.uno:InsertSection',
- '.uno:LineNumberingDialog',
- '.uno:OutlineBullet',
- '.uno:PageDialog',
- '.uno:PageNumberWizard',
- '.uno:ParagraphDialog',
- '.uno:SplitTable',
- '.uno:TableDialog',
- '.uno:TableNumberFormatDialog',
- '.uno:TableSort',
- '.uno:TitlePageDialog',
- '.uno:Translate',
- '.uno:Watermark',
- '.uno:WordCountDialog'
-];
-
-// 'common' dialogs that writer specifically does not support
-const excludedCommonDialogs = [
- '.uno:SpellDialog'
-];
-
-describe(['tagdesktop'], 'Accessibility Writer Dialog Tests', { testIsolation: false }, function () {
- let win;
- let hasLinguisticData = false;
-
- before(function () {
- helper.setupAndLoadDocument('writer/help_dialog.odt', /*isMultiUser=*/false, /*copyCertificates=*/true);
-
- // to make insertImage use the correct buttons
- desktopHelper.switchUIToNotebookbar();
-
- helper.setDummyClipboardForCopy();
-
- cy.getFrameWindow().then(function (frameWindow) {
- win = frameWindow;
- a11yHelper.enableUICoverage(win);
- });
-
- cy.cGet('.jsdialog-window').should('not.exist');
-
- cy.then(() => {
- return helper.processToIdle(win);
- }).then(() => {
- const thesaurusState = win.app.map.stateChangeHandler.getItemValue('.uno:ThesaurusDialog');
- hasLinguisticData = (thesaurusState === 'enabled');
- });
- });
-
- after(function () {
- a11yHelper.reportUICoverage(win, hasLinguisticData);
-
- cy.get('@uicoverageResult').then(result => {
- expect(result.used, `used .ui files`).to.not.be.empty;
- // TODO: make these true
- // expect(result.CompleteWriterDialogCoverage, `complete writer dialog coverage`).to.be.true;
- // expect(result.CompleteCommonDialogCoverage, `complete common dialog coverage`).to.be.true;
- });
- });
-
- afterEach(function () {
- // Close any dialogs that might still be open after a test failure
- cy.cGet('body').then($body => {
- const dialogs = $body.find('.jsdialog-window .ui-dialog-titlebar-close');
- if (dialogs.length > 0) {
- // Close dialogs from innermost to outermost
- for (let i = dialogs.length - 1; i >= 0; i--) {
- cy.wrap(dialogs[i]).click({ force: true });
- }
- }
- });
- cy.cGet('.jsdialog-window:not(.ui-overflow-group-popup)').should('not.exist');
-
- a11yHelper.resetState();
- });
-
- // Helper to test that a11y validation detects injected errors
- function testA11yErrorDetection(injectBadElement) {
- cy.then(() => {
- win.app.map.sendUnoCommand('.uno:FontDialog');
- });
-
- a11yHelper.getActiveDialog(1)
- .then(() => helper.processToIdle(win))
- .then(() => {
- a11yHelper.getActiveDialog(1).then($dialog => {
- injectBadElement($dialog, win);
- });
- })
- .then(() => {
- // Validation should detect an error
- var spy = Cypress.sinon.spy(win.console, 'error');
- win.app.dispatcher.dispatch('validatedialogsa11y');
-
- cy.then(() => {
- const a11yErrors = spy.getCalls().filter(call =>
- String(call.args[0]).includes(win.app.A11yValidatorException.PREFIX)
- );
- expect(a11yErrors.length, 'Should detect a11y error').to.be.greaterThan(0);
- spy.restore();
- });
- })
- .then(() => {
- a11yHelper.closeActiveDialog(1);
- });
- }
-
- function escLevel(win, count) {
- for (var i = 0; i < count; i++) {
- helper.typeIntoDocument('{esc}');
- helper.processToIdle(win);
- }
- }
-
- it('Detects non-native button element error', function () {
- testA11yErrorDetection(function($dialog, win) {
- // Inject a span with role="button" instead of native