diff --git a/cypress_test/data/desktop/impress/top_toolbar.odp b/cypress_test/data/desktop/impress/top_toolbar.odp index e7c4c20d1..036b22fe6 100644 Binary files a/cypress_test/data/desktop/impress/top_toolbar.odp and b/cypress_test/data/desktop/impress/top_toolbar.odp differ diff --git a/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js b/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js index 12c2b4081..c0a748924 100644 --- a/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js +++ b/cypress_test/integration_tests/desktop/impress/top_toolbar_spec.js @@ -28,4 +28,31 @@ describe('Top toolbar tests.', function() { cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph') .should('have.attr', 'font-weight', '700'); }); + + it('Apply left/right alignment on text seleced text.', function() { + cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph .TextPosition') + .should('have.attr', 'x', '1400'); + + // Set right alignment first + impressHelper.selectTextOfShape(); + + cy.get('#tb_editbar_item_rightpara') + .click(); + + impressHelper.triggerNewSVGForShapeInTheCenter(); + + cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph .TextPosition') + .should('have.attr', 'x', '24526'); + + // Set left alignment + impressHelper.selectTextOfShape(); + + cy.get('#tb_editbar_item_leftpara') + .click(); + + impressHelper.triggerNewSVGForShapeInTheCenter(); + + cy.get('.leaflet-pane.leaflet-overlay-pane g.Page .TextParagraph .TextPosition') + .should('have.attr', 'x', '1400'); + }); });