cypress: test for applying left/right alignment via top toolbar (Impress).

Change-Id: I93caf91826a2e4b2e37cd466e31b8b424d9114aa
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
This commit is contained in:
Tamás Zolnai 2020-11-06 13:01:14 +01:00 committed by Tamás Zolnai
parent 2d02cf5cc6
commit 30650d09bb
2 changed files with 27 additions and 0 deletions

View file

@ -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');
});
});