Skip to content

Commit 5d8b92f

Browse files
authored
Merge pull request #105 from contentstack/fix/DX-3551-ci-workflow-tests
fix ci testcases
2 parents 00031c9 + 7711418 commit 5d8b92f

File tree

6 files changed

+64
-64
lines changed

6 files changed

+64
-64
lines changed

Tests/AssetQueryAPITest.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class AssetQueryAPITest: XCTestCase {
6161
}
6262
networkExpectation.fulfill()
6363
}
64-
wait(for: [networkExpectation], timeout: 30)
64+
await fulfillment(of: [networkExpectation], timeout: 30.0)
6565
}
6666

6767
func test02Find_AssetQuery_whereUIDEquals() async {
@@ -77,7 +77,7 @@ class AssetQueryAPITest: XCTestCase {
7777
}
7878
networkExpectation.fulfill()
7979
}
80-
wait(for: [networkExpectation], timeout: 30)
80+
await fulfillment(of: [networkExpectation], timeout: 30.0)
8181
}
8282

8383
func test03Find_AssetQuery_whereTitleDNotEquals() async {
@@ -93,7 +93,7 @@ class AssetQueryAPITest: XCTestCase {
9393
}
9494
networkExpectation.fulfill()
9595
}
96-
wait(for: [networkExpectation], timeout: 30)
96+
await fulfillment(of: [networkExpectation], timeout: 30.0)
9797
}
9898

9999
func test03Find_AssetQuery_whereFileNameEquals() async {
@@ -109,7 +109,7 @@ class AssetQueryAPITest: XCTestCase {
109109
}
110110
networkExpectation.fulfill()
111111
}
112-
wait(for: [networkExpectation], timeout: 30)
112+
await fulfillment(of: [networkExpectation], timeout: 30.0)
113113
}
114114

115115
func test04Find_AssetQuery_whereFileNameexists() async {
@@ -123,7 +123,7 @@ class AssetQueryAPITest: XCTestCase {
123123
}
124124
networkExpectation.fulfill()
125125
}
126-
wait(for: [networkExpectation], timeout: 30)
126+
await fulfillment(of: [networkExpectation], timeout: 30.0)
127127
}
128128

129129
func test05Find_AssetQuery_whereTitleMatchRegex() async {
@@ -137,7 +137,7 @@ class AssetQueryAPITest: XCTestCase {
137137
}
138138
networkExpectation.fulfill()
139139
}
140-
wait(for: [networkExpectation], timeout: 30)
140+
await fulfillment(of: [networkExpectation], timeout: 30.0)
141141
}
142142

143143
func test06Fetch_Asset_fromUID() async {
@@ -151,7 +151,7 @@ class AssetQueryAPITest: XCTestCase {
151151
}
152152
networkExpectation.fulfill()
153153
}
154-
wait(for: [networkExpectation], timeout: 30)
154+
await fulfillment(of: [networkExpectation], timeout: 30.0)
155155
}
156156

157157
func test07Fetch_AssetQuery_WithDimentsions() async {
@@ -169,7 +169,7 @@ class AssetQueryAPITest: XCTestCase {
169169
}
170170
networkExpectation.fulfill()
171171
}
172-
wait(for: [networkExpectation], timeout: 30)
172+
await fulfillment(of: [networkExpectation], timeout: 30.0)
173173

174174
}
175175

@@ -186,7 +186,7 @@ class AssetQueryAPITest: XCTestCase {
186186
}
187187
networkExpectation.fulfill()
188188
}
189-
wait(for: [networkExpectation], timeout: 30)
189+
await fulfillment(of: [networkExpectation], timeout: 30.0)
190190
}
191191

192192
func test09Fetch_AssetQuery_WithCount() async {
@@ -203,7 +203,7 @@ class AssetQueryAPITest: XCTestCase {
203203
}
204204
networkExpectation.fulfill()
205205
}
206-
wait(for: [networkExpectation], timeout: 30)
206+
await fulfillment(of: [networkExpectation], timeout: 30.0)
207207

208208
}
209209

@@ -221,7 +221,7 @@ class AssetQueryAPITest: XCTestCase {
221221
}
222222
networkExpectation.fulfill()
223223
}
224-
wait(for: [networkExpectation], timeout: 30)
224+
await fulfillment(of: [networkExpectation], timeout: 30.0)
225225
}
226226

227227
func test12Fetch_AssetQuery_WithoutFallback_Result() async {
@@ -242,7 +242,7 @@ class AssetQueryAPITest: XCTestCase {
242242
}
243243
networkExpectation.fulfill()
244244
}
245-
wait(for: [networkExpectation], timeout: 30)
245+
await fulfillment(of: [networkExpectation], timeout: 30.0)
246246
}
247247

