summaryrefslogtreecommitdiffstats
path: root/cypress_test/integration_tests/common/mobile_helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'cypress_test/integration_tests/common/mobile_helper.js')
-rw-r--r--cypress_test/integration_tests/common/mobile_helper.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/cypress_test/integration_tests/common/mobile_helper.js b/cypress_test/integration_tests/common/mobile_helper.js
index 0b03959bd9..36842e1e8c 100644
--- a/cypress_test/integration_tests/common/mobile_helper.js
+++ b/cypress_test/integration_tests/common/mobile_helper.js
@@ -230,6 +230,7 @@ function closeInsertionWizard() {
cy.log('Closing insertion wizard - end.');
}
+/// deprecated: see selectFromColorPicker function instead
function selectFromColorPalette(paletteNum, groupNum, paletteAfterChangeNum, colorNum) {
cy.log('Selecting a color from the color palette - start.');
@@ -251,6 +252,27 @@ function selectFromColorPalette(paletteNum, groupNum, paletteAfterChangeNum, col
cy.log('Selecting a color from the color palette - end.');
}
+function selectFromColorPicker(pickerId, groupNum, colorNum) {
+ cy.log('Selecting a color from the color palette - start.');
+
+ cy.get(pickerId + ' [id^=color-picker-][id$=-basic-color-' + groupNum.toString() + ']')
+ .click();
+
+ cy.wait(1000);
+
+ if (colorNum !== undefined) {
+ cy.get(pickerId + ' [id^=color-picker-][id$=-tint-' + colorNum.toString() + ']')
+ .click();
+ }
+
+ cy.wait(1000);
+
+ cy.get('#mobile-wizard-back')
+ .click();
+
+ cy.log('Selecting a color from the color palette - end.');
+}
+
function openTextPropertiesPanel() {
openMobileWizard();
@@ -391,6 +413,7 @@ module.exports.executeCopyFromContextMenu = executeCopyFromContextMenu;
module.exports.openInsertionWizard = openInsertionWizard;
module.exports.closeInsertionWizard = closeInsertionWizard;
module.exports.selectFromColorPalette = selectFromColorPalette;
+module.exports.selectFromColorPicker = selectFromColorPicker;
module.exports.openTextPropertiesPanel = openTextPropertiesPanel;
module.exports.selectListBoxItem = selectListBoxItem;
module.exports.selectListBoxItem2 = selectListBoxItem2;