[Libreoffice-commits] online.git: 2 commits - cypress_test/integration_tests

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 8 13:26:37 UTC 2020


 cypress_test/integration_tests/common/mobile_helper.js                          |   27 +++++++
 cypress_test/integration_tests/mobile/calc/alignment_options_spec.js            |   18 -----
 cypress_test/integration_tests/mobile/calc/apply_font_spec.js                   |   19 -----
 cypress_test/integration_tests/mobile/calc/calc_helper.js                       |   18 -----
 cypress_test/integration_tests/mobile/calc/number_format_spec.js                |   31 --------
 cypress_test/integration_tests/mobile/impress/impress_helper.js                 |   18 -----
 cypress_test/integration_tests/mobile/writer/apply_font_spec.js                 |   26 -------
 cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js |   34 ---------
 cypress_test/integration_tests/mobile/writer/table_properties_spec.js           |   30 --------
 cypress_test/integration_tests/mobile/writer/writer_helper.js                   |   36 ----------
 10 files changed, 31 insertions(+), 226 deletions(-)

New commits:
commit 803e9ee336e869e7b8d82fcc985c81470cacac41
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Apr 8 15:21:31 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Apr 8 15:26:27 2020 +0200

    cypress: mobile: remove copy-pasted comment.
    
    Change-Id: I459c0a7f068c1eabea9f5630bea3a718e31e044e
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91922
    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/mobile/calc/alignment_options_spec.js b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
