Created the cypress test for the underline attribute in desktop writer
Change-Id: I5d9fd7655380d6926ca1f64b03128098fbb15270
This commit is contained in:
parent
c614216d46
commit
e88e656dae
2 changed files with 26 additions and 0 deletions
|
@ -358,6 +358,22 @@ function selectAllText(assertFocus = true) {
|
|||
.should('exist');
|
||||
}
|
||||
|
||||
function reselectAllText() {
|
||||
|
||||
cy.log('Unselect all texts');
|
||||
|
||||
typeIntoDocument('{downarrow}');
|
||||
|
||||
cy.get('.leaflet-marker-icon')
|
||||
.should('not.exist');
|
||||
|
||||
typeIntoDocument('{ctrl}a');
|
||||
|
||||
cy.get('.leaflet-marker-icon')
|
||||
.should('exist');
|
||||
cy.log('Reselect all texts');
|
||||
}
|
||||
|
||||
// Clear all text by selecting all and deleting.
|
||||
function clearAllText() {
|
||||
assertCursorAndFocus();
|
||||
|
@ -872,6 +888,7 @@ module.exports.assertCursorAndFocus = assertCursorAndFocus;
|
|||
module.exports.assertNoKeyboardInput = assertNoKeyboardInput;
|
||||
module.exports.assertHaveKeyboardInput = assertHaveKeyboardInput;
|
||||
module.exports.selectAllText = selectAllText;
|
||||
module.exports.reselectAllText = reselectAllText;
|
||||
module.exports.clearAllText = clearAllText;
|
||||
module.exports.expectTextForClipboard = expectTextForClipboard;
|
||||
module.exports.matchClipboardText = matchClipboardText;
|
||||
|
|
|
@ -35,6 +35,15 @@ describe('Top toolbar tests.', function() {
|
|||
.should('exist');
|
||||
});
|
||||
|
||||
it('Apply underline.', function() {
|
||||
cy.get('#tb_editbar_item_underline')
|
||||
.click();
|
||||
helper.reselectAllText();
|
||||
|
||||
cy.get('#copy-paste-container p u')
|
||||
.should('exist');
|
||||
});
|
||||
|
||||
it('Apply left alignment.', function() {
|
||||
cy.get('#tb_editbar_item_centerpara')
|
||||
.click();
|
||||
|
|
Loading…
Reference in a new issue