From 3be6e494e1a210e8e59d53473449cb98c2957650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Mon, 23 Oct 2023 21:41:49 +0200 Subject: [PATCH 1/2] Improve detection of room joined on CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- NextcloudTalkUITests/NextcloudTalkUITests.swift | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/NextcloudTalkUITests/NextcloudTalkUITests.swift b/NextcloudTalkUITests/NextcloudTalkUITests.swift index 3875a7193..c20cd9647 100644 --- a/NextcloudTalkUITests/NextcloudTalkUITests.swift +++ b/NextcloudTalkUITests/NextcloudTalkUITests.swift @@ -79,6 +79,7 @@ final class NextcloudTalkUITests: XCTestCase { // Wait shortly until the app is fully started let foundElement = waitForEitherElementToExist(accountSwitcherButton, serverAddressHttpsTextField, timeoutLong) + XCTAssertNotNil(foundElement) // When the account switcher button exists, we have atleast one account configured if foundElement == accountSwitcherButton { @@ -166,10 +167,19 @@ final class NextcloudTalkUITests: XCTestCase { let chatNavBar = app.navigationBars["NextcloudTalk.ChatView"] - // Wait for titleView - let chatTitleView = chatNavBar.textViews.staticTexts[newConversationName] + // Wait for navigationBar XCTAssert(chatNavBar.waitForExistence(timeout: timeoutLong)) + // Wait for titleView + let chatTitleView = chatNavBar.textViews[newConversationName] + XCTAssert(chatTitleView.waitForExistence(timeout: timeoutShort)) + + // Wait until we joined the room and the call buttons get active + let voiceCallButton = chatNavBar.buttons["Voice call"] + XCTAssert(voiceCallButton.waitForExistence(timeout: timeoutShort)) + waitForEnabled(object: voiceCallButton) + waitForHittable(object: voiceCallButton) + // Open conversation settings chatTitleView.tap() From e3f78316abf8fc5ff83c79ced692a9e43feb651c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Mon, 23 Oct 2023 21:50:40 +0200 Subject: [PATCH 2/2] Don't run swiftlint on CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- NextcloudTalk.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NextcloudTalk.xcodeproj/project.pbxproj b/NextcloudTalk.xcodeproj/project.pbxproj index 57b006fab..b1cf35c64 100644 --- a/NextcloudTalk.xcodeproj/project.pbxproj +++ b/NextcloudTalk.xcodeproj/project.pbxproj @@ -1978,7 +1978,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "if [ -z \"$CI\" ]; then\n export PATH=\"$PATH:/opt/homebrew/bin\"\n if which swiftlint >/dev/null; then\n swiftlint\n else\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\n fi\nfi\n"; }; 2C8035721F950BA800501B5C /* ShellScript */ = { isa = PBXShellScriptBuildPhase;