[Libreoffice-commits] online.git: cypress_test/integration_tests
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Sun Apr 26 12:44:46 UTC 2020
cypress_test/integration_tests/desktop/writer/shape_operations_spec.js | 2
cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js | 28 ++--------
cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js | 2
cypress_test/integration_tests/mobile/writer/table_properties_spec.js | 5 -
4 files changed, 10 insertions(+), 27 deletions(-)
New commits:
commit 9becac31e950d07109451dcbdf459f936570c570
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Sun Apr 26 13:56:57 2020 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sun Apr 26 14:44:29 2020 +0200
cypress: then(callbackFn) -> should(callbackFn)
It's better to use should, when we need an indicator.
Change-Id: I0f08c8862411e3c7627302bbda7b632b0bc0e15c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92930
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/cypress_test/integration_tests/desktop/writer/shape_operations_spec.js b/cypress_test/integration_tests/desktop/writer/shape_operations_spec.js
index 764633efd..b205249aa 100644
--- a/cypress_test/integration_tests/desktop/writer/shape_operations_spec.js
+++ b/cypress_test/integration_tests/desktop/writer/shape_operations_spec.js
@@ -26,7 +26,7 @@ describe('Shape operations', function() {
// Check whether the rectangle was inserted as an SVG
cy.get('.leaflet-pane.leaflet-overlay-pane svg')
- .then(function(svg) {
+ .should(function(svg) {
expect(svg[0].getBBox().width).to.be.greaterThan(0);
expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
diff --git a/cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js b/cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js
index 0c8226dac..910311b95 100644
--- a/cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/cell_appearance_spec.js
@@ -178,11 +178,8 @@ describe('Change cell appearance.', function() {
calcHelper.selectAllMobile();
cy.get('#copy-paste-container table td')
- .should('have.length', 4)
- .should('have.attr', 'style');
-
- cy.get('#copy-paste-container table td')
- .then(function(cells) {
+ .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');
}
@@ -198,11 +195,8 @@ describe('Change cell appearance.', function() {
calcHelper.selectAllMobile();
cy.get('#copy-paste-container table td')
- .should('have.length', 4)
- .should('have.attr', 'style');
-
- cy.get('#copy-paste-container table td')
- .then(function(cells) {
+ .should(function(cells) {
+ expect(cells).to.have.lengthOf(4);
for (var i = 0; i < cells.length; i++) {
if (i == 0)
expect(cells[i]).to.have.attr('style', 'border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000');
@@ -228,11 +222,8 @@ describe('Change cell appearance.', function() {
calcHelper.selectAllMobile();
cy.get('#copy-paste-container table td')
- .should('have.length', 4)
- .should('have.attr', 'style');
-
- cy.get('#copy-paste-container table td')
- .then(function(cells) {
+ .should(function(cells) {
+ expect(cells).to.have.lengthOf(4);
for (var i = 0; i < cells.length; i++) {
if (i == 0)
expect(cells[i]).to.have.attr('style', 'border-top: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000');
@@ -255,11 +246,8 @@ describe('Change cell appearance.', function() {
calcHelper.selectAllMobile();
cy.get('#copy-paste-container table td')
- .should('have.length', 4)
- .should('have.attr', 'style');
-
- cy.get('#copy-paste-container table td')
- .then(function(cells) {
+ .should(function(cells) {
+ expect(cells).to.have.lengthOf(4);
for (var i = 0; i < cells.length; i++) {
if (i == 0)
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');
diff --git a/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js b/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
index 703504dba..352860dc0 100644
--- a/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/insertion_wizard_spec.js
@@ -83,7 +83,7 @@ describe('Calc insertion wizard.', function() {
.should('exist');
cy.get('.leaflet-pane.leaflet-overlay-pane svg')
- .then(function(svg) {
+ .should(function(svg) {
expect(svg[0].getBBox().width).to.be.greaterThan(0);
expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
diff --git a/cypress_test/integration_tests/mobile/writer/table_properties_spec.js b/cypress_test/integration_tests/mobile/writer/table_properties_spec.js
index 727bf194d..e404ff411 100644
--- a/cypress_test/integration_tests/mobile/writer/table_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/table_properties_spec.js
@@ -391,11 +391,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
writerHelper.selectAllMobile();
// Check new row height
- cy.get('#copy-paste-container td:nth-of-type(1n)')
- .should('have.attr', 'height');
- cy.get('#copy-paste-container td:nth-of-type(2n)')
- .should('not.have.attr', 'height');
-
cy.get('#copy-paste-container td')
.should(function(items) {
expect(items).to.have.lengthOf(6);
More information about the Libreoffice-commits
mailing list