cypress: fixed tests after textbox/shape svgs updates

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I0fd693c373dd996ed926f65b7df64a531048476d
pull/8588/head
Pranam Lashkari 2024-03-08 06:11:51 +05:30 committed by Szymon Kłos
parent e796ec7b44
commit 0601166aa0
2 changed files with 1 additions and 2 deletions

View File

@ -158,7 +158,6 @@ function selectTextOfShape(selectAllText = true) {
cy.waitUntil(function() {
cy.cGet('svg g .leaflet-interactive')
.then(function(items) {
expect(items).to.have.length(1);
// Slide does not fit the viewport in cypress.
// Use the center of the visible area of the svg group element else the click
// event could go to other elements like slide sorter.

View File

@ -36,7 +36,7 @@ describe(['tagmobile', 'tagnextcloud', 'tagproxy'], 'Spell checking menu.', func
// Open context menu
cy.cGet('g path.leaflet-interactive')
.then(function(shape) {
expect(shape.length).to.be.equal(1);
expect(shape.length).to.be.equal(2);
var XPos = (shape[0].getBoundingClientRect().left + shape[0].getBoundingClientRect().right) / 2;
var YPos = (shape[0].getBoundingClientRect().top + shape[0].getBoundingClientRect().bottom) / 2;