Skip to content

Commit

Permalink
Reenable testReconnectingMessage (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipavlidakis committed Sep 19, 2024
1 parent 4395cd2 commit c5fbd95
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions SwiftUIDemoAppUITests/Tests/ReconnectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ final class ReconnectionTests: StreamTestCase {

try super.tearDownWithError()
}

func testReconnectingMessage() throws {
try XCTSkipIf(TestRunnerEnvironment.isCI, "https://github.com/GetStream/stream-video-swift/pull/503")

func testReconnectingMessageWhenDisconnectedForMoreThanFastReconnectThreshold() throws {
linkToScenario(withId: 2030)

GIVEN("user starts a new call") {
userRobot
.waitForAutoLogin()
Expand All @@ -26,12 +25,17 @@ final class ReconnectionTests: StreamTestCase {
WHEN("user loses the internet connection") {
sinatra.setConnection(state: .off)
}
THEN("user observes a reconnecting message") {
userRobot.assertReconnectingMessage(isVisible: true)
THEN("user waits 10 second to recover connection") {
let waitExpectation = expectation(description: "Waiting ....")
waitExpectation.isInverted = true
wait(for: [waitExpectation], timeout: 30)
}
WHEN("user restores the internet connection") {
sinatra.setConnection(state: .on)
}
THEN("user observes a reconnecting message") {
userRobot.assertReconnectingMessage(isVisible: true)
}
THEN("reconnecting message disappears") {
userRobot.assertReconnectingMessage(isVisible: false)
}
Expand Down

0 comments on commit c5fbd95

Please sign in to comment.