248248
func test13Fetch_AssetQuery_Fallback_Result() async {
@@ -275,7 +275,7 @@ class AssetQueryAPITest: XCTestCase {
275275
}
276276
networkExpectation.fulfill()
277277
}
278-
wait(for: [networkExpectation], timeout: 30)
278+
await fulfillment(of: [networkExpectation], timeout: 30.0)
279279
}
280280

281281
func test14Fetch_Asset_UIDWithoutFallback_NoResult() async {
@@ -294,7 +294,7 @@ class AssetQueryAPITest: XCTestCase {
294294
}
295295
networkExpectation.fulfill()
296296
}
297-
wait(for: [networkExpectation], timeout: 30)
297+
await fulfillment(of: [networkExpectation], timeout: 30.0)
298298
}
299299

300300
func test15Fetch_Asset_UIDWithFallback_NoResult() async {
@@ -315,6 +315,6 @@ class AssetQueryAPITest: XCTestCase {
315315
}
316316
networkExpectation.fulfill()
317317
}
318-
wait(for: [networkExpectation], timeout: 30)
318+
await fulfillment(of: [networkExpectation], timeout: 30.0)
319319
}
320320
}

Tests/ContentTypeQueryAPITest.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ContentTypeQueryAPITest: XCTestCase {
5656
}
5757
networkExpectation.fulfill()
5858
}
59-
wait(for: [networkExpectation], timeout: 30)
59+
await fulfillment(of: [networkExpectation], timeout: 30.0)
6060
}
6161

6262
func test02Find_ContentTypeQuery_whereUIDEquals() async {
@@ -72,7 +72,7 @@ class ContentTypeQueryAPITest: XCTestCase {
7272
}
7373
networkExpectation.fulfill()
7474
}
75-
wait(for: [networkExpectation], timeout: 30)
75+
await fulfillment(of: [networkExpectation], timeout: 30.0)
7676
}
7777

7878
func test03Find_ContentTypeQuery_whereTitleDNotEquals() async {
@@ -88,7 +88,7 @@ class ContentTypeQueryAPITest: XCTestCase {
8888
}
8989
networkExpectation.fulfill()
9090
}
91-
wait(for: [networkExpectation], timeout: 30)
91+
await fulfillment(of: [networkExpectation], timeout: 30.0)
9292
}
9393

9494
func test04Find_ContentTypeQuery_whereDescriptionexists() async {
@@ -102,7 +102,7 @@ class ContentTypeQueryAPITest: XCTestCase {
102102
}
103103
networkExpectation.fulfill()
104104
}
105-
wait(for: [networkExpectation], timeout: 30)
105+
await fulfillment(of: [networkExpectation], timeout: 30.0)
106106
}
107107

108108
func test05Find_ContentTypeQuery_whereTitleMatchRegex() async {
@@ -116,7 +116,7 @@ class ContentTypeQueryAPITest: XCTestCase {
116116
}
117117
networkExpectation.fulfill()
118118
}
119-
wait(for: [networkExpectation], timeout: 30)
119+
await fulfillment(of: [networkExpectation], timeout: 30.0)
120120
}
121121

122122
func test06Fetch_ContentType_fromUID() async {
@@ -130,7 +130,7 @@ class ContentTypeQueryAPITest: XCTestCase {
130130
}
131131
networkExpectation.fulfill()
132132
}
133-
wait(for: [networkExpectation], timeout: 30)
133+
await fulfillment(of: [networkExpectation], timeout: 30.0)
134134
}
135135

136136
func test07Fetch_ContentTypeQuery_WithGlobalFields() async {
@@ -154,7 +154,7 @@ class ContentTypeQueryAPITest: XCTestCase {
154154
}
155155
networkExpectation.fulfill()
156156
}
157-
wait(for: [networkExpectation], timeout: 30)
157+
await fulfillment(of: [networkExpectation], timeout: 30.0)
158158

159159
}
160160

@@ -176,7 +176,7 @@ class ContentTypeQueryAPITest: XCTestCase {
176176
}
177177
networkExpectation.fulfill()
178178
}
179-
wait(for: [networkExpectation], timeout: 30)
179+
await fulfillment(of: [networkExpectation], timeout: 30.0)
180180
}
181181

182182
func test09Fetch_ContentTypeQuery_WithCount() async {
@@ -192,7 +192,7 @@ class ContentTypeQueryAPITest: XCTestCase {
192192
}
193193
networkExpectation.fulfill()
194194
}
195-
wait(for: [networkExpectation], timeout: 30)
195+
await fulfillment(of: [networkExpectation], timeout: 30.0)
196196

197197
}
198198

@@ -210,6 +210,6 @@ class ContentTypeQueryAPITest: XCTestCase {
210210
}
211211
networkExpectation.fulfill()
212212
}
213-
wait(for: [networkExpectation], timeout: 30)
213+
await fulfillment(of: [networkExpectation], timeout: 30.0)
214214
}
215215
}

0 commit comments

Comments
 (0)