Skip to content

Commit ecbe26b

Browse files
committed
[CI] Implement new mock server
1 parent 4acec4f commit ecbe26b

File tree

92 files changed

+916
-11058
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+916
-11058
lines changed

.github/workflows/cron-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
name: Test Data E2E (iOS ${{ matrix.ios }})
8181
path: |
8282
fastlane/recordings
83-
fastlane/sinatra_log.txt
83+
fastlane/stream-chat-test-mock-server/logs/*
8484
fastlane/test_output/logs/*/Diagnostics/**/*.txt
8585
fastlane/test_output/logs/*/Diagnostics/simctl_diagnostics/DiagnosticReports/*
8686

.github/workflows/smoke-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
name: Test Data E2E
221221
path: |
222222
fastlane/recordings
223-
fastlane/sinatra_log.txt
223+
fastlane/stream-chat-test-mock-server/logs/*
224224
fastlane/test_output/logs/*/Diagnostics/**/*.txt
225225
fastlane/test_output/logs/*/Diagnostics/simctl_diagnostics/DiagnosticReports/*
226226

.github/workflows/sync-mock-server.yml

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ app-thinning.plist
9292
*.dmg
9393
*.pkg*
9494
*LinkMap.txt
95+
stream-chat-test-mock-server
9596

9697
# gcloud
9798
google-cloud-sdk

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ group :sinatra_dependencies do
2525
gem 'faye-websocket'
2626
gem 'puma'
2727
gem 'rackup'
28-
gem 'stream-chat-ruby', '3.0.0'
2928
end
3029

3130
group :rubocop_dependencies do

Gemfile.lock

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ GEM
248248
nanaimo (0.4.0)
249249
nap (1.1.0)
250250
naturally (2.3.0)
251-
net-http-persistent (4.0.6)
252-
connection_pool (~> 2.2, >= 2.2.4)
253-
nio4r (2.7.4)
251+
nio4r (2.7.5)
254252
nkf (0.2.0)
255253
nokogiri (1.18.9)
256254
mini_portile2 (~> 2.8.2)
@@ -273,18 +271,18 @@ GEM
273271
method_source (~> 1.0)
274272
pstore (0.2.0)
275273
public_suffix (4.0.7)
276-
puma (6.6.1)
274+
puma (7.1.0)
277275
nio4r (~> 2.0)
278276
racc (1.8.1)
279-
rack (3.2.3)
280-
rack-protection (4.2.0)
277+
rack (3.2.4)
278+
rack-protection (4.2.1)
281279
base64 (>= 0.1.0)
282280
logger (>= 1.6.0)
283281
rack (>= 3.0.0, < 4)
284282
rack-session (2.1.1)
285283
base64 (>= 0.1.0)
286284
rack (>= 3.0.0)
287-
rackup (2.2.1)
285+
rackup (2.3.1)
288286
rack (>= 3)
289287
rainbow (3.1.1)
290288
rake (13.3.0)
@@ -331,11 +329,11 @@ GEM
331329
simctl (1.6.10)
332330
CFPropertyList
333331
naturally
334-
sinatra (4.2.0)
332+
sinatra (4.2.1)
335333
logger (>= 1.6.0)
336334
mustermann (~> 3.0)
337335
rack (>= 3.0.0, < 4)
338-
rack-protection (= 4.2.0)
336+
rack-protection (= 4.2.1)
339337
rack-session (>= 2.0.0, < 3)
340338
tilt (~> 2.0)
341339
slather (2.8.5)
@@ -344,14 +342,6 @@ GEM
344342
clamp (~> 1.3)
345343
nokogiri (>= 1.14.3)
346344
xcodeproj (~> 1.27)
347-
sorbet-runtime (0.5.12368)
348-
stream-chat-ruby (3.0.0)
349-
faraday
350-
faraday-multipart
351-
faraday-net_http_persistent
352-
jwt
353-
net-http-persistent
354-
sorbet-runtime
355345
sysrandom (1.0.5)
356346
terminal-notifier (2.0.0)
357347
terminal-table (3.0.2)
@@ -411,7 +401,6 @@ DEPENDENCIES
411401
rubocop-require_tools
412402
sinatra
413403
slather
414-
stream-chat-ruby (= 3.0.0)
415404
xctest_list
416405

417406
BUNDLED WITH

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<p align="center">
99
<a href="https://getstream.io/chat/docs/sdk/ios/"><img src="https://img.shields.io/badge/iOS-13%2B-lightblue" /></a>
1010
<a href="https://swift.org"><img src="https://img.shields.io/badge/Swift-6.0%2B-orange.svg" /></a>
11-
<a href="https://github.com/GetStream/stream-chat-swift/actions"><img src="https://github.com/GetStream/stream-chat-swift/actions/workflows/cron-checks.yml/badge.svg" /></a>
1211
<a href="https://sonarcloud.io/summary/new_code?id=GetStream_stream-chat-swift"><img src="https://sonarcloud.io/api/project_badges/measure?project=GetStream_stream-chat-swift&metric=coverage" /></a>
1312
</p>
1413
<p align="center">

StreamChatUITestsApp/ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ extension StreamChatWrapper {
210210
func mockTokenProvider(for userCredentials: UserCredentials) -> TokenProvider {
211211
{ completion in
212212
if ProcessInfo.processInfo.arguments.contains("MOCK_JWT") {
213-
let udid = ProcessInfo.processInfo.environment["SIMULATOR_UDID"] ?? ""
214-
let urlString = "http://localhost:4567/jwt/\(udid)?api_key=\(apiKeyString)&user_name=\(userCredentials.id)"
213+
let port = ProcessInfo.processInfo.environment["MOCK_SERVER_PORT"]!
214+
let urlString = "http://localhost:\(port)/jwt/get?platform=ios"
215215
guard let url = URL(string: urlString) else { return }
216216

217217
var request = URLRequest(url: url)

StreamChatUITestsAppUITests/Pages/ChannelListPage.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ enum ChannelListPage {
5555
cell.staticTexts["unreadCountLabel"]
5656
}
5757

58-
static func statusCheckmark(for status: MessageDeliveryStatus?, in cell: XCUIElement) -> XCUIElement {
58+
static func statusCheckmark(
59+
for status: StreamChatTestMockServer.MessageDeliveryStatus?,
60+
in cell: XCUIElement
61+
) -> XCUIElement {
5962
var identifier = "There is no status checkmark"
6063
if let status = status {
6164
identifier = "imageView_\(status.rawValue)"

StreamChatUITestsAppUITests/Pages/MessageListPage.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,10 @@ class MessageListPage {
208208
messageCell.staticTexts["messageReadСountsLabel"]
209209
}
210210

211-
static func statusCheckmark(for status: MessageDeliveryStatus?, in messageCell: XCUIElement) -> XCUIElement {
211+
static func statusCheckmark(
212+
for status: StreamChatTestMockServer.MessageDeliveryStatus?,
213+
in messageCell: XCUIElement
214+
) -> XCUIElement {
212215
var identifier = "There is no status checkmark"
213216
if let status = status {
214217
identifier = "imageView_\(status.rawValue)"

0 commit comments

Comments
 (0)