cypress_test/integration_tests/mobile/calc/calc_helper.js        |   20 +++--
 cypress_test/integration_tests/mobile/calc/number_format_spec.js |   39 
+++++++---
 2 files changed, 45 insertions(+), 14 deletions(-)

New commits:
commit 9add51eaaf11a80b79082540511968ef583f04f6
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Tue Mar 31 13:48:18 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Tue Mar 31 14:35:27 2020 +0200

    cypress: mobile: disable some number formatting tests broken on core/master.
    
    Two issues here:
    * Select All does nothing if one column is already selected.
    * Three number formatting item is missing from the mobile wizard.
    
    Change-Id: I1f3976ba01c7cf53a58e08d37a5f55f14c3f154f
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91417
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com>

diff --git a/cypress_test/integration_tests/mobile/calc/calc_helper.js 
b/cypress_test/integration_tests/mobile/calc/calc_helper.js
index 1ba4da22d..ce3b1608e 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_helper.js
@@ -1,4 +1,4 @@
-/* global cy expect require*/
+/* global cy expect require Cypress*/
 
 var helper = require('../../common/helper');
 
@@ -46,11 +46,21 @@ function copyContentToClipboard() {
 }
 
 function selectAllMobile() {
-       cy.get('.spreadsheet-header-columns')
-               .click();
+       // TODO: select all does not work with core/master
+       // if we have a column selected
+       if (Cypress.env('LO_CORE_VERSION') === 'master') {
+               cy.get('body')
+                       .type('{enter}');
 
-       cy.get('.spreadsheet-cell-resize-marker')
-               .should('exist');
+               cy.get('.leaflet-marker-icon')
+                       .should('exist');
+       } else {
+               cy.get('.spreadsheet-header-columns')
+                       .click();
+
+               cy.get('.spreadsheet-cell-resize-marker')
+                       .should('exist');
+       }
 
        cy.get('#spreadsheet-header-corner')
                .click();
diff --git a/cypress_test/integration_tests/mobile/calc/number_format_spec.js 
b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
index 2522942ec..942de9de0 100644
--- a/cypress_test/integration_tests/mobile/calc/number_format_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
@@ -1,4 +1,4 @@
-/* global describe it cy beforeEach require afterEach*/
+/* global describe it cy beforeEach require afterEach Cypress*/
 
 var helper = require('../../common/helper');
 var calcHelper = require('./calc_helper');
@@ -25,7 +25,7 @@ describe('Apply number formatting.', function() {
                cy.get('#ScNumberFormatPropertyPanel')
                        .click();
 
-               cy.get('#NumberFormatCurrency')
+               cy.get('#category')
                        .should('be.visible')
                        .wait(100);
        });
@@ -51,8 +51,11 @@ describe('Apply number formatting.', function() {
        it('Select percent format from list.', function() {
                selectFormatting('Percent');
 
-               cy.get('#NumberFormatPercentimg')
-                       .should('have.class', 'selected');
+               // TODO: Why this item is missing with core/master
+               // In desktop LO, sidebar contains this item.
+               if (Cypress.env('LO_CORE_VERSION') !== 'master')
+                       cy.get('#NumberFormatPercentimg')
+                               .should('have.class', 'selected');
 
                // Decimal and leading zeros are changed.
                cy.get('#decimalplaces input')
@@ -74,7 +77,12 @@ describe('Apply number formatting.', function() {
                        .should('have.text', '100000.00%');
        });
 
-       it('Select percent icon.', function() {
+       it('Push percent button.', function() {
+               // TODO: Why this item is missing with core/master
+               // In desktop LO, sidebar contains this item.
+               if (Cypress.env('LO_CORE_VERSION') === 'master')
+                       return;
+
                // Change to percent
                cy.get('#NumberFormatPercent')
                        .click();
@@ -109,8 +117,11 @@ describe('Apply number formatting.', function() {
        it('Select currency format from list.', function() {
                selectFormatting('Currency');
 
-               cy.get('#NumberFormatCurrencyimg')
-                       .should('have.class', 'selected');
+               // TODO: Why this item is missing with core/master
+               // In desktop LO, sidebar contains this item.
+               if (Cypress.env('LO_CORE_VERSION') !== 'master')
+                       cy.get('#NumberFormatCurrencyimg')
+                               .should('have.class', 'selected');
 
                // Decimal and leading zeros are changed.
                cy.get('#decimalplaces input')
@@ -132,7 +143,12 @@ describe('Apply number formatting.', function() {
                        .should('have.text', '$1,000.00');
        });
 
-       it('Select currency icon.', function() {
+       it('Push currency button.', function() {
+               // TODO: Why this item is missing with core/master
+               // In desktop LO, sidebar contains this item.
+               if (Cypress.env('LO_CORE_VERSION') === 'master')
+                       return;
+
                // Change to currency
                cy.get('#NumberFormatCurrency')
                        .click();
@@ -164,7 +180,12 @@ describe('Apply number formatting.', function() {
                        .should('have.text', '$1,000.00');
        });
 
-       it('Select number icon.', function() {
+       it('Push number button.', function() {
+               // TODO: Why this item is missing with core/master
+               // In desktop LO, sidebar contains this item.
+               if (Cypress.env('LO_CORE_VERSION') === 'master')
+                       return;
+
                // Change to currency first
                cy.get('#NumberFormatCurrency')
                        .click();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to