Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
502 changes: 358 additions & 144 deletions packages/fiori/cypress/specs/ShellBar.cy.tsx

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion packages/fiori/cypress/specs/ShellBar.mobile.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ describe("Mobile Behaviour", () => {
cy.ui5SimulateDevice();
});

it("Test self-collapsible search is expanded and collapsed by the show-search-field property", () => {
it("Test self-collapsible search is not auto-opened on initial load", () => {
cy.mount(
<ShellBar id="shellbar" showSearchField={true}>
<ShellBarSearch id="search" slot="searchField"></ShellBarSearch>
</ShellBar>
);

// On initial load, search should stay collapsed even with showSearchField=true
// to prevent the full-screen search dialog from appearing unexpectedly
cy.get("#search").should("have.prop", "open", false);
});

it("Test self-collapsible search opens when user clicks the search field", () => {
cy.mount(
<ShellBar id="shellbar">
<ShellBarSearch id="search" slot="searchField"></ShellBarSearch>
</ShellBar>
);

// Click search field to open search dialog
cy.get("#search").click();
cy.get("#search").should("have.prop", "open", true);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/fiori/cypress/specs/ShellBarItem.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("ShellBarItem getFocusDomRef", () => {
cy.get("#shellbar-overflow-test")
.shadow()
.find(".ui5-shellbar-overflow-popover")
.should("be.visible");
.should("have.attr", "open");

// Test when items are in overflow popover
cy.get<ShellBarItem>("#overflow-item1")
Expand Down
Loading
Loading