libreoffice-online/cypress_test/integration_tests/desktop/shape_operations_spec.js
Tamás Zolnai b77cd954e0 cypress: use different test files for different test suits.
Change-Id: I29ad09ce99128fe6700070e23cf66dfc0c553b70
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89389
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-25 00:33:32 +01:00

34 lines
897 B
JavaScript

/* global describe it cy require expect afterEach*/
var helper = require('../common/helper');
describe('Shape operations', function() {
afterEach(function() {
helper.afterAll();
});
it('Insert a simple shape.', function() {
helper.loadTestDoc('shape_operations.odt');
// Scroll on the up toolbar
cy.get('#toolbar-up .w2ui-scroll-right').click();
cy.get('.w2ui-tb-image.w2ui-icon.basicshapes_ellipse')
.should('be.visible')
.click();
// Insert a rectangle
cy.get('.col.w2ui-icon.basicshapes_rectangle')
.click({force : true});
cy.get('.leaflet-pane.leaflet-overlay-pane svg g')
.should('exist');
// Check whether the rectangle was inserted as an SVG
cy.get('.leaflet-pane.leaflet-overlay-pane svg')
.then(function(svg) {
expect(svg[0].getBBox().width).to.be.greaterThan(0);
expect(svg[0].getBBox().height).to.be.greaterThan(0);
});
});
});