Skip to content

Commit 094d9a8

Browse files
committed
test(segment-view): remove toolbars
1 parent b75650b commit 094d9a8

File tree

3 files changed

+95
-95
lines changed

3 files changed

+95
-95
lines changed

core/src/components/segment-view/test/basic/index.html

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -47,49 +47,43 @@
4747
</ion-header>
4848

4949
<ion-content>
50-
<ion-toolbar>
51-
<ion-segment id="noValueSegment">
52-
<ion-segment-button content-id="no" value="no">
53-
<ion-label>No</ion-label>
54-
</ion-segment-button>
55-
<ion-segment-button content-id="value" value="value">
56-
<ion-label>Value</ion-label>
57-
</ion-segment-button>
58-
</ion-segment>
59-
</ion-toolbar>
50+
<ion-segment id="noValueSegment">
51+
<ion-segment-button content-id="no" value="no">
52+
<ion-label>No</ion-label>
53+
</ion-segment-button>
54+
<ion-segment-button content-id="value" value="value">
55+
<ion-label>Value</ion-label>
56+
</ion-segment-button>
57+
</ion-segment>
6058
<ion-segment-view id="noValueSegmentView">
6159
<ion-segment-content id="no">No</ion-segment-content>
6260
<ion-segment-content id="value">Value</ion-segment-content>
6361
</ion-segment-view>
6462

65-
<ion-toolbar>
66-
<ion-segment value="all">
67-
<ion-segment-button content-id="all" value="all">
68-
<ion-label>All</ion-label>
69-
</ion-segment-button>
70-
<ion-segment-button content-id="favorites" value="favorites">
71-
<ion-label>Favorites</ion-label>
72-
</ion-segment-button>
73-
</ion-segment>
74-
</ion-toolbar>
63+
<ion-segment value="all">
64+
<ion-segment-button content-id="all" value="all">
65+
<ion-label>All</ion-label>
66+
</ion-segment-button>
67+
<ion-segment-button content-id="favorites" value="favorites">
68+
<ion-label>Favorites</ion-label>
69+
</ion-segment-button>
70+
</ion-segment>
7571
<ion-segment-view>
7672
<ion-segment-content id="all">All</ion-segment-content>
7773
<ion-segment-content id="favorites">Favorites</ion-segment-content>
7874
</ion-segment-view>
7975

80-
<ion-toolbar>
81-
<ion-segment value="free">
82-
<ion-segment-button content-id="paid" value="paid">
83-
<ion-label>Paid</ion-label>
84-
</ion-segment-button>
85-
<ion-segment-button content-id="free" value="free">
86-
<ion-label>Free</ion-label>
87-
</ion-segment-button>
88-
<ion-segment-button content-id="top" value="top">
89-
<ion-label>Top</ion-label>
90-
</ion-segment-button>
91-
</ion-segment>
92-
</ion-toolbar>
76+
<ion-segment value="free">
77+
<ion-segment-button content-id="paid" value="paid">
78+
<ion-label>Paid</ion-label>
79+
</ion-segment-button>
80+
<ion-segment-button content-id="free" value="free">
81+
<ion-label>Free</ion-label>
82+
</ion-segment-button>
83+
<ion-segment-button content-id="top" value="top">
84+
<ion-label>Top</ion-label>
85+
</ion-segment-button>
86+
</ion-segment>
9387
<ion-segment-view>
9488
<ion-segment-content id="paid">Paid</ion-segment-content>
9589
<ion-segment-content id="free">Free</ion-segment-content>

