Skip to content

Commit 64c3670

Browse files
committed
Merge branch 'staging' into fix/DX-3551-ci-workflow-tests
2 parents 588a3cf + 6fe4b28 commit 64c3670

File tree

7 files changed

+94
-135
lines changed

7 files changed

+94
-135
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up Xcode
3434
uses: maxim-lobanov/setup-xcode@v1
3535
with:
36-
xcode-version: '15.4.0'
36+
xcode-version: latest
3737

3838
- name: Create config file
3939
run: |
@@ -77,8 +77,7 @@ jobs:
7777
- name: Set up Xcode
7878
uses: maxim-lobanov/setup-xcode@v1
7979
with:
80-
xcode-version: '15.4.0'
81-
80+
xcode-version: '16.4.0'
8281
- name: Create config file
8382
run: |
8483
echo '{
@@ -92,7 +91,7 @@ jobs:
9291
xcodebuild test \
9392
-workspace ContentstackSwift.xcworkspace \
9493
-scheme "ContentstackSwift iOS Tests" \
95-
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' \
94+
-destination "platform=iOS Simulator,name=iPhone 16,OS=18.5" \
9695
-sdk iphonesimulator \
9796
ONLY_ACTIVE_ARCH=NO \
9897
CODE_SIGNING_ALLOWED=NO

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "contentstack/contentstack-swift-dvr" "c8040a2451e4bc2c312347531cac6c73f23ce50c"
1+
github "contentstack/contentstack-swift-dvr" "v1.0.0"
22
github "contentstack/contentstack-utils-swift" "v1.3.4"

Tests/AssetQueryAPITest.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AssetQueryAPITest: XCTestCase {
4545
(stack.urlSession as? DVR.Session)?.endRecording()
4646
}
4747

