Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update Toolbar test #7531

Merged
merged 1 commit into from
Sep 1, 2023
Merged
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
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
Loading