Skip to content

Commit 68aa607

Browse files
fix(ui5-multi-combobox): stabilize tests (#12986)
Co-authored-by: Stefan Dimitrov <[email protected]>
1 parent ad90c12 commit 68aa607

File tree

1 file changed

+9
-60
lines changed

1 file changed

+9
-60
lines changed

packages/main/cypress/specs/MultiComboBox.cy.tsx

Lines changed: 9 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -641,66 +641,6 @@ describe("General", () => {
641641
}));
642642
});
643643

644-
it("Select All functionality + N-more integration", () => {
645-
cy.mount(
646-
<><MultiComboBox style="width: 100px" noValidation={true} showSelectAll={true}>
647-
<MultiComboBoxItem selected={true} text="Very Very Very Very long Item 1"></MultiComboBoxItem>
648-
<MultiComboBoxItem selected={true} text="Item 2"></MultiComboBoxItem>
649-
<MultiComboBoxItem selected={true} text="Item 3"></MultiComboBoxItem>
650-
<MultiComboBoxItem text="Item 4"></MultiComboBoxItem>
651-
<MultiComboBoxItem text="Item 5"></MultiComboBoxItem>
652-
</MultiComboBox><Button>Dummy Button</Button></>
653-
);
654-
655-
cy.get("[ui5-multi-combobox]")
656-
.realClick();
657-
658-
cy.get("[ui5-multi-combobox]")
659-
.should("be.focused");
660-
661-
cy.get("[ui5-multi-combobox]")
662-
.shadow()
663-
.find(".inputIcon")
664-
.as("icon");
665-
666-
cy.get("@icon")
667-
.realClick();
668-
669-
cy.get("[ui5-multi-combobox]")
670-
.shadow()
671-
.find<ResponsivePopover>("ui5-responsive-popover")
672-
.as("popover")
673-
.ui5ResponsivePopoverOpened();
674-
675-
cy.get("@popover")
676-
.find(".ui5-mcb-select-all-checkbox")
677-
.should("not.have.attr", "checked");
678-
679-
// focus the dummy button to close the popover
680-
cy.realPress("Tab");
681-
cy.realPress("Tab");
682-
683-
cy.get<ResponsivePopover>("@popover")
684-
.ui5ResponsivePopoverClosed();
685-
686-
cy.get("[ui5-multi-combobox]")
687-
.shadow()
688-
.find("[ui5-tokenizer]")
689-
.shadow()
690-
.find(".ui5-tokenizer-more-text")
691-
.as("moreButton");
692-
693-
cy.get("@moreButton")
694-
.realClick();
695-
696-
cy.get<ResponsivePopover>("@popover")
697-
.ui5ResponsivePopoverOpened();
698-
699-
cy.get("@popover")
700-
.find(".ui5-mcb-select-all-checkbox")
701-
.should("have.attr", "checked");
702-
});
703-
704644
it("Tokenizer expansion on dynamically added tokens", () => {
705645
const addTokens = () => {
706646
const mcb = document.getElementById("mcb");
@@ -1289,6 +1229,11 @@ describe("Selection and filtering", () => {
12891229
.as("popover")
12901230
.ui5ResponsivePopoverOpened();
12911231

1232+
1233+
cy.get("@popover")
1234+
.find(".ui5-mcb-select-all-checkbox")
1235+
.should("have.attr", "checked");
1236+
12921237
cy.get("@popover")
12931238
.find("[ui5-list] slot")
12941239
.should("have.length", 2);
@@ -1315,6 +1260,10 @@ describe("Selection and filtering", () => {
13151260
cy.get<ResponsivePopover>("@popover")
13161261
.ui5ResponsivePopoverOpened();
13171262

1263+
cy.get("@popover")
1264+
.find(".ui5-mcb-select-all-checkbox")
1265+
.should("not.have.attr", "checked");
1266+
13181267
cy.get("@popover")
13191268
.find("[ui5-list] slot")
13201269
.should("have.length", 3);

0 commit comments

Comments
 (0)