cypress_test/integration_tests/common/helper.js | 3 cypress_test/integration_tests/mobile/table_properties_spec.js | 52 +++++++--- 2 files changed, 43 insertions(+), 12 deletions(-)
New commits: commit 8dece1a3c3e0256a76b941bc932c1b5a0ad53be3 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Fri Feb 7 12:31:43 2020 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Fri Feb 7 12:31:43 2020 +0100 cypress: mobile: Update some table related test cases. Change-Id: I7c780785aab9db40e9b1f6312728ee5459e7716b diff --git a/cypress_test/integration_tests/common/helper.js b/cypress_test/integration_tests/common/helper.js index 0e5f885a1..1489a9e50 100644 --- a/cypress_test/integration_tests/common/helper.js +++ b/cypress_test/integration_tests/common/helper.js @@ -54,6 +54,9 @@ function selectAllMobile() { cy.get('.ui-header.level-1 .menu-entry-with-icon') .contains('Select All') .click(); + + cy.get('.leaflet-marker-icon') + .should('exist'); } function copyTextToClipboard() { diff --git a/cypress_test/integration_tests/mobile/table_properties_spec.js b/cypress_test/integration_tests/mobile/table_properties_spec.js index 1c5498950..c19b78654 100644 --- a/cypress_test/integration_tests/mobile/table_properties_spec.js +++ b/cypress_test/integration_tests/mobile/table_properties_spec.js @@ -276,12 +276,15 @@ describe('Change table properties / layout via mobile wizard.', function() { cy.get('#tb_actionbar_item_mobile_wizard') .click(); - helper.copyTableToClipboard(); - - cy.get('#copy-paste-container title') - .should('exist'); - cy.get('#copy-paste-container table') - .should('not.exist'); + // Do a new selection + helper.selectAllMobile(); + + // Check markers are in the same row (we have text selection only) + cy.get('.leaflet-marker-icon') + .then(function(markers) { + expect(markers).to.have.lengthOf(2); + expect(markers[0].getBoundingClientRect().top).to.equal(markers[1].getBoundingClientRect().top); + }); }); it('Merge cells.', function() { @@ -292,7 +295,11 @@ describe('Change table properties / layout via mobile wizard.', function() { before('table.odt'); - cy.get('body').type('{shift}{downarrow}{downarrow}{downarrow}{rightarrow}'); + // Select All + left arrow -> we have the cursor in the table + helper.selectAllMobile(); + cy.get('body').type('{leftarrow}'); + + cy.get('body').type('{shift}{downarrow}{rightarrow}'); // Open mobile wizard cy.get('#tb_actionbar_item_mobile_wizard') @@ -306,9 +313,6 @@ describe('Change table properties / layout via mobile wizard.', function() { cy.get('#MergeCells') .click(); - cy.get('.leaflet-marker-icon.table-column-resize-marker') - .should('not.exist'); - // Close mobile wizard cy.get('#tb_actionbar_item_mobile_wizard') .click(); @@ -317,9 +321,9 @@ describe('Change table properties / layout via mobile wizard.', function() { // Check rows / columns cy.get('#copy-paste-container tr') - .should('have.length', 1); + .should('have.length', 2); cy.get('#copy-paste-container td') - .should('have.length', 1); + .should('have.length', 3); }); it('Change row height.', function() { @@ -404,6 +408,10 @@ describe('Change table properties / layout via mobile wizard.', function() { before('table_with_text.odt'); + // Select All + left arrow -> we have the cursor in the table + helper.selectAllMobile(); + cy.get('body').type('{leftarrow}'); + cy.get('body').type('{leftarrow}{shift}{downarrow}{downarrow}{downarrow}{rightarrow}'); // Open mobile wizard @@ -436,6 +444,10 @@ describe('Change table properties / layout via mobile wizard.', function() { before('table_with_text.odt'); + // Select All + left arrow -> we have the cursor in the table + helper.selectAllMobile(); + cy.get('body').type('{leftarrow}'); + cy.get('body').type('{leftarrow}{shift}{downarrow}{downarrow}{downarrow}{rightarrow}'); // Open mobile wizard @@ -478,6 +490,10 @@ describe('Change table properties / layout via mobile wizard.', function() { before('table_with_text.odt'); + // Select All + left arrow -> we have the cursor in the table + helper.selectAllMobile(); + cy.get('body').type('{leftarrow}'); + cy.get('body').type('{leftarrow}{shift}{downarrow}{downarrow}{downarrow}{rightarrow}'); // Open mobile wizard @@ -520,6 +536,10 @@ describe('Change table properties / layout via mobile wizard.', function() { before('table_with_text.odt'); + // Select All + left arrow -> we have the cursor in the table + helper.selectAllMobile(); + cy.get('body').type('{leftarrow}'); + cy.get('body').type('{leftarrow}{shift}{downarrow}{downarrow}{downarrow}{rightarrow}'); // Open mobile wizard @@ -557,6 +577,10 @@ describe('Change table properties / layout via mobile wizard.', function() { before('table_with_text.odt'); + // Select All + left arrow -> we have the cursor in the table + helper.selectAllMobile(); + cy.get('body').type('{leftarrow}'); + cy.get('body').type('{leftarrow}{shift}{downarrow}{downarrow}{downarrow}{rightarrow}'); // Open mobile wizard @@ -597,6 +621,10 @@ describe('Change table properties / layout via mobile wizard.', function() { before('table_with_text.odt'); + // Select All + left arrow -> we have the cursor in the table + helper.selectAllMobile(); + cy.get('body').type('{leftarrow}'); + cy.get('body').type('{leftarrow}{shift}{downarrow}{downarrow}{downarrow}{rightarrow}'); // Open mobile wizard _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits