Remove clickOnIdle and inputOnIdle

Replace helper.clickOnIdle(selector) with cy.cGet(selector).click()
Replace helper.inputOnIdle(selector,text) with
helper.typeIntoInputField(selector,text)

Also replaced waits before clicks with a disabled check

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I2db36737e61271285cd474c1ffd549d285286133
pull/8831/head
Neil Guertin 2024-04-18 15:46:32 -04:00 committed by Neil Guertin
parent f8f15a139a
commit 85024eeb99
29 changed files with 238 additions and 295 deletions

View File

@ -799,53 +799,6 @@ function waitUntilIdle(selector, content) {
}
}
// Waits for the DOM element to be idle and clicks on it afterward.
// This is a workaround to avoid 'item detached from DOM'
// failures caused by GUI flickering.
// GUI flickering might mean bad design, but
// until it's fixed we can use this method.
// Known GUI flickering:
// * mobile wizard
// IMPORTANT: don't use this if there is no flickering.
// Use simple click() instead. This method is much slower.
// Parameters:
// selector - a CSS selector to query a DOM element to wait on to be idle.
// content - a string, a content selector used by cy.contains() to select the correct DOM element.
// waitingTime - how much time to wait before we say the item is idle.
function clickOnIdle(selector, content) {
// waitUntilIdle has been stubbed and clickOnIdle will be removed soon.
// Find a specific condition to wait for using waitUntil, or even better use Cypress's
// built-in retrying functionality on find, should, and other functions.
// Then call .click() directly from the test
cy.log('clickOnIdle stubbed');
if (content) {
cy.cGet(selector, content).should('not.have.attr', 'disabled');
cy.cGet(selector, content).click();
} else {
cy.cGet(selector).should('not.have.attr', 'disabled');
cy.cGet(selector).click();
}
}
// Waits for the DOM element to be idle and types into it afterward.
// See also the comments at clickOnIdle() method.
// Parameters:
// selector - a CSS selector to query a DOM element to wait on to be idle.
// input - text to be typed into the selected DOM element.
// waitingTime - how much time to wait before we say the item is idle.
function inputOnIdle(selector, input) {
// waitUntilIdle has been stubbed and inputOnIdle will be removed soon.
// Find a specific condition to wait for using waitUntil, or even better use Cypress's
// built-in retrying functionality on find, should, and other functions.
// Then call .type() directly from the test
cy.log('inputOnIdle stubbed');
cy.cGet(selector)
.clear()
.type(input)
.type('{enter}');
}
// Run a code snippet if we are in a mobile test.
function doIfOnMobile(callback) {
cy.window({log: false})
@ -1258,8 +1211,6 @@ module.exports.beforeAll = beforeAll;
module.exports.typeText = typeText;
module.exports.isImageWhite = isImageWhite;
module.exports.isCanvasWhite = isCanvasWhite;
module.exports.clickOnIdle = clickOnIdle;
module.exports.inputOnIdle = inputOnIdle;
module.exports.waitUntilIdle = waitUntilIdle;
module.exports.doIfOnMobile = doIfOnMobile;
module.exports.doIfOnDesktop = doIfOnDesktop;

View File

@ -244,7 +244,7 @@ function openTextPropertiesPanel() {
openMobileWizard();
helper.clickOnIdle('#TextPropertyPanel');
cy.cGet('#TextPropertyPanel').click();
cy.cGet('#Bold').should('be.visible');
@ -290,9 +290,9 @@ function selectAnnotationMenuItem(menuItem) {
function selectListBoxItem(listboxSelector, item) {
cy.log('>> selectListBoxItem - start');
helper.clickOnIdle(listboxSelector);
cy.cGet(listboxSelector).click();
helper.clickOnIdle('.mobile-wizard.ui-combobox-text', item);
cy.cGet('.mobile-wizard.ui-combobox-text', item).click();
// Combobox entry contains the selected item
cy.cGet(listboxSelector + ' .ui-header-right .entry-value')
@ -304,14 +304,14 @@ function selectListBoxItem(listboxSelector, item) {
function selectListBoxItem2(listboxSelector, item) {
cy.log('>> selectListBoxItem2 - start');
helper.clickOnIdle(listboxSelector);
cy.cGet(listboxSelector).click();
var endPos = listboxSelector.indexOf(' ');
if (endPos < 0)
endPos = listboxSelector.length;
var parentId = listboxSelector.substring(0, endPos);
helper.clickOnIdle(parentId + ' .ui-combobox-text', item);
cy.cGet(parentId + ' .ui-combobox-text', item).click();
cy.cGet(listboxSelector + ' .ui-header-left')
.should('have.text', item);

View File

@ -22,7 +22,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'AutoFilter', function() {
function toggleAutofilter() {
//enable/disable autofilter
helper.clickOnIdle('#menu-data');
cy.cGet('#menu-data').click();
cy.cGet('body').contains('#menu-data li', 'AutoFilter').click();
}

View File

@ -10,7 +10,7 @@ describe(['tagdesktop', 'tagproxy'], 'macro dialog tests', function() {
cy.get('#MacroWarnMedium.jsdialog')
.should('exist');
helper.clickOnIdle('#MacroWarnMedium.jsdialog #ok');
cy.cGet('#MacroWarnMedium.jsdialog #ok').click();
}
beforeEach(function() {

View File

@ -64,7 +64,7 @@ describe.skip(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Open different file t
cy.cGet('form.jsdialog-container.lokdialog_container').should('exist');
helper.clickOnIdle('.ui-pushbutton.jsdialog.button-primary');
cy.cGet('.ui-pushbutton.jsdialog.button-primary').click();
//check doc is loaded
cy.cGet('.leaflet-canvas-container canvas', {timeout : Cypress.config('defaultCommandTimeout') * 2.0});

View File

@ -27,11 +27,11 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Sheet Operations.', functi
calcHelper.ensureViewContainsCellCursor();
cy.cGet('#spreadsheet-toolbar #insertsheet').click();
calcHelper.assertNumberofSheets(2);
helper.clickOnIdle('#spreadsheet-tab1');
cy.cGet('#spreadsheet-tab1').click();
calcHelper.ensureViewContainsCellCursor();
helper.typeIntoInputField('input#addressInput', 'A200');
calcHelper.ensureViewContainsCellCursor();
helper.clickOnIdle('#spreadsheet-tab0');
cy.cGet('#spreadsheet-tab0').click();
calcHelper.ensureViewContainsCellCursor();
});

View File

@ -85,7 +85,7 @@ describe.skip(['tagdesktop'], 'Scroll through document, insert/delete items', fu
it('Insert/delete updated on Navigator', function() {
//create a new page
helper.clickOnIdle('#presentation-toolbar #insertpage');
cy.cGet('#presentation-toolbar #insertpage').click();
cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Page 5').should('exist');
cy.cGet('#toolbar-up > .w2ui-scroll-right').click();

View File

@ -85,7 +85,7 @@ describe.skip(['tagdesktop'], 'Scroll through document, insert/delete items', fu
it('Insert/delete updated on Navigator', function() {
//create a new sheet
helper.clickOnIdle('#presentation-toolbar #insertpage');
cy.cGet('#presentation-toolbar #insertpage').click();
cy.cGet('#tree').contains('.jsdialog.sidebar.ui-treeview-cell-text', 'Slide 5').should('exist');
cy.cGet('#toolbar-up > .w2ui-scroll-right').click();

View File

@ -19,14 +19,14 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Slide operations', functio
});
it('Add slides', function() {
helper.clickOnIdle('#presentation-toolbar #insertpage');
cy.cGet('#presentation-toolbar #insertpage').click();
impressHelper.assertNumberOfSlidePreviews(2);
});
it('Remove slides', function() {
// Add slides
helper.clickOnIdle('#presentation-toolbar #insertpage');
cy.cGet('#presentation-toolbar #insertpage').click();
impressHelper.assertNumberOfSlidePreviews(2);
@ -51,7 +51,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Slide operations', functio
cy.cGet('#options-modify-page').click();
desktopHelper.insertComment();
cy.cGet('#annotation-content-area-1').should('include.text', 'some text0');
helper.clickOnIdle('#presentation-toolbar #duplicatepage');
cy.cGet('#presentation-toolbar #duplicatepage').click();
impressHelper.assertNumberOfSlidePreviews(2);
cy.cGet('#SlideStatus').should('have.text', 'Slide 2 of 2');

View File

@ -42,7 +42,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
cy.cGet('#title.ui-edit').should('have.value', 'New Title');
cy.cGet('#comments.ui-textarea').should('have.value', 'New');
helper.clickOnIdle('#cancel.ui-pushbutton');
cy.cGet('#cancel.ui-pushbutton').click();
});
it.skip('Add Custom Property.', function() {
@ -51,7 +51,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
cy.wait(200);
// Add property
helper.clickOnIdle('.ui-pushbutton', 'Add Property');
cy.cGet('.ui-pushbutton', 'Add Property').click();
helper.waitUntilIdle('#namebox');
cy.cGet('#namebox select').select('Mailstop');
@ -64,21 +64,21 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
cy.cGet('#customprops-tab-label').click();
cy.cGet('#valueedit.ui-edit').should('have.value', '123 Address');
helper.clickOnIdle('#cancel.ui-pushbutton');
cy.cGet('#cancel.ui-pushbutton').click();
});
it.skip('Add Custom Duration Property.', function() {
writerHelper.openFileProperties();
helper.clickOnIdle('#customprops-tab-label');
cy.cGet('#customprops-tab-label').click();
cy.wait(200);
// Add property
helper.clickOnIdle('.ui-pushbutton', 'Add Property');
cy.cGet('.ui-pushbutton', 'Add Property').click();
helper.waitUntilIdle('#namebox');
cy.cGet('#namebox select').select('Received from');
helper.waitUntilIdle('#typebox');
cy.cGet('#typebox select').select('Duration');
helper.clickOnIdle('#durationbutton');
cy.cGet('#durationbutton').click();
cy.cGet('#negative-input').check();
cy.cGet('#years-input').type('1');
cy.cGet('#days-input').type('2');
@ -90,9 +90,9 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
// Check property saved
writerHelper.openFileProperties();
helper.clickOnIdle('#customprops-tab-label');
cy.cGet('#customprops-tab-label').click();
cy.cGet('#duration.ui-edit').should('have.value', '- Y: 1 M: 0 D: 2 H: 0 M: 0 S: 3');
helper.clickOnIdle('#cancel.ui-pushbutton');
cy.cGet('#cancel.ui-pushbutton').click();
});
it.skip('Add Custom Yes/No Property.', function() {
@ -101,7 +101,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
cy.wait(200);
// Add property
helper.clickOnIdle('.ui-pushbutton', 'Add Property');
cy.cGet('.ui-pushbutton', 'Add Property').click();
helper.waitUntilIdle('#namebox');
cy.cGet('#namebox select').select('Telephone number');
helper.waitUntilIdle('#typebox');
@ -114,6 +114,6 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'File Property Tests', func
writerHelper.openFileProperties();
cy.cGet('#customprops-tab-label').click();
cy.cGet('#yes-input').should('be.checked');
helper.clickOnIdle('#cancel.ui-pushbutton');
cy.cGet('#cancel.ui-pushbutton').click();
});
});
});

View File

@ -29,7 +29,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
it('Insert row before.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#insert .unoInsertRowsBefore');
cy.cGet('#insert .unoInsertRowsBefore').click();
cy.cGet('.leaflet-marker-icon.table-row-resize-marker').should('have.length', 4);
selectFullTable();
@ -46,7 +46,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
it('Insert row after.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#insert .unoInsertRowsAfter');
cy.cGet('#insert .unoInsertRowsAfter').click();
cy.cGet('.leaflet-marker-icon.table-row-resize-marker').should('have.length', 4);
selectFullTable();
@ -64,7 +64,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
it('Insert column before.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#insert .unoInsertColumnsBefore');
cy.cGet('#insert .unoInsertColumnsBefore').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('have.length', 4);
@ -83,7 +83,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
it('Insert column after.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#insert .unoInsertColumnsAfter');
cy.cGet('#insert .unoInsertColumnsAfter').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('have.length', 4);
@ -101,7 +101,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
it('Delete row.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#delete .unoDeleteRows');
cy.cGet('#delete .unoDeleteRows').click();
cy.cGet('.leaflet-marker-icon.table-row-resize-marker').should('have.length', 2);
@ -119,17 +119,17 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
it('Delete column.', function() {
// Insert column first
helper.clickOnIdle('#insert .unoInsertColumnsBefore');
cy.cGet('#insert .unoInsertColumnsBefore').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('have.length', 4);
// Then delete it
helper.clickOnIdle('#delete .unoDeleteColumns');
cy.cGet('#delete .unoDeleteColumns').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('have.length', 3);
});
it('Delete table.', function() {
helper.clickOnIdle('#delete .unoDeleteTable');
cy.cGet('#delete .unoDeleteTable').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('not.exist');
});
@ -147,7 +147,9 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
// With merging two rows, the cursor is moved into the first row.
cy.get('@origCursorPos')
.then(function(origCursorPos) {
helper.clickOnIdle('#split_merge .unoMergeCells');
cy.cGet('#split_merge .unoMergeCells').should('not.have.attr', 'disabled');
cy.cGet('#split_merge .unoMergeCells').click();
cy.cGet('.blinking-cursor')
.should(function(cursor) {
@ -191,9 +193,8 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
helper.moveCursor('down', 'shift');
helper.moveCursor('right', 'shift');
cy.wait(200);
helper.clickOnIdle('#rowsizing .unoSetOptimalRowHeight');
helper.clickOnIdle('#rowsizing .unoSetMinimalRowHeight');
cy.cGet('#rowsizing .unoSetOptimalRowHeight').click();
cy.cGet('#rowsizing .unoSetMinimalRowHeight').click();
selectFullTable();
@ -208,8 +209,8 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
helper.moveCursor('down', 'shift');
helper.moveCursor('right', 'shift');
cy.wait(200);
helper.clickOnIdle('#rowsizing .unoSetOptimalRowHeight');
cy.cGet('#rowsizing .unoSetOptimalRowHeight').should('not.have.attr','disabled');
cy.cGet('#rowsizing .unoSetOptimalRowHeight').click();
selectFullTable();
// Check new row height
@ -232,8 +233,8 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
helper.moveCursor('down', 'shift');
helper.moveCursor('right', 'shift');
cy.wait(200);
helper.clickOnIdle('#rowsizing .unoDistributeRows');
cy.cGet('#rowsizing .unoDistributeRows').should('not.have.attr','disabled');
cy.cGet('#rowsizing .unoDistributeRows').click();
selectFullTable();
@ -257,8 +258,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
helper.moveCursor('down', 'shift');
helper.moveCursor('right', 'shift');
cy.wait(200);
helper.clickOnIdle('#columnsizing .unoSetMinimalColumnWidth');
cy.cGet('#columnsizing .unoSetMinimalColumnWidth').click();
selectFullTable();
@ -272,8 +272,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
helper.moveCursor('down', 'shift');
helper.moveCursor('right', 'shift');
cy.wait(200);
helper.clickOnIdle('#columnsizing .unoSetOptimalColumnWidth');
cy.cGet('#columnsizing .unoSetOptimalColumnWidth').click();
selectFullTable();
@ -288,8 +287,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Table operations', functio
helper.moveCursor('down', 'shift');
helper.moveCursor('right', 'shift');
cy.wait(200);
helper.clickOnIdle('#columnsizing .unoDistributeColumns');
cy.cGet('#columnsizing .unoDistributeColumns').click();
selectFullTable();

View File

@ -384,13 +384,8 @@ describe(['tagdesktop'], 'Top toolbar tests.', function() {
cy.cGet('.ui-dialog-title').should('have.text', 'Special Characters');
// FIXME: dialog is not async, shows popup
helper.waitUntilIdle('#favchar1');
cy.cGet('#favchar1').click({force: true});
helper.waitUntilIdle('#SpecialCharactersDialog .ui-pushbutton.jsdialog.button-primary');
cy.cGet('#SpecialCharactersDialog .ui-pushbutton.jsdialog.button-primary').click({force: true});
// FIXME: CHANGE ABOVE TO:
// helper.clickOnIdle('#favchar1');
// helper.clickOnIdle('.ui-pushbutton.jsdialog.button-primary');
//helper.expectTextForClipboard('€');
});

View File

@ -41,7 +41,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ScAlignmentPropertyPanel');
cy.cGet('#ScAlignmentPropertyPanel').click();
cy.cGet('.unoAlignLeft').should('be.visible');
}
@ -50,7 +50,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
openAlignmentPaneForFirstCell();
// Set right aligment first
helper.clickOnIdle('.unoAlignRight');
cy.cGet('.unoAlignRight').click();
calcHelper.selectEntireSheet();
@ -62,9 +62,9 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ScAlignmentPropertyPanel');
cy.cGet('#ScAlignmentPropertyPanel').click();
helper.clickOnIdle('.unoAlignLeft');
cy.cGet('.unoAlignLeft').click();
calcHelper.selectEntireSheet();
@ -75,7 +75,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
it('Align to center horizontally.', function() {
openAlignmentPaneForFirstCell();
helper.clickOnIdle('.unoAlignHorizontalCenter');
cy.cGet('.unoAlignHorizontalCenter').click();
calcHelper.selectEntireSheet();
@ -86,7 +86,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
it('Change to block alignment.', function() {
openAlignmentPaneForFirstCell();
helper.clickOnIdle('.unoAlignBlock');
cy.cGet('.unoAlignBlock').click();
calcHelper.selectEntireSheet();
@ -97,21 +97,20 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
it('Right-to-left and left-to-right writing mode.', function() {
openAlignmentPaneForFirstCell();
helper.clickOnIdle('.unoParaRightToLeft');
cy.cGet('.unoParaRightToLeft').click();
// TODO: we don't have a way of testing this
// copy container doesn't have info about this
cy.wait(500);
cy.wait(100);
helper.clickOnIdle('.unoParaLeftToRight');
cy.cGet('.unoParaLeftToRight').click();
cy.wait(500);
});
it('Align to the top and to bottom.', function() {
openAlignmentPaneForFirstCell();
helper.clickOnIdle('.unoAlignTop');
cy.cGet('.unoAlignTop').click();
calcHelper.selectEntireSheet();
@ -123,9 +122,9 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ScAlignmentPropertyPanel');
cy.cGet('#ScAlignmentPropertyPanel').click();
helper.clickOnIdle('.unoAlignBottom');
cy.cGet('.unoAlignBottom').click();
calcHelper.selectEntireSheet();
@ -136,7 +135,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
it('Align to center vertically.', function() {
openAlignmentPaneForFirstCell();
helper.clickOnIdle('.unoAlignVCenter');
cy.cGet('.unoAlignVCenter').click();
calcHelper.selectEntireSheet();
@ -152,7 +151,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
openAlignmentPaneForFirstCell();
// Increase indent
helper.clickOnIdle('#IncrementIndent');
cy.cGet('#IncrementIndent').click();
getTextEndPosForFirstCell();
cy.get('@currentTextEndPos')
@ -162,7 +161,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
// Decrease indent
openAlignmentPaneForFirstCell();
helper.clickOnIdle('#DecrementIndent');
cy.cGet('#DecrementIndent').click();
getTextEndPosForFirstCell();
// We use the text position as indicator
@ -183,7 +182,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
openAlignmentPaneForFirstCell();
cy.cGet('input#wraptext').should('not.have.prop', 'checked', true);
helper.clickOnIdle('input#wraptext');
cy.cGet('input#wraptext').click();
cy.cGet('input#wraptext').should('have.prop', 'checked', true);
// We use the text position as indicator
@ -200,7 +199,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
cy.cGet('input#stacked').should('not.have.prop', 'checked', true);
helper.clickOnIdle('input#stacked');
cy.cGet('input#stacked').click();
cy.cGet('input#stacked').should('have.prop', 'checked', true);
@ -219,13 +218,13 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change alignment setti
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ScAlignmentPropertyPanel');
cy.cGet('#ScAlignmentPropertyPanel').click();
cy.cGet('.unoAlignLeft').should('be.visible');
cy.cGet('input#mergecells').should('not.have.attr', 'disabled');
// Click merge cells
cy.cGet('input#mergecells').should('not.have.prop', 'checked', true);
helper.clickOnIdle('input#mergecells');
cy.cGet('input#mergecells').click();
cy.cGet('input#mergecells').should('have.prop', 'checked', true);
// Check content
calcHelper.selectCellsInRange('A1:CV1');

View File

@ -26,7 +26,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font changes.', funct
it('Apply bold.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#Bold');
cy.cGet('#Bold').click();
calcHelper.selectEntireSheet();
helper.copy();
cy.cGet('#copy-paste-container table td b').should('exist');
@ -34,7 +34,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font changes.', funct
it('Apply italic.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#Italic');
cy.cGet('#Italic').click();
calcHelper.selectEntireSheet();
helper.copy();
cy.cGet('#copy-paste-container table td i').should('exist');
@ -42,7 +42,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font changes.', funct
it('Apply underline.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#Underline');
cy.cGet('#Underline').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -53,7 +53,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font changes.', funct
it('Apply strikeout.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#Strikeout');
cy.cGet('#Strikeout').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -63,7 +63,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font changes.', funct
});
it('Apply shadowed.', function() {
helper.clickOnIdle('#Shadowed');
cy.cGet('#Shadowed').click();
calcHelper.selectEntireSheet();
@ -98,7 +98,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font changes.', funct
it('Apply font color.', function() {
helper.setDummyClipboardForCopy();
helper.clickOnIdle('#Color .ui-header');
cy.cGet('#Color .ui-header').click();
mobileHelper.selectFromColorPicker('#Color', 5);

View File

@ -22,7 +22,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
function openAppearencePanel() {
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ScCellAppearancePropertyPanel');
cy.cGet('#ScCellAppearancePropertyPanel').click();
cy.cGet('body').contains('.menu-entry-with-icon', 'Background Color')
.should('be.visible');
@ -44,7 +44,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
helper.setDummyClipboardForCopy();
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#BackgroundColor');
cy.cGet('#BackgroundColor').click();
mobileHelper.selectFromColorPicker('#BackgroundColor', 2);
@ -63,7 +63,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
helper.setDummyClipboardForCopy();
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#border-2');
cy.cGet('#border-2').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -77,7 +77,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
openAppearencePanelOnFirstCell();
// First add left border
helper.clickOnIdle('#border-2');
cy.cGet('#border-2').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -88,7 +88,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
// Then remove it
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#border-1');
cy.cGet('#border-1').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -101,7 +101,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
helper.setDummyClipboardForCopy();
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#border-3');
cy.cGet('#border-3').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -114,7 +114,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
helper.setDummyClipboardForCopy();
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#border-4');
cy.cGet('#border-4').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -127,7 +127,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
helper.setDummyClipboardForCopy();
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#border-5');
cy.cGet('#border-5').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -140,7 +140,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
helper.setDummyClipboardForCopy();
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#border-6');
cy.cGet('#border-6').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -153,7 +153,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
helper.setDummyClipboardForCopy();
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#border-7');
cy.cGet('#border-7').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -166,7 +166,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
helper.setDummyClipboardForCopy();
openAppearencePanelOnFirstCell();
helper.clickOnIdle('#border-8');
cy.cGet('#border-8').click();
calcHelper.selectEntireSheet();
helper.copy();
@ -178,7 +178,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
it.skip('Apply horizontal borders for multiple cells', function() {
openAppearencePanelOnAllCells();
helper.clickOnIdle('#border-9');
cy.cGet('#border-9').click();
calcHelper.selectEntireSheet();
@ -194,7 +194,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
it.skip('Apply horizontal inner borders and vertical outer borders', function() {
openAppearencePanelOnAllCells();
helper.clickOnIdle('#border-10');
cy.cGet('#border-10').click();
calcHelper.selectEntireSheet();
@ -213,7 +213,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
it.skip('Apply vertical inner borders and horizontal outer borders', function() {
openAppearencePanelOnAllCells();
helper.clickOnIdle('#border-11');
cy.cGet('#border-11').click();
calcHelper.selectEntireSheet();
@ -232,7 +232,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
it.skip('Apply all inner and outer borders', function() {
openAppearencePanelOnAllCells();
helper.clickOnIdle('#border-12');
cy.cGet('#border-12').click();
calcHelper.selectEntireSheet();
@ -249,7 +249,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change cell appearance.', f
openAppearencePanelOnFirstCell();
// Apply left border first
helper.clickOnIdle('#border-2');
cy.cGet('#border-2').click();
// Then apply border color
cy.cGet('#FrameLineColor')

View File

@ -64,9 +64,9 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Chart tests.', function() {
it.skip('Change chart type.', function() {
stepIntoChartEditing();
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ChartTypePanel');
helper.clickOnIdle('#cmb_chartType');
helper.clickOnIdle('.ui-combobox-text', 'Pie');
cy.cGet('#ChartTypePanel').click();
cy.cGet('#cmb_chartType').click();
cy.cGet('.ui-combobox-text', 'Pie').click();
// TODO: this leads to crash?
//mobileHelper.closeMobileWizard();

View File

@ -159,9 +159,9 @@ describe.skip(['tagmobile'], 'Trigger hamburger menu options.', function() {
// Search bar become visible
cy.cGet('#mobile-wizard-content').should('not.be.empty');
// Search for some word
helper.inputOnIdle('#searchterm', 'a');
helper.typeIntoInputField('#searchterm', 'a');
cy.cGet('#search').should('not.have.attr', 'disabled');
helper.clickOnIdle('#search');
cy.cGet('#search').click();
// First cell should be selected
cy.cGet('input#addressInput').should('have.prop', 'value', 'A1');
});

View File

@ -117,7 +117,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply number formattin
cy.cGet('.unoNumberFormatDecimal').should('be.visible');
// Change to number formatting
helper.clickOnIdle('.unoNumberFormatDecimal');
cy.cGet('.unoNumberFormatDecimal').click();
cy.cGet('.unoNumberFormatDecimal').should('have.class', 'selected');
cy.cGet('#numberformatcombobox .ui-header-left').should('have.text', 'Number');
@ -310,7 +310,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply number formattin
.should('not.have.prop', 'checked', true);
// Change the option
helper.clickOnIdle('#negativenumbersred input');
cy.cGet('#negativenumbersred input').click();
cy.cGet('#negativenumbersred input')
.should('have.prop', 'checked', true);
@ -332,7 +332,7 @@ describe.skip(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply number formattin
.should('not.have.prop', 'checked', true);
// Change the option
helper.clickOnIdle('#thousandseparator input');
cy.cGet('#thousandseparator input').click();
cy.cGet('#thousandseparator input')
.should('have.prop', 'checked', true);

View File

@ -28,7 +28,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
it('Apply bold on text shape.', function() {
mobileHelper.openTextPropertiesPanel();
helper.clickOnIdle('#Bold');
cy.cGet('#Bold').click();
triggerNewSVG();
@ -39,7 +39,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
it('Apply italic on text shape.', function() {
mobileHelper.openTextPropertiesPanel();
helper.clickOnIdle('#Italic');
cy.cGet('#Italic').click();
triggerNewSVG();
@ -50,7 +50,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
it('Apply underline on text shape.', function() {
mobileHelper.openTextPropertiesPanel();
helper.clickOnIdle('#Underline');
cy.cGet('#Underline').click();
triggerNewSVG();
@ -61,7 +61,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
it('Apply strikeout on text shape.', function() {
mobileHelper.openTextPropertiesPanel();
helper.clickOnIdle('#Strikeout');
cy.cGet('#Strikeout').click();
triggerNewSVG();
@ -72,7 +72,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
it('Apply shadowed on text shape.', function() {
mobileHelper.openTextPropertiesPanel();
helper.clickOnIdle('#Shadowed');
cy.cGet('#Shadowed').click();
triggerNewSVG();
@ -108,7 +108,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
mobileHelper.openTextPropertiesPanel();
helper.clickOnIdle('#Color .ui-header');
cy.cGet('#Color .ui-header').click();
mobileHelper.selectFromColorPicker('#Color', 5, 2);
@ -124,7 +124,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
cy.cGet('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph .TextPosition tspan')
.should('not.have.attr', 'font-color');
helper.clickOnIdle('#CharBackColor');
cy.cGet('#CharBackColor').click();
mobileHelper.selectFromColorPicker('#CharBackColor', 2, 2);
@ -149,7 +149,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
cy.cGet('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph .TextPosition tspan')
.should('have.attr', 'font-size', '635px');
helper.clickOnIdle('#SuperScript');
cy.cGet('#SuperScript').click();
triggerNewSVG();
@ -167,7 +167,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
cy.cGet('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph .TextPosition tspan')
.should('have.attr', 'font-size', '635px');
helper.clickOnIdle('#SubScript');
cy.cGet('#SubScript').click();
triggerNewSVG();
@ -184,7 +184,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
cy.cGet('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph .TextPosition tspan')
.should('have.attr', 'font-size', '635px');
helper.clickOnIdle('#SuperScript');
cy.cGet('#SuperScript').click();
triggerNewSVG();
@ -194,7 +194,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font on selected shap
// Remove direct formatting
mobileHelper.openTextPropertiesPanel();
helper.clickOnIdle('#defaultattr .unoSetDefault');
cy.cGet('#defaultattr .unoSetDefault').click();
triggerNewSVG();

View File

@ -33,7 +33,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
function openParagraphPropertiesPanel() {
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ParaPropertyPanel');
cy.cGet('#ParaPropertyPanel').click();
cy.cGet('.unoParaLeftToRight').should('be.visible');
}
@ -41,7 +41,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
function openListsPropertiesPanel() {
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ListsPropertyPanel');
cy.cGet('#ListsPropertyPanel').click();
cy.cGet('.unoDefaultBullet').should('be.visible');
}
@ -53,7 +53,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Set right alignment first
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoRightPara');
cy.cGet('.unoRightPara').click();
triggerNewSVG();
@ -63,7 +63,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Set left alignment
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoLeftPara');
cy.cGet('.unoLeftPara').click();
triggerNewSVG();
@ -77,7 +77,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoCenterPara');
cy.cGet('.unoCenterPara').click();
triggerNewSVG();
@ -92,7 +92,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Set right alignment first
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoRightPara');
cy.cGet('.unoRightPara').click();
triggerNewSVG();
@ -102,7 +102,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Then set justified alignment
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoJustifyPara');
cy.cGet('.unoJustifyPara').click();
triggerNewSVG();
@ -117,7 +117,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Set bottom alignment first
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoCellVertBottom');
cy.cGet('.unoCellVertBottom').click();
triggerNewSVG();
@ -127,7 +127,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Then set top alignment
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoCellVertTop');
cy.cGet('.unoCellVertTop').click();
triggerNewSVG();
@ -141,7 +141,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoCellVertCenter');
cy.cGet('.unoCellVertCenter').click();
triggerNewSVG();
@ -156,7 +156,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openListsPropertiesPanel();
helper.clickOnIdle('#ListsPropertyPanel .unoDefaultBullet');
cy.cGet('#ListsPropertyPanel .unoDefaultBullet').click();
triggerNewSVG();
@ -171,7 +171,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openListsPropertiesPanel();
helper.clickOnIdle('#ListsPropertyPanel .unoDefaultNumbering');
cy.cGet('#ListsPropertyPanel .unoDefaultNumbering').click();
triggerNewSVG();

View File

@ -28,7 +28,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
function openParagraphPropertiesPanel() {
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ParaPropertyPanel');
cy.cGet('#ParaPropertyPanel').click();
cy.cGet('.unoParaLeftToRight').should('be.visible');
}
@ -36,7 +36,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
function openListsPropertiesPanel() {
mobileHelper.openMobileWizard();
helper.clickOnIdle('#ListsPropertyPanel');
cy.cGet('#ListsPropertyPanel').click();
cy.cGet('.unoDefaultBullet').should('be.visible');
}
@ -50,7 +50,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Set right alignment first
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoRightPara');
cy.cGet('.unoRightPara').click();
triggerNewSVG();
@ -62,7 +62,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoLeftPara');
cy.cGet('.unoLeftPara').click();
triggerNewSVG();
@ -78,7 +78,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoCenterPara');
cy.cGet('.unoCenterPara').click();
triggerNewSVG();
@ -95,7 +95,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Set right alignment first
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoRightPara');
cy.cGet('.unoRightPara').click();
triggerNewSVG();
@ -107,7 +107,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Then set justified alignment
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoJustifyPara');
cy.cGet('.unoJustifyPara').click();
triggerNewSVG();
@ -124,7 +124,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Set bottom alignment first
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoCellVertBottom');
cy.cGet('.unoCellVertBottom').click();
triggerNewSVG();
@ -136,7 +136,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
// Then set top alignment
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoCellVertTop');
cy.cGet('.unoCellVertTop').click();
triggerNewSVG();
@ -152,7 +152,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoCellVertCenter');
cy.cGet('.unoCellVertCenter').click();
triggerNewSVG();
@ -171,7 +171,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openListsPropertiesPanel();
helper.clickOnIdle('#ListsPropertyPanel .unoDefaultBullet');
cy.cGet('#ListsPropertyPanel .unoDefaultBullet').click();
triggerNewSVG();
@ -188,7 +188,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openListsPropertiesPanel();
helper.clickOnIdle('#ListsPropertyPanel .unoDefaultNumbering');
cy.cGet('#ListsPropertyPanel .unoDefaultNumbering').click();
triggerNewSVG();
@ -238,7 +238,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoParaspaceIncrease');
cy.cGet('.unoParaspaceIncrease').click();
triggerNewSVG();
@ -249,7 +249,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoParaspaceDecrease');
cy.cGet('.unoParaspaceDecrease').click();
triggerNewSVG();
@ -266,7 +266,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoParaRightToLeft');
cy.cGet('.unoParaRightToLeft').click();
triggerNewSVG();
@ -278,7 +278,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openParagraphPropertiesPanel();
helper.clickOnIdle('.unoParaLeftToRight');
cy.cGet('.unoParaLeftToRight').click();
triggerNewSVG();
@ -296,7 +296,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openListsPropertiesPanel();
helper.clickOnIdle('#ListsPropertyPanel .unoDefaultBullet');
cy.cGet('#ListsPropertyPanel .unoDefaultBullet').click();
triggerNewSVG();
@ -310,7 +310,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openListsPropertiesPanel();
helper.clickOnIdle('.unoOutlineRight');
cy.cGet('.unoOutlineRight').click();
triggerNewSVG();
@ -322,7 +322,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply paragraph properties
openListsPropertiesPanel();
helper.clickOnIdle('.unoOutlineLeft');
cy.cGet('.unoOutlineLeft').click();
triggerNewSVG();

View File

@ -227,12 +227,12 @@ describe.skip(['tagmobile'], 'Trigger hamburger menu options.', function() {
.should('not.be.empty');
// Search for some word
helper.inputOnIdle('#searchterm', 'X');
helper.typeIntoInputField('#searchterm', 'X');
cy.cGet('#search')
.should('not.have.attr', 'disabled');
helper.clickOnIdle('#search');
cy.cGet('#search').click();
// A shape and some text should be selected
//cy.get('.transform-handler--rotate')

View File

@ -27,7 +27,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
}
function switchToMasterView() {
helper.clickOnIdle('#masterslidebutton');
cy.cGet('#masterslidebutton').click();
cy.cGet('#closemasterslide').should('exist');
previewShouldBeFullWhite(false);
}
@ -42,7 +42,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
.should('have.attr', 'style', 'background-color: rgb(114, 159, 207);');
// Change the color
helper.clickOnIdle('#fillattr');
cy.cGet('#fillattr').click();
mobileHelper.selectFromColorPalette(0, 5);
@ -69,11 +69,11 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
cy.cGet('#fillattr3 .color-sample-selected').should('have.attr', 'style', 'background-color: rgb(255, 215, 215);');
// Change the colors
helper.clickOnIdle('#fillattr2');
cy.cGet('#fillattr2').click();
mobileHelper.selectFromColorPalette(0, 2);
helper.clickOnIdle('#fillattr3');
cy.cGet('#fillattr3').click();
mobileHelper.selectFromColorPalette(1, 4);
@ -216,7 +216,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
// Master objects are disabled, enable the settings first
cy.cGet('input#displaymasterobjects').should('not.have.prop', 'checked', true);
helper.clickOnIdle('input#displaymasterobjects');
cy.cGet('input#displaymasterobjects').click();
cy.cGet('input#displaymasterobjects').should('have.prop', 'checked', true);
@ -234,7 +234,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
//cy.get('input#displaymasterobjects')
// .should('have.prop', 'checked', true);
helper.clickOnIdle('input#displaymasterobjects');
cy.cGet('input#displaymasterobjects').click();
cy.cGet('input#displaymasterobjects').should('not.have.prop', 'checked', true);
@ -320,7 +320,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
it.skip('Apply layout.', function() {
// Apply title / subtitle layout
helper.clickOnIdle('#Layouts');
cy.cGet('#Layouts').click();
// Blank is the default
// TODO: wring item is selected by default
@ -328,7 +328,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
// .should('have.class', 'cool-context-down');
// Select layout with title and content shape
helper.clickOnIdle('.layout:nth-of-type(3)');
cy.cGet('.layout:nth-of-type(3)').click();
previewShouldBeFullWhite(false);
@ -336,7 +336,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
mobileHelper.closeMobileWizard();
mobileHelper.openMobileWizard();
helper.clickOnIdle('#Layouts');
cy.cGet('#Layouts').click();
cy.cGet('.layout:nth-of-type(3)').should('have.class', 'cool-context-down');
});
@ -417,7 +417,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Changing slide properties.'
cy.cGet('#displaymasterobjects label').should('have.class', 'disabled');
// Switch back to normal mode
helper.clickOnIdle('#closemasterslide');
cy.cGet('#closemasterslide').click();
cy.cGet('#masterslidebutton').should('exist');

View File

@ -34,31 +34,31 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font changes.', funct
});
it('Apply bold font.', function() {
helper.clickOnIdle('#Bold');
cy.cGet('#Bold').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p b').should('exist');
});
it('Apply italic font.', function() {
helper.clickOnIdle('#Italic');
cy.cGet('#Italic').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p i').should('exist');
});
it('Apply underline.', function() {
helper.clickOnIdle('#Underline');
cy.cGet('#Underline').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p u').should('exist');
});
it('Apply strikeout.', function() {
helper.clickOnIdle('#Strikeout');
cy.cGet('#Strikeout').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p strike').should('exist');
});
it('Apply shadowed.', function() {
helper.clickOnIdle('#Shadowed');
cy.cGet('#Shadowed').click();
writerHelper.selectAllTextOfDoc();
// TODO: Shadowed is not in the clipboard content.
});
@ -91,13 +91,13 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Apply font changes.', funct
});
it('Apply superscript.', function() {
helper.clickOnIdle('#SuperScript');
cy.cGet('#SuperScript').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p sup').should('exist');
});
it('Apply subscript.', function() {
helper.clickOnIdle('#SubScript');
cy.cGet('#SubScript').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p sub').should('exist');
});

View File

@ -14,7 +14,7 @@ describe.skip('Apply paragraph properties.', function() {
writerHelper.selectAllTextOfDoc();
mobileHelper.openMobileWizard();
// Open paragraph properties
helper.clickOnIdle('#Paragraph');
cy.cGet('#Paragraph').click();
cy.cGet('#Paragraph').should('have.class', 'selected');
cy.cGet('#LeftPara').should('be.visible');
});
@ -24,7 +24,7 @@ describe.skip('Apply paragraph properties.', function() {
});
/*it('Apply left/right alignment.', function() {
helper.clickOnIdle('#RightPara');
cy.cGet('#RightPara').click();
mobileHelper.closeMobileWizard();
@ -36,12 +36,12 @@ describe.skip('Apply paragraph properties.', function() {
// Then apply left alignment
mobileHelper.openMobileWizard();
helper.clickOnIdle('#Paragraph');
cy.cGet('#Paragraph').click();
cy.get('#Paragraph')
.should('have.class', 'selected');
helper.clickOnIdle('#LeftPara');
cy.cGet('#LeftPara').click();
cy.get('#LeftParaimg')
.should('have.class', 'selected');
@ -55,7 +55,7 @@ describe.skip('Apply paragraph properties.', function() {
});
it('Apply center alignment.', function() {
helper.clickOnIdle('#CenterPara');
cy.cGet('#CenterPara').click();
writerHelper.selectAllTextOfDoc();
@ -64,7 +64,7 @@ describe.skip('Apply paragraph properties.', function() {
});
it('Apply justify alignment.', function() {
helper.clickOnIdle('#JustifyPara');
cy.cGet('#JustifyPara').click();
writerHelper.selectAllTextOfDoc();
@ -73,7 +73,7 @@ describe.skip('Apply paragraph properties.', function() {
});
it('Change writing direction.', function() {
helper.clickOnIdle('#ParaRightToLeft');
cy.cGet('#ParaRightToLeft').click();
mobileHelper.closeMobileWizard();
@ -87,10 +87,10 @@ describe.skip('Apply paragraph properties.', function() {
mobileHelper.openMobileWizard();
// Open paragraph properties
helper.clickOnIdle('#Paragraph');
cy.cGet('#Paragraph').click();
// Change writing mode
helper.clickOnIdle('#ParaLeftToRight');
cy.cGet('#ParaLeftToRight').click();
mobileHelper.closeMobileWizard();
@ -101,7 +101,7 @@ describe.skip('Apply paragraph properties.', function() {
});
it('Apply default bulleting.', function() {
helper.clickOnIdle('#DefaultBullet');
cy.cGet('#DefaultBullet').click();
writerHelper.selectAllTextOfDoc();
@ -110,7 +110,7 @@ describe.skip('Apply paragraph properties.', function() {
});
it('Apply default numbering.', function() {
helper.clickOnIdle('#DefaultNumbering');
cy.cGet('#DefaultNumbering').click();
writerHelper.selectAllTextOfDoc();
@ -119,7 +119,7 @@ describe.skip('Apply paragraph properties.', function() {
});*/
it('Apply background color.', function() {
helper.clickOnIdle('#BackgroundColor .ui-header');
cy.cGet('#BackgroundColor .ui-header').click();
mobileHelper.selectFromColorPalette(4, 5, 5, 2);
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p').should('have.attr', 'style').should('contain', 'background: #6aa84f');
@ -127,8 +127,8 @@ describe.skip('Apply paragraph properties.', function() {
it('Increase / decrease para spacing.', function() {
// Increase para spacing
helper.clickOnIdle('#ParaspaceIncrease');
helper.clickOnIdle('#ParaspaceIncrease');
cy.cGet('#ParaspaceIncrease').click();
cy.cGet('#ParaspaceIncrease').click();
mobileHelper.closeMobileWizard();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p').should('have.attr', 'style').should('contain', 'margin-top: 0.08in');
@ -136,9 +136,9 @@ describe.skip('Apply paragraph properties.', function() {
writerHelper.selectAllTextOfDoc();
mobileHelper.openMobileWizard();
// Open paragraph properties
helper.clickOnIdle('#Paragraph');
cy.cGet('#Paragraph').click();
// Decrease para spacing
helper.clickOnIdle('#ParaspaceDecrease');
cy.cGet('#ParaspaceDecrease').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p').should('have.attr', 'style').should('contain', 'margin-top: 0.04in');
cy.cGet('#copy-paste-container p').should('have.attr', 'style').should('contain', 'margin-bottom: 0.04in');
@ -150,21 +150,21 @@ describe.skip('Apply paragraph properties.', function() {
cy.cGet('#belowparaspacing .spinfield').should('have.value', '0');
// Change spacing
helper.clickOnIdle('#aboveparaspacing .plus');
cy.cGet('#aboveparaspacing .plus').click();
cy.cGet('#aboveparaspacing .spinfield').should('have.value', '0.01');
helper.clickOnIdle('#aboveparaspacing .plus');
cy.cGet('#aboveparaspacing .plus').click();
cy.cGet('#aboveparaspacing .spinfield').should('have.value', '0.02');
helper.clickOnIdle('#aboveparaspacing .plus');
cy.cGet('#aboveparaspacing .plus').click();
cy.cGet('#aboveparaspacing .spinfield').should('have.value', '0.03');
helper.clickOnIdle('#aboveparaspacing .plus');
cy.cGet('#aboveparaspacing .plus').click();
cy.cGet('#aboveparaspacing .spinfield').should('have.value', '0.04');
helper.clickOnIdle('#aboveparaspacing .minus');
cy.cGet('#aboveparaspacing .minus').click();
cy.cGet('#aboveparaspacing .spinfield').should('have.value', '0.03');
helper.clickOnIdle('#belowparaspacing .plus');
cy.cGet('#belowparaspacing .plus').click();
cy.cGet('#belowparaspacing .spinfield').should('have.value', '0.01');
writerHelper.selectAllTextOfDoc();
@ -175,27 +175,27 @@ describe.skip('Apply paragraph properties.', function() {
it('Increase / decrease indent.', function() {
// Increase indent
helper.clickOnIdle('#IncrementIndent');
helper.clickOnIdle('#IncrementIndent');
cy.cGet('#IncrementIndent').click();
cy.cGet('#IncrementIndent').click();
mobileHelper.closeMobileWizard();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p').should('have.attr', 'style').should('contain', 'margin-left: 0.98in');
writerHelper.selectAllTextOfDoc();
mobileHelper.openMobileWizard();
// Open paragraph properties
helper.clickOnIdle('#Paragraph');
cy.cGet('#Paragraph').click();
// Decrease indent
helper.clickOnIdle('#DecrementIndent');
cy.cGet('#DecrementIndent').click();
writerHelper.selectAllTextOfDoc();
cy.cGet('#copy-paste-container p').should('have.attr', 'style').should('contain', 'margin-left: 0.49in');
});
it('Apply before text indent.', function() {
// Change indent
helper.clickOnIdle('#beforetextindent .plus');
cy.cGet('#beforetextindent .plus').click();
cy.cGet('#beforetextindent .spinfield').should('have.value', '0.01');
helper.clickOnIdle('#beforetextindent .plus');
cy.cGet('#beforetextindent .plus').click();
cy.cGet('#beforetextindent .spinfield').should('have.value', '0.02');
writerHelper.selectAllTextOfDoc();
@ -205,10 +205,10 @@ describe.skip('Apply paragraph properties.', function() {
it('Apply after text indent.', function() {
// Change indent
helper.clickOnIdle('#aftertextindent .plus');
cy.cGet('#aftertextindent .plus').click();
cy.cGet('#aftertextindent .spinfield').should('have.value', '0.01');
helper.clickOnIdle('#aftertextindent .plus');
cy.cGet('#aftertextindent .plus').click();
cy.cGet('#aftertextindent .spinfield').should('have.value', '0.02');
writerHelper.selectAllTextOfDoc();
@ -218,10 +218,10 @@ describe.skip('Apply paragraph properties.', function() {
it('Apply first line indent.', function() {
// Increase firstline indent
helper.clickOnIdle('#firstlineindent .plus');
cy.cGet('#firstlineindent .plus').click();
cy.cGet('#firstlineindent .spinfield').should('have.value', '0.01');
helper.clickOnIdle('#firstlineindent .plus');
cy.cGet('#firstlineindent .plus').click();
cy.cGet('#firstlineindent .spinfield').should('have.value', '0.02');
writerHelper.selectAllTextOfDoc();

View File

@ -41,11 +41,11 @@ describe(['tagmobile', 'tagproxy'], 'Focus tests', function() {
mobileHelper.enableEditingMobile();
mobileHelper.openMobileWizard();
// Open paragraph properties
helper.clickOnIdle('#Paragraph');
cy.cGet('#Paragraph').click();
cy.cGet('#aboveparaspacing .spinfield').should('have.value', '0');
// Need to wait before clicking on spinfield
cy.wait(500);
helper.clickOnIdle('#aboveparaspacing .spinfield');
cy.cGet('#aboveparaspacing .spinfield').click();
// The spinfield should have the focus now.
helper.assertFocus('className', 'spinfield');
mobileHelper.closeMobileWizard();
@ -127,7 +127,7 @@ describe(['tagmobile', 'tagproxy'], 'Focus tests', function() {
// No focus
helper.assertFocus('tagName', 'BODY');
// Apply bold
helper.clickOnIdle('#mobile-wizard .unoBold');
cy.cGet('#mobile-wizard .unoBold').click();
cy.cGet('#mobile-wizard .unoBold').should('have.class', 'selected');
// No focus
helper.assertFocus('tagName', 'BODY');

View File

@ -257,9 +257,9 @@ describe.skip(['tagmobile'], 'Trigger hamburger menu options.', function() {
// Search bar become visible
cy.cGet('#mobile-wizard-content').should('not.be.empty');
// Search for some word
helper.inputOnIdle('#searchterm', 'a');
helper.typeIntoInputField('#searchterm', 'a');
cy.cGet('#search').should('not.have.attr', 'disabled');
helper.clickOnIdle('#search');
cy.cGet('#search').click();
// Part of the text should be selected
helper.textSelectionShouldExist();
helper.expectTextForClipboard('a');
@ -297,7 +297,7 @@ describe.skip(['tagmobile'], 'Trigger hamburger menu options.', function() {
// For now, we don't/can't actually check if the size of the document is updated or not.
// That can be checked with a unit test.
openPageWizard();
helper.inputOnIdle('#paperwidth .spinfield', '12');
helper.typeIntoInputField('#paperwidth .spinfield', '12');
closePageWizard();
// Check that the page wizard shows the right value after reopen.
openPageWizard();
@ -309,7 +309,7 @@ describe.skip(['tagmobile'], 'Trigger hamburger menu options.', function() {
// For now, we don't/can't actually check if the size of the document is updated or not.
// That can be checked with a unit test.
openPageWizard();
helper.inputOnIdle('#paperheight .spinfield', '3.0');
helper.typeIntoInputField('#paperheight .spinfield', '3.0');
closePageWizard();
// Check that the page wizard shows the right value after reopen.
openPageWizard();

View File

@ -84,26 +84,26 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change shape properties via
// Change width
openPosSizePanel();
cy.cGet('#selectwidth .plus').should('be.visible');
helper.clickOnIdle('#selectwidth .plus');
helper.clickOnIdle('#selectwidth .plus');
cy.cGet('#selectwidth .plus').click();
cy.cGet('#selectwidth .plus').click();
mobileHelper.closeMobileWizard();
}
function openPosSizePanel() {
mobileHelper.openMobileWizard();
helper.clickOnIdle('#PosSizePropertyPanel');
cy.cGet('#PosSizePropertyPanel').click();
cy.cGet('#selectwidth').should('be.visible');
}
function openLinePropertyPanel() {
mobileHelper.openMobileWizard();
helper.clickOnIdle('#LinePropertyPanel');
cy.cGet('#LinePropertyPanel').click();
cy.cGet('#linestyle').should('be.visible');
}
function openAreaPanel() {
mobileHelper.openMobileWizard();
helper.clickOnIdle('#AreaPropertyPanel');
cy.cGet('#AreaPropertyPanel').click();
cy.cGet('#fillstylearea').should('be.visible');
}
@ -132,24 +132,24 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change shape properties via
it('Change size with keep ratio enabled.', function() {
openPosSizePanel();
// Enable keep ratio
helper.clickOnIdle('#mobile-wizard #ratio #ratio');
cy.cGet('#mobile-wizard #ratio #ratio').click();
cy.cGet('#mobile-wizard #ratio #ratio').should('have.prop', 'checked', true);
// Change height
helper.inputOnIdle('#selectheight .spinfield', '5.2');
helper.typeIntoInputField('#selectheight .spinfield', '5.2');
const matcher = new TriangleCoordinatesMatcher(defaultStartPoint, Math.floor(5.2 * unitScale), Math.ceil(5.2 * unitScale));
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path').invoke('attr', 'd').should(matcher.match.bind(matcher));
});
it('Vertical mirroring', function() {
openPosSizePanel();
helper.clickOnIdle('#mobile-wizard .unoFlipVertical');
cy.cGet('#mobile-wizard .unoFlipVertical').click();
const matcher = new TriangleCoordinatesMatcher(defaultStartPoint, defaultBase, defaultAltitude, false /* horiz mirroring */, true /* vert mirroring */);
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path').invoke('attr', 'd').should(matcher.match.bind(matcher));
});
it('Horizontal mirroring', function() {
openPosSizePanel();
helper.clickOnIdle('#mobile-wizard .unoFlipHorizontal');
cy.cGet('#mobile-wizard .unoFlipHorizontal').click();
triggerNewSVG();
const matcher = new TriangleCoordinatesMatcher(defaultStartPoint, defaultBase, defaultAltitude, true /* horiz mirroring */, false /* vert mirroring */);
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path').invoke('attr', 'd').should(matcher.match.bind(matcher));
@ -159,20 +159,20 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change shape properties via
openPosSizePanel();
// We can't test the result, so we just trigger
// the events to catch crashes, consoler errors.
helper.clickOnIdle('#mobile-wizard .unoBringToFront');
cy.cGet('#mobile-wizard .unoBringToFront').click();
cy.wait(300);
helper.clickOnIdle('#mobile-wizard .unoObjectForwardOne');
cy.cGet('#mobile-wizard .unoObjectForwardOne').click();
cy.wait(300);
helper.clickOnIdle('#mobile-wizard .unoObjectBackOne');
cy.cGet('#mobile-wizard .unoObjectBackOne').click();
cy.wait(300);
helper.clickOnIdle('#mobile-wizard .unoSendToBack');
cy.cGet('#mobile-wizard .unoSendToBack').click();
cy.wait(300);
});
it.skip('Change line color', function() {
openLinePropertyPanel();
helper.clickOnIdle('#mobile-wizard .unoXLineColor');
helper.clickOnIdle('.ui-content[title="Line Color"] .color-sample-small[style="background-color: rgb(152, 0, 0);"]');
cy.cGet('#mobile-wizard .unoXLineColor').click();
cy.cGet('.ui-content[title="Line Color"] .color-sample-small[style="background-color: rgb(152, 0, 0);"]').click();
triggerNewSVG();
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path[fill="none"]').should('have.attr', 'stroke', 'rgb(152,0,0)');
});
@ -187,11 +187,11 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change shape properties via
it.skip('Change line width', function() {
openLinePropertyPanel();
cy.cGet('#linewidth .spinfield').should('have.attr', 'readonly', 'readonly');
helper.clickOnIdle('#linewidth .plus');
cy.cGet('#linewidth .plus').click();
triggerNewSVG();
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path[fill="none"]').should('have.attr', 'stroke-width', '141');
openLinePropertyPanel();
helper.clickOnIdle('#linewidth .minus');
cy.cGet('#linewidth .minus').click();
triggerNewSVG();
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g g g path[fill="none"]').should('have.attr', 'stroke-width', '88');
});
@ -220,13 +220,13 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change shape properties via
cy.cGet('#mobile-wizard #gradientstyle .ui-header-left').should('have.text', 'Linear');
mobileHelper.selectListBoxItem2('#gradientstyle', 'Square');
// Select From color
helper.clickOnIdle('#mobile-wizard #fillgrad1');
cy.cGet('#mobile-wizard #fillgrad1').click();
mobileHelper.selectFromColorPalette(0, 2);
// Set gradient angle
helper.inputOnIdle('#mobile-wizard #gradangle .spinfield', '100');
helper.typeIntoInputField('#mobile-wizard #gradangle .spinfield', '100');
cy.cGet('#mobile-wizard #gradangle .spinfield').should('have.value', '100');
// Select To color
helper.clickOnIdle('#mobile-wizard #fillgrad2');
cy.cGet('#mobile-wizard #fillgrad2').click();
mobileHelper.selectFromColorPalette(1, 7);
triggerNewSVG();
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g.Page g g#id1 defs pattern').should('exist');
@ -269,7 +269,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change shape properties via
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g.Page g g#id1 path:nth-of-type(1)').should('have.attr', 'fill', 'rgb(114,159,207)');
openAreaPanel();
cy.cGet('#mobile-wizard #FillColor .color-sample-selected').should('have.attr', 'style', 'background-color: rgb(114, 159, 207);');
helper.clickOnIdle('.unoFillColor');
cy.cGet('.unoFillColor').click();
mobileHelper.selectFromColorPalette(0, 2, 0, 2);
cy.cGet('#mobile-wizard #FillColor .color-sample-selected').should('have.attr', 'style', 'background-color: rgb(204, 0, 0);');
triggerNewSVG();
@ -292,7 +292,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change shape properties via
cy.cGet('.leaflet-pane.leaflet-overlay-pane svg g svg g.Page g g#id1 path:nth-of-type(1)').should('not.have.attr', 'fill-opacity');
openAreaPanel();
cy.cGet('#mobile-wizard #transtype .ui-header-left').should('have.text', 'None');
helper.inputOnIdle('#settransparency .spinfield', '50');
helper.typeIntoInputField('#settransparency .spinfield', '50');
cy.cGet('#mobile-wizard #settransparency .spinfield').should('have.value', '50');
cy.cGet('#mobile-wizard #transtype .ui-header-left').should('have.text', 'Solid');
triggerNewSVG();

View File

@ -29,14 +29,14 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
}
function selectFullTable() {
helper.clickOnIdle('.unoSelectTable');
cy.cGet('.unoSelectTable').click();
cy.cGet('#copy-paste-container table').should('exist');
}
it('Insert row before.', function() {
before('table_properties.odt');
openTablePanel();
helper.clickOnIdle('.unoInsertRowsBefore');
cy.cGet('.unoInsertRowsBefore').click();
cy.cGet('.leaflet-marker-icon.table-row-resize-marker').should('have.length', 4);
selectFullTable();
// Check rows / columns
@ -53,7 +53,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
it('Insert row after.', function() {
before('table_properties.odt');
openTablePanel();
helper.clickOnIdle('.unoInsertRowsAfter');
cy.cGet('.unoInsertRowsAfter').click();
cy.cGet('.leaflet-marker-icon.table-row-resize-marker').should('have.length', 4);
selectFullTable();
// Check rows / columns
@ -70,7 +70,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
it('Insert column before.', function() {
before('table_properties.odt');
openTablePanel();
helper.clickOnIdle('.unoInsertColumnsBefore');
cy.cGet('.unoInsertColumnsBefore').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('have.length', 4);
selectFullTable();
// Check rows / columns
@ -86,7 +86,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
it('Insert column after.', function() {
before('table_properties.odt');
openTablePanel();
helper.clickOnIdle('.unoInsertColumnsAfter');
cy.cGet('.unoInsertColumnsAfter').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('have.length', 4);
selectFullTable();
// Check rows / columns
@ -102,7 +102,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
it('Delete row.', function() {
before('table_properties.odt');
openTablePanel();
helper.clickOnIdle('.unoDeleteRows');
cy.cGet('.unoDeleteRows').click();
cy.cGet('.leaflet-marker-icon.table-row-resize-marker').should('have.length', 2);
selectFullTable();
@ -121,19 +121,19 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
before('table_properties.odt');
// Insert column first
openTablePanel();
helper.clickOnIdle('.unoInsertColumnsBefore');
cy.cGet('.unoInsertColumnsBefore').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('have.length', 4);
// Then delete it
mobileHelper.closeMobileWizard();
openTablePanel();
helper.clickOnIdle('.unoDeleteColumns');
cy.cGet('.unoDeleteColumns').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('have.length', 3);
});
it('Delete table.', function() {
before('table_properties.odt');
openTablePanel();
helper.clickOnIdle('.unoDeleteTable');
cy.cGet('.unoDeleteTable').click();
cy.cGet('.leaflet-marker-icon.table-column-resize-marker').should('not.exist');
mobileHelper.closeMobileWizard();
writerHelper.selectAllTextOfDoc();
@ -152,7 +152,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
// We use cursor position as the indicator of layout change.
helper.getCursorPos('top', 'origCursorPos');
openTablePanel();
helper.clickOnIdle('#mobile-wizard .unoMergeCells');
cy.cGet('#mobile-wizard .unoMergeCells').click();
// Cursor was in the second row originally.
// With merging two rows, the cursor is moved into the first row.
cy.get('@origCursorPos')
@ -198,7 +198,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
helper.moveCursor('down', 'shift');
helper.moveCursor('right', 'shift');
openTablePanel();
helper.clickOnIdle('#mobile-wizard .unoSetMinimalRowHeight');
cy.cGet('#mobile-wizard .unoSetMinimalRowHeight').click();
helper.moveCursor('up', 'shift');
helper.moveCursor('up', 'shift');
helper.moveCursor('left', 'shift');
@ -214,7 +214,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
cy.cGet('#copy-paste-container tr:nth-of-type(2) td:nth-of-type(1)').should('not.have.attr', 'height');
cy.cGet('#copy-paste-container tr:nth-of-type(3) td:nth-of-type(1)').should('not.have.attr', 'height');
helper.clickOnIdle('#mobile-wizard .unoSetOptimalRowHeight');
cy.cGet('#mobile-wizard .unoSetOptimalRowHeight').click();
selectFullTable();
cy.cGet('#copy-paste-container table td').should('have.length', 6);
@ -229,8 +229,8 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
openTablePanel();
selectFullTable();
cy.wait(200);
helper.clickOnIdle('#mobile-wizard .unoDistributeRows');
cy.cGet('#mobile-wizard .unoDistributeRows').should('not.have.attr','disabled');
cy.cGet('#mobile-wizard .unoDistributeRows').click();
selectFullTable();
@ -256,8 +256,8 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
openTablePanel();
selectFullTable();
cy.wait(200);
helper.clickOnIdle('#mobile-wizard .unoSetMinimalColumnWidth');
cy.cGet('#mobile-wizard .unoSetMinimalColumnWidth').should('not.have.attr','disabled');
cy.cGet('#mobile-wizard .unoSetMinimalColumnWidth').click();
selectFullTable();
@ -271,11 +271,11 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
openTablePanel();
selectFullTable();
cy.wait(200);
helper.clickOnIdle('#mobile-wizard .unoEntireRow');
cy.cGet('#mobile-wizard .unoEntireRow').should('not.have.attr','disabled');
cy.cGet('#mobile-wizard .unoEntireRow').click();
cy.cGet('#copy-paste-container table').should('exist');
helper.clickOnIdle('.unoSetOptimalColumnWidth');
cy.cGet('.unoSetOptimalColumnWidth').click();
selectFullTable();
cy.cGet('#copy-paste-container td:nth-of-type(1n)').should('have.attr', 'width', '324');
cy.cGet('#copy-paste-container td:nth-of-type(2n)').should('have.attr', 'width', '323');
@ -288,8 +288,8 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Change table properties / l
openTablePanel();
selectFullTable();
cy.wait(200);
helper.clickOnIdle('#mobile-wizard .unoDistributeColumns');
cy.cGet('#mobile-wizard .unoDistributeColumns').should('not.have.attr','disabled');
cy.cGet('#mobile-wizard .unoDistributeColumns').click();
selectFullTable();