cypress_test/integration_tests/mobile/calc/number_format_spec.js |   94 
++++++++++
 cypress_test/integration_tests/mobile/calc/spellchecking_spec.js |    5 
 2 files changed, 96 insertions(+), 3 deletions(-)

New commits:
commit 4d270dffac8417079c992c993a280954e03620e6
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Wed Apr 8 12:41:33 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Wed Apr 8 13:06:25 2020 +0200

    cypress: mobile: calc: add more tests for number formatting.
    
    Change-Id: I6720040a296ce9cb1185b428a4a062a7f61c27fa
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91884
    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/number_format_spec.js 
b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
index 4f1356e50..ab1b69734 100644
--- a/cypress_test/integration_tests/mobile/calc/number_format_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
@@ -369,4 +369,98 @@ describe('Apply number formatting.', function() {
                cy.get('#copy-paste-container table td')
                        .should('have.text', '1000');
        });
+
+       it('Change decimal places.', function() {
+               // Check default value
+               cy.get('#decimalplaces input')
+                       .should('have.attr', 'value', '0');
+
+               // Type in a new value
+               cy.get('#decimalplaces input')
+                       .clear()
+                       .type('2{enter}');
+
+               cy.get('#decimalplaces input')
+                       .should('have.attr', 'value', '2');
+
+               mobileHelper.closeMobileWizard();
+
+               calcHelper.copyContentToClipboard();
+
+               cy.get('#copy-paste-container table td')
+                       .should('have.attr', 'sdnum', '1033;0;0.00');
+
+               cy.get('#copy-paste-container table td')
+                       .should('have.text', '1000.00');
+       });
+
+       it('Change leading zeros.', function() {
+               // Check default value
+               cy.get('#leadingzeroes input')
+                       .should('have.attr', 'value', '1');
+
+               // Type in a new value
+               cy.get('#leadingzeroes input')
+                       .clear()
+                       .type('6{enter}');
+
+               cy.get('#leadingzeroes input')
+                       .should('have.attr', 'value', '6');
+
+               mobileHelper.closeMobileWizard();
+
+               calcHelper.copyContentToClipboard();
+
+               cy.get('#copy-paste-container table td')
+                       .should('have.attr', 'sdnum', '1033;0;000000');
+
+               cy.get('#copy-paste-container table td')
+                       .should('have.text', '001000');
+       });
+
+       it('Apply red color for negative numbers.', function() {
+               // Check default value
+               cy.get('#negativenumbersred input')
+                       .should('not.have.attr', 'checked', 'checked');
+
+               // Change the option
+               cy.get('#negativenumbersred input')
+                       .click();
+
+               cy.get('#negativenumbersred input')
+                       .should('have.attr', 'checked', 'checked');
+
+               mobileHelper.closeMobileWizard();
+
+               calcHelper.copyContentToClipboard();
+
+               cy.get('#copy-paste-container table td')
+                       .should('have.attr', 'sdnum', '1033;0;0;[RED]-0');
+
+               cy.get('#copy-paste-container table td')
+                       .should('have.text', '1000');
+       });
+
+       it('Add thousands separator.', function() {
+               // Check default value
+               cy.get('#thousandseparator input')
+                       .should('not.have.attr', 'checked', 'checked');
+
+               // Change the option
+               cy.get('#thousandseparator input')
+                       .click();
+
+               cy.get('#thousandseparator input')
+                       .should('have.attr', 'checked', 'checked');
+
+               mobileHelper.closeMobileWizard();
+
+               calcHelper.copyContentToClipboard();
+
+               cy.get('#copy-paste-container table td')
+                       .should('have.attr', 'sdnum', '1033;0;#,##0');
+
+               cy.get('#copy-paste-container table td')
+                       .should('have.text', '1,000');
+       });
 });
commit 8986e8068faa556979ccbdd5633412312bc9c80d
Author:     Tamás Zolnai <tamas.zol...@collabora.com>
AuthorDate: Wed Apr 8 12:07:53 2020 +0200
Commit:     Tamás Zolnai <tamas.zol...@collabora.com>
CommitDate: Wed Apr 8 13:06:14 2020 +0200

    cypress: mobile: try to fix random failure in calc spellchecking test.
    
    Change-Id: I0c4bda087a651e668ea0bbff285d11996768fc05
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91883
    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/spellchecking_spec.js 
b/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
index 70a91270f..24257d9ce 100644
--- a/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/spellchecking_spec.js
@@ -26,10 +26,9 @@ describe('Calc spell checking menu.', function() {
                        .type('{ctrl}a', {force: true});
 
                // Open context menu
-               cy.get('.leaflet-marker-icon')
+               
cy.get('.leaflet-selection-marker-start,.leaflet-selection-marker-end')
                        .then(function(markers) {
-                               expect(markers.length).to.have.greaterThan(1);
-                               cy.log('Markers length: ' + markers.length);
+                               expect(markers.length).to.be.equal(2);
                                for (var i = 0; i < markers.length; i++) {
                                        if 
(markers[i].classList.contains('leaflet-selection-marker-start')) {
                                                cy.log('Found start marker at 
pos: ' + markers[i].getBoundingClientRect().right);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to