Skip to content

Commit daea901

Browse files
committed
jsdialog: identify dropdowns with unique id
- MakeIdUnique injects random numbers as it was fixed - we need in the future some register for our dropdowns to avoid query Signed-off-by: Szymon Kłos <[email protected]> Change-Id: I7fe1030b2b33c1099cabaa3e954799c1f61268d7
1 parent 08297ad commit daea901

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

browser/src/control/jsdialog/Util.Dropdown.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,5 +205,7 @@ JSDialog.CloseAllDropdowns = function () {
205205
};
206206

207207
JSDialog.GetDropdown = function (id) {
208-
return document.body.querySelector('#' + _createDropdownId(id));
208+
// remember it can get some random numbers due to JSDialog.MakeIdUnique
209+
// TODO: use some register for it
210+
return document.body.querySelector('[id^="' + id + '"].modalpopup');
209211
};

cypress_test/integration_tests/desktop/calc/delete_objects_spec.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Delete Objects', function(
2222
});
2323

2424
it('Delete Shapes', function() {
25-
cy.cGet('#toolbar-up #overflow-button-other-toptoolbar .arrowbackground').click();
25+
cy.cGet('#toolbar-up #other-toptoolbar .unoDefaultNumbering .arrowbackground').click();
2626

27-
cy.cGet('#insertshapes').click();
27+
cy.cGet('#other-toptoolbar .unoBasicShapes').click();
2828
cy.cGet('.col.w2ui-icon.symbolshapes').should($el => { expect(Cypress.dom.isDetached($el)).to.eq(false); }).click();
2929

3030
cy.cGet('#test-div-shapeHandlesSection')
@@ -38,9 +38,10 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Delete Objects', function(
3838
});
3939

4040
it('Delete Chart' , function() {
41-
cy.cGet('#toolbar-up #overflow-button-other-toptoolbar .arrowbackground').click();
41+
cy.cGet('#toolbar-up #other-toptoolbar .unoDefaultNumbering .arrowbackground').click();
42+
4243
//insert
43-
cy.cGet('#insertobjectchart').click();
44+
cy.cGet('#other-toptoolbar .unoInsertObjectChart').click();
4445
cy.cGet('.jsdialog-overlay').click();
4546
cy.cGet('.ui-pushbutton.jsdialog.button-primary').should($el => { expect(Cypress.dom.isDetached($el)).to.eq(false); }).click();
4647
cy.cGet('#test-div-shapeHandlesSection').should('exist');

0 commit comments

Comments
 (0)