Skip to content

Commit

Permalink
chore: fix unstable test (#8137)
Browse files Browse the repository at this point in the history
wip: fix unstable test

Co-authored-by: Nayden Naydenov <[email protected]>
  • Loading branch information
nnaydenow and Nayden Naydenov authored Jan 19, 2024
1 parent 9512e6c commit f79db71
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/fiori/test/specs/SideNavigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,24 +241,26 @@ describe("Component Behavior", () => {
});

it("Test overflow behavior when collapsed", async () => {

await browser.url(`test/pages/SideNavigation.html`);
const sideNavigation = await browser.$("#sn1"),
sideNavigationTree = await sideNavigation.shadow$(".ui5-sn-flexible");
const sideNavigation = await browser.$("#sn1");

await sideNavigation.setProperty("collapsed", true);



// Act: apply new height
await browser.setWindowSize(500, 450);


// Check
let sideNavigationTree = await sideNavigation.shadow$(".ui5-sn-flexible");
let overflowItem = await sideNavigationTree.shadow$(".ui5-sn-item-overflow");

// Check
const overflowItem = await sideNavigationTree.shadow$(".ui5-sn-item-overflow");
await overflowItem.waitForDisplayed();
assert.ok(await overflowItem.isDisplayed(), "Overflow button should be available");

// Act: apply new height
await browser.setWindowSize(500, 1000);
sideNavigationTree = await sideNavigation.shadow$(".ui5-sn-flexible");
overflowItem = await sideNavigationTree.shadow$(".ui5-sn-item-overflow");

assert.notOk(await overflowItem.isDisplayed(), "Overflow button should not be available");

Expand Down

0 comments on commit f79db71

Please sign in to comment.