Skip to content

Commit 4728af6

Browse files
committed
cypress: do not retry getBoundingClientRect() in removeShapeSelection()
This likely fixes the custom chromium renderer crash Signed-off-by: Mohit Marathe <[email protected]> Change-Id: I656346ac664a5a8a41f41b9ed6bed7d8dc395890
1 parent 2c963c2 commit 4728af6

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

cypress_test/integration_tests/common/impress_helper.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,19 @@ function removeShapeSelection() {
119119
cy.log('>> removeShapeSelection - start');
120120

121121
// Remove selection with clicking on the top-left corner of the slide
122-
cy.waitUntil(function() {
123-
cy.cGet('.leaflet-canvas-container canvas')
124-
.then(function(items) {
125-
var XPos = items[0].getBoundingClientRect().left + 10;
126-
var YPos = items[0].getBoundingClientRect().top + 10;
127-
cy.cGet('body').click(XPos, YPos);
128-
cy.cGet('body').type('{esc}');
129-
cy.cGet('body').type('{esc}');
130-
});
122+
cy.cGet('.leaflet-canvas-container canvas')
123+
.then(function(items) {
124+
var XPos = items[0].getBoundingClientRect().left + 10;
125+
var YPos = items[0].getBoundingClientRect().top + 10;
126+
cy.cGet('body').click(XPos, YPos);
127+
cy.cGet('body').type('{esc}');
128+
cy.cGet('body').type('{esc}');
129+
});
131130

132-
return cy.cGet('#document-container')
133-
.then(function(overlay) {
134-
return overlay.children('svg').length === 0;
135-
});
136-
});
131+
cy.cGet('#document-container')
132+
.should(function(overlay) {
133+
expect(overlay.children('svg').length).to.equal(0);
134+
});
137135

138136
cy.cGet('.leaflet-drag-transform-marker').should('not.exist');
139137

0 commit comments

Comments
 (0)