48-
func test01FindAll_AssetQuery() {
48+
func test01FindAll_AssetQuery() async {
4949
let networkExpectation = expectation(description: "Fetch All Assets Test")
5050
self.getAssetQuery().locale("en-us").find { (result: Result<ContentstackResponse<AssetModel>, Error>, response: ResponseType) in
5151
switch result {
@@ -64,7 +64,7 @@ class AssetQueryAPITest: XCTestCase {
6464
wait(for: [networkExpectation], timeout: 30)
6565
}
6666

67-
func test02Find_AssetQuery_whereUIDEquals() {
67+
func test02Find_AssetQuery_whereUIDEquals() async {
6868
let networkExpectation = expectation(description: "Fetch where UID equals Assets Test")
6969
self.queryWhere(.uid, operation: .equals(AssetQueryAPITest.kAssetUID)) { (result: Result<ContentstackResponse<AssetModel>, Error>) in
7070
switch result {
@@ -80,7 +80,7 @@ class AssetQueryAPITest: XCTestCase {
8080
wait(for: [networkExpectation], timeout: 30)
8181
}
8282

83-
func test03Find_AssetQuery_whereTitleDNotEquals() {
83+
func test03Find_AssetQuery_whereTitleDNotEquals() async {
8484
let networkExpectation = expectation(description: "Fetch where Title equals Assets Test")
8585
self.queryWhere(.title, operation: .notEquals(AssetQueryAPITest.kAssetTitle)) { (result: Result<ContentstackResponse<AssetModel>, Error>) in
8686
switch result {
@@ -96,7 +96,7 @@ class AssetQueryAPITest: XCTestCase {
9696
wait(for: [networkExpectation], timeout: 30)
9797
}
9898

99-
func test03Find_AssetQuery_whereFileNameEquals() {
99+
func test03Find_AssetQuery_whereFileNameEquals() async {
100100
let networkExpectation = expectation(description: "Fetch where Title equals Assets Test")
101101
self.queryWhere(.fileName, operation: .notEquals(AssetQueryAPITest.kFileName)) { (result: Result<ContentstackResponse<AssetModel>, Error>) in
102102
switch result {
@@ -112,7 +112,7 @@ class AssetQueryAPITest: XCTestCase {
112112
wait(for: [networkExpectation], timeout: 30)
113113
}
114114

115-
func test04Find_AssetQuery_whereFileNameexists() {
115+
func test04Find_AssetQuery_whereFileNameexists() async {
116116
let networkExpectation = expectation(description: "Fetch where fileName exists Assets Test")
117117
self.queryWhere(.fileName, operation: .exists(true)) { (result: Result<ContentstackResponse<AssetModel>, Error>) in
118118
switch result {
@@ -126,7 +126,7 @@ class AssetQueryAPITest: XCTestCase {
126126
wait(for: [networkExpectation], timeout: 30)
127127
}
128128

129-
func test05Find_AssetQuery_whereTitleMatchRegex() {
129+
func test05Find_AssetQuery_whereTitleMatchRegex() async {
130130
let networkExpectation = expectation(description: "Fetch where Title Match Regex Assets Test")
131131
self.queryWhere(.title, operation: .matches("im")) { (result: Result<ContentstackResponse<AssetModel>, Error>) in
132132
switch result {
@@ -140,7 +140,7 @@ class AssetQueryAPITest: XCTestCase {
140140
wait(for: [networkExpectation], timeout: 30)
141141
}
142142

143-
func test06Fetch_Asset_fromUID() {
143+
func test06Fetch_Asset_fromUID() async {
144144
let networkExpectation = expectation(description: "Fetch Assets from UID Test")
145145
self.getAsset(uid: AssetQueryAPITest.kAssetUID).fetch { (result: Result<AssetModel, Error>, response: ResponseType) in
146146
switch result {
@@ -154,7 +154,7 @@ class AssetQueryAPITest: XCTestCase {
154154
wait(for: [networkExpectation], timeout: 30)
155155
}
156156

157-
func test07Fetch_AssetQuery_WithDimentsions() {
157+
func test07Fetch_AssetQuery_WithDimentsions() async {
158158
let networkExpectation = expectation(description: "Fetch Assets with GLobalFields Test")
159159
self.getAssetQuery()
160160
.include(params: .dimension)
@@ -173,7 +173,7 @@ class AssetQueryAPITest: XCTestCase {
173173

174174
}
175175

176-
func test08Fetch_Asset_WithGlobalFields() {
176+
func test08Fetch_Asset_WithGlobalFields() async {
177177
let networkExpectation = expectation(description: "Fetch Assets with GlobalFields Test")
178178
self.getAsset(uid: AssetQueryAPITest.kAssetUID)
179179
.includeDimension()
@@ -189,7 +189,7 @@ class AssetQueryAPITest: XCTestCase {
189189
wait(for: [networkExpectation], timeout: 30)
190190
}
191191

192-
func test09Fetch_AssetQuery_WithCount() {
192+
func test09Fetch_AssetQuery_WithCount() async {
193193
let networkExpectation = expectation(description: "Fetch Assets with Count Test")
194194
self.getAssetQuery()
195195
.locale("en-us")
@@ -207,7 +207,7 @@ class AssetQueryAPITest: XCTestCase {
207207

208208
}
209209

210-
func test11Fetch_Asset_WithWrongUID_shouldFail() {
210+
func test11Fetch_Asset_WithWrongUID_shouldFail() async {
211211
let networkExpectation = expectation(description: "Fetch Assets from wrong UID Test")
212212
self.getAsset(uid: "UID").fetch { (result: Result<AssetModel, Error>, response: ResponseType) in
213213
switch result {
@@ -224,7 +224,7 @@ class AssetQueryAPITest: XCTestCase {
224224
wait(for: [networkExpectation], timeout: 30)
225225
}
226226

227-
func test12Fetch_AssetQuery_WithoutFallback_Result() {
227+
func test12Fetch_AssetQuery_WithoutFallback_Result() async {
228228
let networkExpectation = expectation(description: "Fetch Assets without Fallback Test")
229229
self.getAssetQuery().locale(AssetQueryAPITest.locale)
230230
.find { (result: Result<ContentstackResponse<AssetModel>, Error>, response: ResponseType) in
@@ -245,7 +245,7 @@ class AssetQueryAPITest: XCTestCase {
245245
wait(for: [networkExpectation], timeout: 30)
246246
}
247247

248-
func test13Fetch_AssetQuery_Fallback_Result() {
248+
func test13Fetch_AssetQuery_Fallback_Result() async {
249249
let networkExpectation = expectation(description: "Fetch Assets without Fallback Test")
250250
self.getAssetQuery()
251251
.locale(AssetQueryAPITest.locale)
@@ -278,7 +278,7 @@ class AssetQueryAPITest: XCTestCase {
278278
wait(for: [networkExpectation], timeout: 30)
279279
}
280280

281-
func test14Fetch_Asset_UIDWithoutFallback_NoResult() {
281+
func test14Fetch_Asset_UIDWithoutFallback_NoResult() async {
282282
let networkExpectation = expectation(description: "Fetch Asset from UID without Fallback Test")
283283
self.getAsset(uid: AssetQueryAPITest.kAssetLocaliseUID)
284284
.locale("en-gb")
@@ -297,7 +297,7 @@ class AssetQueryAPITest: XCTestCase {
297297
wait(for: [networkExpectation], timeout: 30)
298298
}
299299

300-
func test15Fetch_Asset_UIDWithFallback_NoResult() {
300+
func test15Fetch_Asset_UIDWithFallback_NoResult() async {
301301
let networkExpectation = expectation(description: "Fetch Asset from UID without Fallback Test")
302302
self.getAsset(uid: AssetQueryAPITest.kAssetLocaliseUID)
303303
.locale(AssetQueryAPITest.locale)

Tests/ContentTypeQueryAPITest.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ContentTypeQueryAPITest: XCTestCase {
4141
(stack.urlSession as? DVR.Session)?.endRecording()
4242
}
4343

44-
func test01FindAll_ContentTypeQuery() {
44+
func test01FindAll_ContentTypeQuery() async {
4545
let networkExpectation = expectation(description: "Fetch All ContentTypes Test")
4646
self.getContentTypeQuery().find { (result: Result<ContentstackResponse<ContentTypeModel>, Error>, response: ResponseType) in
4747
switch result {
@@ -59,7 +59,7 @@ class ContentTypeQueryAPITest: XCTestCase {
5959
wait(for: [networkExpectation], timeout: 30)
6060
}
6161

62-
func test02Find_ContentTypeQuery_whereUIDEquals() {
62+
func test02Find_ContentTypeQuery_whereUIDEquals() async {
6363
let networkExpectation = expectation(description: "Fetch where UID equals ContentTypes Test")
6464
self.queryWhere(.uid, operation: .equals(ContentTypeQueryAPITest.kContentTypeUID)) { (result: Result<ContentstackResponse<ContentTypeModel>, Error>) in
6565
switch result {
@@ -75,7 +75,7 @@ class ContentTypeQueryAPITest: XCTestCase {
7575
wait(for: [networkExpectation], timeout: 30)
7676
}
7777

78-
func test03Find_ContentTypeQuery_whereTitleDNotEquals() {
78+
func test03Find_ContentTypeQuery_whereTitleDNotEquals() async {
7979
let networkExpectation = expectation(description: "Fetch where Title equals ContentTypes Test")
8080
self.queryWhere(.title, operation: .notEquals(ContentTypeQueryAPITest.kContentTitle)) { (result: Result<ContentstackResponse<ContentTypeModel>, Error>) in
8181
switch result {
@@ -91,7 +91,7 @@ class ContentTypeQueryAPITest: XCTestCase {
9191
wait(for: [networkExpectation], timeout: 30)
9292
}
9393

94-
func test04Find_ContentTypeQuery_whereDescriptionexists() {
94+
func test04Find_ContentTypeQuery_whereDescriptionexists() async {
9595
let networkExpectation = expectation(description: "Fetch where description exists ContentTypes Test")
9696
self.queryWhere(.description, operation: .exists(true)) { (result: Result<ContentstackResponse<ContentTypeModel>, Error>) in
9797
switch result {
@@ -105,7 +105,7 @@ class ContentTypeQueryAPITest: XCTestCase {
105105
wait(for: [networkExpectation], timeout: 30)
106106
}
107107

108-
func test05Find_ContentTypeQuery_whereTitleMatchRegex() {
108+
func test05Find_ContentTypeQuery_whereTitleMatchRegex() async {
109109
let networkExpectation = expectation(description: "Fetch where Title Match Regex ContentTypes Test")
110110
self.queryWhere(.title, operation: .matches("Tr")) { (result: Result<ContentstackResponse<ContentTypeModel>, Error>) in
111111
switch result {
@@ -119,7 +119,7 @@ class ContentTypeQueryAPITest: XCTestCase {
119119
wait(for: [networkExpectation], timeout: 30)
120120
}
121121

122-
func test06Fetch_ContentType_fromUID() {
122+
func test06Fetch_ContentType_fromUID() async {
123123
let networkExpectation = expectation(description: "Fetch ContentTypes from UID Test")
124124
self.getContentType(uid: ContentTypeQueryAPITest.kContentTypeUID).fetch { (result: Result<ContentTypeModel, Error>, response: ResponseType) in
125125
switch result {
@@ -133,7 +133,7 @@ class ContentTypeQueryAPITest: XCTestCase {
133133
wait(for: [networkExpectation], timeout: 30)
134134
}
135135

136-
func test07Fetch_ContentTypeQuery_WithGlobalFields() {
136+
func test07Fetch_ContentTypeQuery_WithGlobalFields() async {
137137
let networkExpectation = expectation(description: "Fetch ContentTypes with GLobalFields Test")
138138
self.getContentTypeQuery()
139139
.include(params: .globalFields)
@@ -158,7 +158,7 @@ class ContentTypeQueryAPITest: XCTestCase {
158158

159159
}
160160

161-
func test08Fetch_ContentType_WithGlobalFields() {
161+
func test08Fetch_ContentType_WithGlobalFields() async {
162162
let networkExpectation = expectation(description: "Fetch ContentTypes with GlobalFields Test")
163163
self.getContentType(uid: ContentTypeQueryAPITest.kContentTypeUID)
164164
.includeGlobalFields()
@@ -179,7 +179,7 @@ class ContentTypeQueryAPITest: XCTestCase {
179179
wait(for: [networkExpectation], timeout: 30)
180180
}
181181

182-
func test09Fetch_ContentTypeQuery_WithCount() {
182+
func test09Fetch_ContentTypeQuery_WithCount() async {
183183
let networkExpectation = expectation(description: "Fetch ContentTypes with Count Test")
184184
self.getContentTypeQuery()
185185
.include(params: .count)
@@ -196,7 +196,7 @@ class ContentTypeQueryAPITest: XCTestCase {
196196

197197
}
198198

199-
func test11Fetch_ContentType_WithWrongUID_shouldFail() {
199+
func test11Fetch_ContentType_WithWrongUID_shouldFail() async {
200200
let networkExpectation = expectation(description: "Fetch ContentTypes from wrong UID Test")
201201
self.getContentType(uid: "UID").fetch { (result: Result<ContentTypeModel, Error>, response: ResponseType) in
202202
switch result {

0 commit comments

Comments
 (0)