diff --git a/cypress_test/integration_tests/common/helper.js b/cypress_test/integration_tests/common/helper.js index c26342dc5..2567e553e 100644 --- a/cypress_test/integration_tests/common/helper.js +++ b/cypress_test/integration_tests/common/helper.js @@ -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; diff --git a/cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js b/cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js index 0eb9beea9..4c4ee903b 100644 --- a/cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js +++ b/cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js @@ -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();