Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui5-tabcontainer): fix closing overflow on mobile (#5855)
Fixes #5854
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const assert = require("chai").assert; | ||
|
||
describe("Mobile: TabContainer general interaction", () => { | ||
before(async () => { | ||
await browser.url("test/pages/TabContainer.html"); | ||
await browser.emulateDevice("iPhone X"); | ||
}); | ||
|
||
it("should close the overflow popover when pressing the cancel button", async () => { | ||
const moreButton = await browser.$("#tabContainerNestedTabs").shadow$(`[data-ui5-stable="overflow-end"]`); | ||
await moreButton.click(); | ||
|
||
const staticAreaItemClassName = await browser.getStaticAreaItemClassName("#tabContainerNestedTabs"); | ||
let overflow = await browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover"); | ||
const closeButton = await overflow.$("ui5-button"); | ||
|
||
assert.ok(await overflow.getProperty("open"), "Overflow is opened"); | ||
|
||
await closeButton.click(); | ||
|
||
assert.notOk(await overflow.getProperty("open"), "Overflow is closed"); | ||
}); | ||
}); |