9ec53994f2
We use this method in various contexts, where it's not necessary that we have the cursor of the focus. Focus can be tested in focus related tests. Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> Change-Id: Ic27de45917657d4ac1734565d81d5bbf190ad333
24 lines
566 B
JavaScript
24 lines
566 B
JavaScript
/* global cy require*/
|
|
|
|
var helper = require('./helper');
|
|
|
|
function selectAllTextOfDoc() {
|
|
cy.log('Select all text of Writer document - start.');
|
|
|
|
// Remove selection if exist
|
|
cy.get('.leaflet-marker-pane')
|
|
.then(function(body) {
|
|
if (body.find('.leaflet-selection-marker-start').length !== 0) {
|
|
helper.typeIntoDocument('{downarrow}');
|
|
}
|
|
});
|
|
|
|
cy.get('.leaflet-selection-marker-start')
|
|
.should('not.exist');
|
|
|
|
helper.selectAllText();
|
|
|
|
cy.log('Select all text of Writer document - end.');
|
|
}
|
|
|
|
module.exports.selectAllTextOfDoc = selectAllTextOfDoc;
|