Skip to content

Commit

Permalink
chore: update Toolbar test
Browse files Browse the repository at this point in the history
  • Loading branch information
ilhan007 committed Sep 1, 2023
1 parent d3acd4b commit dab9f98
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions packages/main/test/specs/Toolbar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ describe("Toolbar general interaction", () => {
await browser.url(`test/pages/Toolbar.html`);
});

it("Should open popover when pressing overflow button", async () => {
await browser.setWindowSize(500, 1080);
const otb = await browser.$("#otb_a");
const overflowButton = await otb.shadow$(".ui5-tb-overflow-btn");

await overflowButton.click();

const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#otb_a");
const popover = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-popover");
assert.strictEqual(await popover.getAttribute("open"), 'true', "overflow popover created and opened on click on overflow button");
await browser.setWindowSize(1920, 1080);
});

it("Should move button with alwaysOverflow priority to overflow popover", async () => {

const otb = await browser.$("#otb_d");
Expand All @@ -34,6 +21,19 @@ describe("Toolbar general interaction", () => {
assert.ok(await employee_button.hasClass("ui5-tb-popover-item"), "'Employee' button is moved in overflow popover since it has 'Always' priority");
});

it("Should open popover when pressing overflow button", async () => {
await browser.setWindowSize(500, 1080);
const otb = await browser.$("#otb_a");
const overflowButton = await otb.shadow$(".ui5-tb-overflow-btn");

await overflowButton.click();

const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#otb_a");
const popover = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-popover");
assert.strictEqual(await popover.getAttribute("open"), 'true', "overflow popover created and opened on click on overflow button");
await browser.setWindowSize(1920, 1080);
});

it("Should not move button with neverOverflow priority to overflow popover", async () => {
const otb = await browser.$("#otb_c");

Expand Down

0 comments on commit dab9f98

Please sign in to comment.