Skip to content

Commit 6680eb6

Browse files
authored
chore(tab-container): migrate wdio tests to cypress (#11852)
Co-authored-by: Duygu Ramadan <[email protected]>
1 parent 669c6ea commit 6680eb6

File tree

5 files changed

+48
-260
lines changed

5 files changed

+48
-260
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import Button from "../../src/Button.js";
2+
import Popover from "../../src/Popover.js";
3+
import Tab from "../../src/Tab.js";
4+
import TabContainer from "../../src/TabContainer.js";
5+
import TabSeparator from "../../src/TabSeparator.js";
6+
7+
describe("Mobile: TabContainer general interaction", () => {
8+
before(() => {
9+
cy.viewport('iphone-x');
10+
});
11+
12+
it("should close the overflow popover when pressing the cancel button", () => {
13+
cy.mount(
14+
<TabContainer id="tabContainerNestedTabs">
15+
<Tab text="One">
16+
<Button>Button 1</Button>
17+
</Tab>
18+
19+
<TabSeparator></TabSeparator>
20+
21+
<Tab text="Two">
22+
<Button id="button2">Button 2</Button>
23+
</Tab>
24+
25+
<Tab text="Fifteen"></Tab>
26+
<Tab text="Sixteen"></Tab>
27+
<Tab text="Seventeen"></Tab>
28+
<Tab text="Seven"></Tab>
29+
30+
</TabContainer>);
31+
32+
cy.get("#tabContainerNestedTabs")
33+
.shadow()
34+
.find(`[data-ui5-stable="overflow-end"]`)
35+
.realClick();
36+
37+
cy.get<Popover>("#tabContainerNestedTabs")
38+
.shadow()
39+
.find("ui5-responsive-popover")
40+
.as("popover");
41+
42+
cy.get<Popover>("@popover").ui5PopoverOpened();
43+
44+
cy.get("@popover").realClick();
45+
46+
cy.get("@popover").should("have.prop", "open", false);
47+
});
48+
});

packages/main/test/specs/Label.spec.js

Lines changed: 0 additions & 129 deletions
This file was deleted.

packages/main/test/specs/TabContainer.mobile.spec.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/main/test/specs/Tag.spec.js

Lines changed: 0 additions & 74 deletions
This file was deleted.

packages/main/test/specs/Title.spec.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)