Skip to content

Commit 19e2f00

Browse files
crazytonylimokagio
andauthored
Remove a wait result assertion (#24978)
* Remove a wait result assertion * Add a missing taxonomies API stub * Ignore return value Co-authored-by: Gio Lodi <gio@mokacoding.com> --------- Co-authored-by: Gio Lodi <gio@mokacoding.com>
1 parent b378b0b commit 19e2f00

File tree

3 files changed

+259
-10
lines changed

3 files changed

+259
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
{
2+
"request": {
3+
"method": "GET",
4+
"urlPath": "/wp/v2/sites/106707880/taxonomies",
5+
"queryParameters": {
6+
"context": {
7+
"equalTo": "edit"
8+
}
9+
}
10+
},
11+
"response": {
12+
"status": 200,
13+
"jsonBody": {
14+
"category": {
15+
"name": "Categories",
16+
"slug": "category",
17+
"capabilities": {
18+
"manage_terms": "manage_categories",
19+
"edit_terms": "edit_categories",
20+
"delete_terms": "delete_categories",
21+
"assign_terms": "assign_categories"
22+
},
23+
"description": "",
24+
"labels": {
25+
"name": "Categories",
26+
"singular_name": "Category",
27+
"search_items": "Search Categories",
28+
"popular_items": null,
29+
"all_items": "All Categories",
30+
"parent_item": "Parent Category",
31+
"parent_item_colon": "Parent Category:",
32+
"name_field_description": "The name is how it appears on your site.",
33+
"slug_field_description": "The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.",
34+
"parent_field_description": "Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.",
35+
"desc_field_description": "The description is not prominent by default; however, some themes may show it.",
36+
"edit_item": "Edit Category",
37+
"view_item": "View Category",
38+
"update_item": "Update Category",
39+
"add_new_item": "Add Category",
40+
"new_item_name": "New Category Name",
41+
"separate_items_with_commas": null,
42+
"add_or_remove_items": null,
43+
"choose_from_most_used": null,
44+
"not_found": "No categories found.",
45+
"no_terms": "No categories",
46+
"filter_by_item": "Filter by category",
47+
"items_list_navigation": "Categories list navigation",
48+
"items_list": "Categories list",
49+
"most_used": "Most Used",
50+
"back_to_items": "&larr; Go to Categories",
51+
"item_link": "Category Link",
52+
"item_link_description": "A link to a category.",
53+
"menu_name": "Categories",
54+
"name_admin_bar": "category",
55+
"template_name": "Category Archives"
56+
},
57+
"types": ["post"],
58+
"show_cloud": true,
59+
"hierarchical": true,
60+
"rest_base": "categories",
61+
"rest_namespace": "wp/v2",
62+
"visibility": {
63+
"public": true,
64+
"publicly_queryable": true,
65+
"show_admin_column": true,
66+
"show_in_nav_menus": true,
67+
"show_in_quick_edit": true,
68+
"show_ui": true
69+
}
70+
},
71+
"post_tag": {
72+
"name": "Tags",
73+
"slug": "post_tag",
74+
"capabilities": {
75+
"manage_terms": "manage_post_tags",
76+
"edit_terms": "edit_post_tags",
77+
"delete_terms": "delete_post_tags",
78+
"assign_terms": "assign_post_tags"
79+
},
80+
"description": "",
81+
"labels": {
82+
"name": "Tags",
83+
"singular_name": "Tag",
84+
"search_items": "Search Tags",
85+
"popular_items": "Popular Tags",
86+
"all_items": "All Tags",
87+
"parent_item": null,
88+
"parent_item_colon": null,
89+
"name_field_description": "The name is how it appears on your site.",
90+
"slug_field_description": "The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.",
91+
"parent_field_description": null,
92+
"desc_field_description": "The description is not prominent by default; however, some themes may show it.",
93+
"edit_item": "Edit Tag",
94+
"view_item": "View Tag",
95+
"update_item": "Update Tag",
96+
"add_new_item": "Add Tag",
97+
"new_item_name": "New Tag Name",
98+
"separate_items_with_commas": "Separate tags with commas",
99+
"add_or_remove_items": "Add or remove tags",
100+
"choose_from_most_used": "Choose from the most used tags",
101+
"not_found": "No tags found.",
102+
"no_terms": "No tags",
103+
"filter_by_item": null,
104+
"items_list_navigation": "Tags list navigation",
105+
"items_list": "Tags list",
106+
"most_used": "Most Used",
107+
"back_to_items": "&larr; Go to Tags",
108+
"item_link": "Tag Link",
109+
"item_link_description": "A link to a tag.",
110+
"menu_name": "Tags",
111+
"name_admin_bar": "post_tag",
112+
"template_name": "Tag Archives"
113+
},
114+
"types": ["post"],
115+
"show_cloud": true,
116+
"hierarchical": false,
117+
"rest_base": "tags",
118+
"rest_namespace": "wp/v2",
119+
"visibility": {
120+
"public": true,
121+
"publicly_queryable": true,
122+
"show_admin_column": true,
123+
"show_in_nav_menus": true,
124+
"show_in_quick_edit": true,
125+
"show_ui": true
126+
}
127+
},
128+
"nav_menu": {
129+
"name": "Navigation Menus",
130+
"slug": "nav_menu",
131+
"capabilities": {
132+
"manage_terms": "edit_theme_options",
133+
"edit_terms": "edit_theme_options",
134+
"delete_terms": "edit_theme_options",
135+
"assign_terms": "edit_theme_options"
136+
},
137+
"description": "",
138+
"labels": {
139+
"name": "Navigation Menus",
140+
"singular_name": "Navigation Menu",
141+
"search_items": "Search Tags",
142+
"popular_items": "Popular Tags",
143+
"all_items": "Navigation Menus",
144+
"parent_item": null,
145+
"parent_item_colon": null,
146+
"name_field_description": "The name is how it appears on your site.",
147+
"slug_field_description": "The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.",
148+
"parent_field_description": null,
149+
"desc_field_description": "The description is not prominent by default; however, some themes may show it.",
150+
"edit_item": "Edit Tag",
151+
"view_item": "View Tag",
152+
"update_item": "Update Tag",
153+
"add_new_item": "Add Tag",
154+
"new_item_name": "New Tag Name",
155+
"separate_items_with_commas": "Separate tags with commas",
156+
"add_or_remove_items": "Add or remove tags",
157+
"choose_from_most_used": "Choose from the most used tags",
158+
"not_found": "No tags found.",
159+
"no_terms": "No tags",
160+
"filter_by_item": null,
161+
"items_list_navigation": "Tags list navigation",
162+
"items_list": "Tags list",
163+
"most_used": "Most Used",
164+
"back_to_items": "&larr; Go to Tags",
165+
"item_link": "Tag Link",
166+
"item_link_description": "A link to a tag.",
167+
"menu_name": "Navigation Menus",
168+
"name_admin_bar": "Navigation Menu",
169+
"archives": "Navigation Menus",
170+
"template_name": "Navigation Menu Archives"
171+
},
172+
"types": ["nav_menu_item"],
173+
"show_cloud": false,
174+
"hierarchical": false,
175+
"rest_base": "menus",
176+
"rest_namespace": "wp/v2",
177+
"visibility": {
178+
"public": false,
179+
"publicly_queryable": false,
180+
"show_admin_column": false,
181+
"show_in_nav_menus": false,
182+
"show_in_quick_edit": false,
183+
"show_ui": false
184+
}
185+
},
186+
"wp_pattern_category": {
187+
"name": "Pattern Categories",
188+
"slug": "wp_pattern_category",
189+
"capabilities": {
190+
"manage_terms": "manage_categories",
191+
"edit_terms": "manage_categories",
192+
"delete_terms": "manage_categories",
193+
"assign_terms": "edit_posts"
194+
},
195+
"description": "",
196+
"labels": {
197+
"name": "Pattern Categories",
198+
"singular_name": "Pattern Category",
199+
"search_items": "Search Pattern Categories",
200+
"popular_items": "Popular Pattern Categories",
201+
"all_items": "Pattern Categories",
202+
"parent_item": null,
203+
"parent_item_colon": null,
204+
"name_field_description": "The name is how it appears on your site.",
205+
"slug_field_description": "The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.",
206+
"parent_field_description": null,
207+
"desc_field_description": "The description is not prominent by default; however, some themes may show it.",
208+
"edit_item": "Edit Pattern Category",
209+
"view_item": "View Pattern Category",
210+
"update_item": "Update Pattern Category",
211+
"add_new_item": "Add Category",
212+
"new_item_name": "New Pattern Category Name",
213+
"separate_items_with_commas": "Separate pattern categories with commas",
214+
"add_or_remove_items": "Add or remove pattern categories",
215+
"choose_from_most_used": "Choose from the most used pattern categories",
216+
"not_found": "No pattern categories found.",
217+
"no_terms": "No pattern categories",
218+
"filter_by_item": null,
219+
"items_list_navigation": "Pattern Categories list navigation",
220+
"items_list": "Pattern Categories list",
221+
"most_used": "Most Used",
222+
"back_to_items": "&larr; Go to Pattern Categories",
223+
"item_link": "Pattern Category Link",
224+
"item_link_description": "A link to a pattern category.",
225+
"menu_name": "Pattern Categories",
226+
"name_admin_bar": "Pattern Category",
227+
"archives": "Pattern Categories",
228+
"template_name": "Pattern Category Archives"
229+
},
230+
"types": ["wp_block"],
231+
"show_cloud": false,
232+
"hierarchical": false,
233+
"rest_base": "wp_pattern_category",
234+
"rest_namespace": "wp/v2",
235+
"visibility": {
236+
"public": false,
237+
"publicly_queryable": false,
238+
"show_admin_column": true,
239+
"show_in_nav_menus": false,
240+
"show_in_quick_edit": true,
241+
"show_ui": true
242+
}
243+
}
244+
},
245+
"headers": {
246+
"Content-Type": "application/json",
247+
"Connection": "keep-alive",
248+
"Cache-Control": "no-cache, must-revalidate, max-age=0"
249+
}
250+
}
251+
}

Modules/Sources/UITestsFoundation/Screens/ReaderScreen.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ public class ReaderScreen: ScreenObject {
143143
private func waitForLoadingToFinish() {
144144
let doesNotExistPredicate = NSPredicate(format: "exists == FALSE")
145145
let expectation = XCTNSPredicateExpectation(predicate: doesNotExistPredicate, object: ghostLoading)
146-
let result = XCTWaiter.wait(for: [expectation], timeout: 5.0)
147-
XCTAssertEqual(result, .completed)
146+
_ = XCTWaiter.wait(for: [expectation], timeout: 5.0)
148147
}
149148

150149
@discardableResult

WordPress/UITests/Tests/ReaderTests.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ class ReaderTests_01: ReaderTests {
3737
.verifyPostContentEquals(.expectedPostContent)
3838
}
3939

40-
// This test is flaky on CI, but passing consistently locally
41-
// func testDiscover() throws {
42-
// try openStream(.discover)
43-
// .selectTag()
44-
// .verifyTagLoaded()
45-
// .followTag()
46-
// .verifyTagFollowed()
47-
// }
40+
func testDiscover() throws {
41+
try openStream(.discover)
42+
.selectTag()
43+
.verifyTagLoaded()
44+
.followTag()
45+
.verifyTagFollowed()
46+
}
4847
}
4948

5049
class ReaderTests_02: ReaderTests {

0 commit comments

Comments
 (0)