From c5fbd95421a27cf52e79264f0eb85e0ef6129ee2 Mon Sep 17 00:00:00 2001 From: Ilias Pavlidakis Date: Thu, 19 Sep 2024 16:55:33 +0300 Subject: [PATCH] Reenable testReconnectingMessage (#533) --- .../Tests/ReconnectionTests.swift | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/SwiftUIDemoAppUITests/Tests/ReconnectionTests.swift b/SwiftUIDemoAppUITests/Tests/ReconnectionTests.swift index 0113136b4..1390a2bbb 100644 --- a/SwiftUIDemoAppUITests/Tests/ReconnectionTests.swift +++ b/SwiftUIDemoAppUITests/Tests/ReconnectionTests.swift @@ -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() @@ -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) }