index 39119ee15..74a088c74 100644
--- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
@@ -54,7 +54,6 @@ describe('Change alignment settings.', function() {
 	});
 
 	it('Align to center horizontally.', function() {
-		// Set right aligment first
 		cy.get('#AlignHorizontalCenter')
 			.click();
 
@@ -76,7 +75,6 @@ describe('Change alignment settings.', function() {
 	});
 
 	it('Right-to-left and left-to-right writing mode.', function() {
-		// Set right aligment first
 		cy.get('#ParaRightToLeft')
 			.click();
 
@@ -92,7 +90,6 @@ describe('Change alignment settings.', function() {
 	});
 
 	it('Align to the top and to bottom.', function() {
-		// Set right aligment first
 		cy.get('#AlignTop')
 			.click();
 
@@ -119,7 +116,6 @@ describe('Change alignment settings.', function() {
 	});
 
 	it('Align to center vertically.', function() {
-		// Set right aligment first
 		cy.get('#AlignVCenter')
 			.click();
 
commit a795117f60969e054c1a3b7131f33ee23036f010
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Wed Apr 8 14:03:58 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Wed Apr 8 15:26:18 2020 +0200

    cypress: mobile: improve copying via context menu.
    
    So we don't need to close the mobile wizard before copying.
    The main issue was with contains() method, which first
    selects the HTML items and waits until these items gets
    the content 'Copy'. What we actually need is to wait until
    an item appears with the content 'Copy'. Not the existing
    items's content is updated with the 'Copy' text, but new
    items are created.
    
    Change-Id: I235d2756ce41a099267fa335c215d3eca6f468c2
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91913
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/cypress_test/integration_tests/common/mobile_helper.js b/cypress_test/integration_tests/common/mobile_helper.js
index 53eac5d6d..f9e0b78f8 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ b/cypress_test/integration_tests/common/mobile_helper.js
@@ -165,6 +165,32 @@ function closeMobileWizard() {
 	cy.log('Closing mobile wizard - end.');
 }
 
+function executeCopyFromContextMenu(XPos, YPos) {
+	cy.log('Executing copy from context menu - start.');
+	cy.log('Param - XPos: ' + XPos);
+	cy.log('Param - YPos: ' + YPos);
+
+	longPressOnDocument(XPos, YPos);
+
+	cy.get('.menu-entry-with-icon')
+		.should('contain.text', 'Copy');
+
+	// Execute copy
+	cy.get('.menu-entry-with-icon')
+		.contains('Copy')
+		.click();
+
+	// Close warning about clipboard operations
+	cy.get('.vex-dialog-button-primary.vex-dialog-button.vex-first')
+		.click();
+
+	// Wait until it's closed
+	cy.get('.vex-overlay')
+		.should('not.exist');
+
+	cy.log('Executing copy from context menu - end.');
+}
+
 module.exports.enableEditingMobile = enableEditingMobile;
 module.exports.beforeAllMobile = beforeAllMobile;
 module.exports.longPressOnDocument = longPressOnDocument;
@@ -172,3 +198,4 @@ module.exports.openHamburgerMenu = openHamburgerMenu;
 module.exports.closeHamburgerMenu = closeHamburgerMenu;
 module.exports.openMobileWizard = openMobileWizard;
 module.exports.closeMobileWizard = closeMobileWizard;
+module.exports.executeCopyFromContextMenu = executeCopyFromContextMenu;
diff --git a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
index f89e7843c..39119ee15 100644
--- a/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/alignment_options_spec.js
@@ -31,8 +31,6 @@ describe('Change alignment settings.', function() {
 		cy.get('#AlignRight')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -49,8 +47,6 @@ describe('Change alignment settings.', function() {
 		cy.get('#AlignLeft')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -62,8 +58,6 @@ describe('Change alignment settings.', function() {
 		cy.get('#AlignHorizontalCenter')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -75,8 +69,6 @@ describe('Change alignment settings.', function() {
 		cy.get('#AlignBlock')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -104,8 +96,6 @@ describe('Change alignment settings.', function() {
 		cy.get('#AlignTop')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -122,8 +112,6 @@ describe('Change alignment settings.', function() {
 		cy.get('#AlignBottom')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -135,8 +123,6 @@ describe('Change alignment settings.', function() {
 		cy.get('#AlignVCenter')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
diff --git a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
index c494a07f5..1144e37b6 100644
--- a/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/apply_font_spec.js
@@ -35,8 +35,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Bold')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td b')
@@ -47,7 +45,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Italic')
 			.click();
 
-		mobileHelper.closeMobileWizard();
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td i')
@@ -58,8 +55,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Underline')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td u')
@@ -71,8 +66,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Strikeout')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td s')
@@ -84,8 +77,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Shadowed')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		// TODO: Shadowed is not in the clipboard content.
@@ -110,8 +101,6 @@ describe('Apply font changes.', function() {
 		cy.get('#fontnamecombobox .ui-header-right')
 			.contains('Linux Libertine G');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td font')
@@ -141,8 +130,6 @@ describe('Apply font changes.', function() {
 		cy.get('#fontsizecombobox .ui-header-right')
 			.contains('14');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td font')
@@ -154,8 +141,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Grow')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td font')
@@ -167,8 +152,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Shrink')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td font')
@@ -186,8 +169,6 @@ describe('Apply font changes.', function() {
 		cy.get('#mobile-wizard-back')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td font')
diff --git a/cypress_test/integration_tests/mobile/calc/calc_helper.js b/cypress_test/integration_tests/mobile/calc/calc_helper.js
index 12e20b6e0..3913373ad 100644
--- a/cypress_test/integration_tests/mobile/calc/calc_helper.js
+++ b/cypress_test/integration_tests/mobile/calc/calc_helper.js
@@ -49,25 +49,9 @@ function copyContentToClipboard() {
 			expect(items).to.have.lengthOf(1);
 			var XPos = items[0].getBoundingClientRect().right + 10;
 			var YPos = items[0].getBoundingClientRect().top + 10;
-			mobileHelper.longPressOnDocument(XPos, YPos);
+			mobileHelper.executeCopyFromContextMenu(XPos, YPos);
 		});
 
-	cy.get('#mobile-wizard')
-		.should('be.visible');
-
-	// Execute copy
-	cy.get('.menu-entry-with-icon', {timeout : 10000})
-		.contains('Copy')
-		.click();
-
-	// Close warning about clipboard operations
-	cy.get('.vex-dialog-button-primary.vex-dialog-button.vex-first')
-		.click();
-
-	// Wait until it's closed
-	cy.get('.vex-overlay')
-		.should('not.exist');
-
 	cy.log('Copying content to clipboard - end.');
 }
 
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 ab1b69734..e727ee56d 100644
--- a/cypress_test/integration_tests/mobile/calc/number_format_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
@@ -60,8 +60,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '1');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -95,8 +93,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '1');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -122,8 +118,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '1');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -157,8 +151,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '1');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -188,8 +180,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '1');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -221,8 +211,6 @@ describe('Apply number formatting.', function() {
 		//cy.get('#category .ui-header-left')
 		//	.should('have.text', 'Number');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -249,8 +237,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '0');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -273,8 +259,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '0');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -297,8 +281,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '1');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -318,8 +300,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '0');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -339,7 +319,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '0');
 
-		mobileHelper.closeMobileWizard();
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -359,8 +338,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '0');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -383,8 +360,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#decimalplaces input')
 			.should('have.attr', 'value', '2');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -407,8 +382,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#leadingzeroes input')
 			.should('have.attr', 'value', '6');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -430,8 +403,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#negativenumbersred input')
 			.should('have.attr', 'checked', 'checked');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
@@ -453,8 +424,6 @@ describe('Apply number formatting.', function() {
 		cy.get('#thousandseparator input')
 			.should('have.attr', 'checked', 'checked');
 
-		mobileHelper.closeMobileWizard();
-
 		calcHelper.copyContentToClipboard();
 
 		cy.get('#copy-paste-container table td')
diff --git a/cypress_test/integration_tests/mobile/impress/impress_helper.js b/cypress_test/integration_tests/mobile/impress/impress_helper.js
index a1678726e..fc528838d 100644
--- a/cypress_test/integration_tests/mobile/impress/impress_helper.js
+++ b/cypress_test/integration_tests/mobile/impress/impress_helper.js
@@ -17,25 +17,9 @@ function copyShapeContentToClipboard() {
 			expect(marker).to.have.lengthOf(2);
 			var XPos = (marker[0].getBoundingClientRect().right + marker[1].getBoundingClientRect().left) / 2;
 			var YPos = marker[0].getBoundingClientRect().top - 5;
-			mobileHelper.longPressOnDocument(XPos, YPos);
+			mobileHelper.executeCopyFromContextMenu(XPos, YPos);
 		});
 
-	cy.get('#mobile-wizard')
-		.should('be.visible');
-
-	// Execute copy
-	cy.get('.ui-header.level-0.mobile-wizard.ui-widget .context-menu-link .menu-entry-with-icon', {timeout : 10000})
-		.contains('Copy')
-		.click();
-
-	// Close warning about clipboard operations
-	cy.get('.vex-dialog-button-primary.vex-dialog-button.vex-first')
-		.click();
-
-	// Wait until it's closed
-	cy.get('.vex-overlay')
-		.should('not.exist');
-
 	cy.log('Copying shape content to clipboard - end.');
 }
 
diff --git a/cypress_test/integration_tests/mobile/writer/apply_font_spec.js b/cypress_test/integration_tests/mobile/writer/apply_font_spec.js
index d09a2e384..f139cfa40 100644
--- a/cypress_test/integration_tests/mobile/writer/apply_font_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/apply_font_spec.js
@@ -66,8 +66,6 @@ describe('Apply font changes.', function() {
 		cy.get('#fontnamecombobox .ui-header-right')
 			.contains('Linux Libertine G');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p font')
@@ -97,8 +95,6 @@ describe('Apply font changes.', function() {
 		cy.get('#fontsizecombobox .ui-header-right')
 			.contains('36');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p font')
@@ -110,8 +106,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Bold')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p b')
@@ -123,8 +117,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Italic')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p i')
@@ -136,8 +128,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Underlineimg')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p u')
@@ -149,8 +139,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Strikeoutimg')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p strike')
@@ -162,8 +150,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Shadowedimg')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		// TODO: Shadowed is not in the clipboard content.
@@ -174,8 +160,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Growimg')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p font')
@@ -187,8 +171,6 @@ describe('Apply font changes.', function() {
 		cy.get('#Shrinkimg')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p font')
@@ -209,8 +191,6 @@ describe('Apply font changes.', function() {
 		cy.get('#mobile-wizard-back')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p font')
@@ -231,8 +211,6 @@ describe('Apply font changes.', function() {
 		cy.get('#mobile-wizard-back')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p font span')
@@ -244,8 +222,6 @@ describe('Apply font changes.', function() {
 		cy.get('#SuperScriptimg')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p sup')
@@ -257,8 +233,6 @@ describe('Apply font changes.', function() {
 		cy.get('#SubScriptimg')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p sub')
diff --git a/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js b/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js
index 7a604b802..c849a3745 100644
--- a/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/apply_paragraph_properties_spec.js
@@ -42,8 +42,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#LeftParaimg')
 			.should('have.class', 'selected');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -55,8 +53,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#CenterPara')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -68,8 +64,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#RightPara')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -81,8 +75,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#JustifyPara')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -94,8 +86,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#ParaRightToLeft')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -114,8 +104,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#ParaLeftToRight')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -131,8 +119,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#DefaultBullet')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container ul li p')
@@ -148,8 +134,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#DefaultNumbering')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container ol li p')
@@ -175,8 +159,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#mobile-wizard-back')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -193,8 +175,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#ParaspaceIncrease')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -217,8 +197,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#ParaspaceDecrease')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -255,8 +233,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#belowparaspacing .spinfield')
 			.should('have.attr', 'value', '0.02');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -274,8 +250,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#IncrementIndent')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -297,8 +271,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#DecrementIndent')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -319,8 +291,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#beforetextindent .spinfield')
 			.should('have.attr', 'value', '0.04');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -341,8 +311,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#aftertextindent .spinfield')
 			.should('have.attr', 'value', '0.04');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
@@ -363,8 +331,6 @@ describe('Apply paragraph properties.', function() {
 		cy.get('#firstlineindent .spinfield')
 			.should('have.attr', 'value', '0.04');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTextToClipboard();
 
 		cy.get('#copy-paste-container p')
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 a12152d23..f252fa5a1 100644
--- a/cypress_test/integration_tests/mobile/writer/table_properties_spec.js
+++ b/cypress_test/integration_tests/mobile/writer/table_properties_spec.js
@@ -60,8 +60,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('.leaflet-marker-icon.table-row-resize-marker')
 			.should('have.length', 4);
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check rows / columns
@@ -91,8 +89,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('.leaflet-marker-icon.table-row-resize-marker')
 			.should('have.length', 4);
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check rows / columns
@@ -122,8 +118,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('.leaflet-marker-icon.table-column-resize-marker')
 			.should('have.length', 4);
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check rows / columns
@@ -153,8 +147,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('.leaflet-marker-icon.table-column-resize-marker')
 			.should('have.length', 4);
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check rows / columns
@@ -184,8 +176,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('.leaflet-marker-icon.table-row-resize-marker')
 			.should('have.length', 2);
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check rows / columns
@@ -215,8 +205,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('.leaflet-marker-icon.table-column-resize-marker')
 			.should('not.exist');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check rows / columns
@@ -279,8 +267,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#MergeCells')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check rows / columns
@@ -311,8 +297,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#rowheight .spinfield')
 			.should('have.attr', 'value', '1.4');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check row height
@@ -341,8 +325,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#columnwidth .spinfield')
 			.should('have.attr', 'value', '5.6');
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check row height
@@ -368,8 +350,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#SetMinimalRowHeight')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check new row height
@@ -394,8 +374,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#SetOptimalRowHeight')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check new row height
@@ -430,8 +408,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#DistributeRows')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check new row height
@@ -466,8 +442,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#SetMinimalColumnWidth')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check new row height
@@ -497,8 +471,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#SetOptimalColumnWidth')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check new row height
@@ -531,8 +503,6 @@ describe('Change table properties / layout via mobile wizard.', function() {
 		cy.get('#DistributeColumns')
 			.click();
 
-		mobileHelper.closeMobileWizard();
-
 		writerHelper.copyTableToClipboard();
 
 		// Check new row height
diff --git a/cypress_test/integration_tests/mobile/writer/writer_helper.js b/cypress_test/integration_tests/mobile/writer/writer_helper.js
index c26d3ee24..6bed4eb38 100644
--- a/cypress_test/integration_tests/mobile/writer/writer_helper.js
+++ b/cypress_test/integration_tests/mobile/writer/writer_helper.js
@@ -14,25 +14,9 @@ function copyTextToClipboard() {
 			expect(marker).to.have.lengthOf(2);
 			var XPos = (marker[0].getBoundingClientRect().right + marker[1].getBoundingClientRect().left) / 2;
 			var YPos = marker[0].getBoundingClientRect().top - 5;
-			mobileHelper.longPressOnDocument(XPos, YPos);
+			mobileHelper.executeCopyFromContextMenu(XPos, YPos);
 		});
 
-	cy.get('#mobile-wizard')
-		.should('be.visible');
-
-	// Execute copy
-	cy.get('.ui-header.level-0.mobile-wizard.ui-widget .context-menu-link .menu-entry-with-icon', {timeout : 10000})
-		.contains('Copy')
-		.click();
-
-	// Close warning about clipboard operations
-	cy.get('.vex-dialog-button-primary.vex-dialog-button.vex-first')
-		.click();
-
-	// Wait until it's closed
-	cy.get('.vex-overlay')
-		.should('not.exist');
-
 	cy.log('Copying text to clipboard - end.');
 }
 
@@ -56,25 +40,9 @@ function copyTableToClipboard() {
 
 			var XPos = startPos.right + 10;
 			var YPos = (startPos.top + endPos.top) / 2;
-			mobileHelper.longPressOnDocument(XPos, YPos);
+			mobileHelper.executeCopyFromContextMenu(XPos, YPos);
 		});
 
-	cy.get('#mobile-wizard')
-		.should('be.visible');
-
-	// Execute copy
-	cy.get('.ui-header.level-0.mobile-wizard.ui-widget .context-menu-link .menu-entry-with-icon')
-		.contains('Copy')
-		.click();
-
-	// Close warning about clipboard operations
-	cy.get('.vex-dialog-button-primary.vex-dialog-button.vex-first')
-		.click();
-
-	// Wait until it's closed
-	cy.get('.vex-overlay')
-		.should('not.exist');
-
 	cy.log('Copying table to clipboard - end.');
 }
 


More information about the Libreoffice-commits mailing list