core/src/components/segment-view/test/basic/segment-view.e2e.ts

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
99
test('should show the first content with no initial value', async ({ page }) => {
1010
await page.setContent(
1111
`
12-
<ion-segment>
13-
<ion-segment-button content-id="paid" value="paid">
14-
<ion-label>Paid</ion-label>
15-
</ion-segment-button>
16-
<ion-segment-button content-id="free" value="free">
17-
<ion-label>Free</ion-label>
18-
</ion-segment-button>
19-
<ion-segment-button content-id="top" value="top">
20-
<ion-label>Top</ion-label>
21-
</ion-segment-button>
22-
</ion-segment>
23-
</ion-toolbar>
12+
<ion-segment>
13+
<ion-segment-button content-id="paid" value="paid">
14+
<ion-label>Paid</ion-label>
15+
</ion-segment-button>
16+
<ion-segment-button content-id="free" value="free">
17+
<ion-label>Free</ion-label>
18+
</ion-segment-button>
19+
<ion-segment-button content-id="top" value="top">
20+
<ion-label>Top</ion-label>
21+
</ion-segment-button>
22+
</ion-segment>
2423
<ion-segment-view>
2524
<ion-segment-content id="paid">Paid</ion-segment-content>
2625
<ion-segment-content id="free">Free</ion-segment-content>
@@ -37,18 +36,17 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
3736
test('should show the content matching the initial value', async ({ page }) => {
3837
await page.setContent(
3938
`
40-
<ion-segment value="free">
41-
<ion-segment-button content-id="paid" value="paid">
42-
<ion-label>Paid</ion-label>
43-
</ion-segment-button>
44-
<ion-segment-button content-id="free" value="free">
45-
<ion-label>Free</ion-label>
46-
</ion-segment-button>
47-
<ion-segment-button content-id="top" value="top">
48-
<ion-label>Top</ion-label>
49-
</ion-segment-button>
50-
</ion-segment>
51-
</ion-toolbar>
39+
<ion-segment value="free">
40+
<ion-segment-button content-id="paid" value="paid">
41+
<ion-label>Paid</ion-label>
42+
</ion-segment-button>
43+
<ion-segment-button content-id="free" value="free">
44+
<ion-label>Free</ion-label>
45+
</ion-segment-button>
46+
<ion-segment-button content-id="top" value="top">
47+
<ion-label>Top</ion-label>
48+
</ion-segment-button>
49+
</ion-segment>
5250
<ion-segment-view>
5351
<ion-segment-content id="paid">Paid</ion-segment-content>
5452
<ion-segment-content id="free">Free</ion-segment-content>
@@ -65,18 +63,17 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
6563
test('should update the content when changing the value by clicking a segment button', async ({ page }) => {
6664
await page.setContent(
6765
`
68-
<ion-segment value="free">
69-
<ion-segment-button content-id="paid" value="paid">
70-
<ion-label>Paid</ion-label>
71-
</ion-segment-button>
72-
<ion-segment-button content-id="free" value="free">
73-
<ion-label>Free</ion-label>
74-
</ion-segment-button>
75-
<ion-segment-button content-id="top" value="top">
76-
<ion-label>Top</ion-label>
77-
</ion-segment-button>
78-
</ion-segment>
79-
</ion-toolbar>
66+
<ion-segment value="free">
67+
<ion-segment-button content-id="paid" value="paid">
68+
<ion-label>Paid</ion-label>
69+
</ion-segment-button>
70+
<ion-segment-button content-id="free" value="free">
71+
<ion-label>Free</ion-label>
72+
</ion-segment-button>
73+
<ion-segment-button content-id="top" value="top">
74+
<ion-label>Top</ion-label>
75+
</ion-segment-button>
76+
</ion-segment>
8077
<ion-segment-view>
8178
<ion-segment-content id="paid">Paid</ion-segment-content>
8279
<ion-segment-content id="free">Free</ion-segment-content>

core/src/components/segment-view/test/disabled/index.html

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,38 +51,47 @@
5151
</ion-header>
5252

5353
<ion-content>
54-
<ion-toolbar>
55-
<ion-segment value="paid">
56-
<ion-segment-button content-id="paid" value="paid">
57-
<ion-label>Paid</ion-label>
58-
</ion-segment-button>
59-
<ion-segment-button disabled content-id="free" value="free">
60-
<ion-label>Free</ion-label>
61-
</ion-segment-button>
62-
<ion-segment-button content-id="top" value="top">
63-
<ion-label>Top</ion-label>
64-
</ion-segment-button>
65-
</ion-segment>
66-
</ion-toolbar>
54+
<ion-segment>
55+
<ion-segment-button disabled content-id="all" value="all">
56+
<ion-label>All</ion-label>
57+
</ion-segment-button>
58+
<ion-segment-button content-id="favorites" value="favorites">
59+
<ion-label>Favorites</ion-label>
60+
</ion-segment-button>
61+
</ion-segment>
62+
<ion-segment-view>
63+
<ion-segment-content disabled id="all">All</ion-segment-content>
64+
<ion-segment-content id="favorites">Favorites</ion-segment-content>
65+
</ion-segment-view>
66+
67+
<ion-segment value="paid">
68+
<ion-segment-button content-id="paid" value="paid">
69+
<ion-label>Paid</ion-label>
70+
</ion-segment-button>
71+
<ion-segment-button disabled content-id="free" value="free">
72+
<ion-label>Free</ion-label>
73+
</ion-segment-button>
74+
<ion-segment-button content-id="top" value="top">
75+
<ion-label>Top</ion-label>
76+
</ion-segment-button>
77+
</ion-segment>
6778
<ion-segment-view>
6879
<ion-segment-content id="paid">Paid</ion-segment-content>
6980
<ion-segment-content disabled id="free">Free</ion-segment-content>
7081
<ion-segment-content id="top">Top</ion-segment-content>
7182
</ion-segment-view>
7283

73-
<ion-toolbar>
74-
<ion-segment disabled value="reading-list">
75-
<ion-segment-button content-id="bookmarks" value="bookmarks">
76-
<ion-label>Bookmarks</ion-label>
77-
</ion-segment-button>
78-
<ion-segment-button content-id="reading-list" value="reading-list">
79-
<ion-label>Reading List</ion-label>
80-
</ion-segment-button>
81-
<ion-segment-button content-id="shared-links" value="shared-links">
82-
<ion-label>Shared Links</ion-label>
83-
</ion-segment-button>
84-
</ion-segment>
85-
</ion-toolbar>
84+
<ion-segment disabled value="reading-list">
85+
<ion-segment-button content-id="bookmarks" value="bookmarks">
86+
<ion-label>Bookmarks</ion-label>
87+
</ion-segment-button>
88+
<ion-segment-button content-id="reading-list" value="reading-list">
89+
<ion-label>Reading List</ion-label>
90+
</ion-segment-button>
91+
<ion-segment-button content-id="shared-links" value="shared-links">
92+
<ion-label>Shared Links</ion-label>
93+
</ion-segment-button>
94+
</ion-segment>
8695
<ion-segment-view disabled>
8796
<ion-segment-content id="bookmarks">Bookmarks</ion-segment-content>
8897
<ion-segment-content id="reading-list">Reading List</ion-segment-content>

0 commit comments

Comments
 (0)