diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index 841b7b6e4..fd86cd737 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -6,6 +6,7 @@ on: - '.github/workflows/**' - NextcloudTalk.xcodeproj/** - NextcloudTalk/** + - NextcloudTalkUITests/** - NotificationServiceExtension/** - ShareExtension/** @@ -26,7 +27,8 @@ jobs: strategy: matrix: - test-branches: ['stable27', 'master'] + # Test with stable23 as well to find regressions in older versions + test-branches: ['stable23', 'stable27', 'master'] env: WORKSPACE: NextcloudTalk.xcworkspace @@ -41,7 +43,14 @@ jobs: uses: actions/checkout@v3 with: submodules: true - + + - uses: actions/cache@v3 + with: + path: Pods + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + - name: Install docker run: | brew install docker diff --git a/NextcloudTalkUITests/NextcloudTalkUITests.swift b/NextcloudTalkUITests/NextcloudTalkUITests.swift index 026e87f0a..c9cf57c39 100644 --- a/NextcloudTalkUITests/NextcloudTalkUITests.swift +++ b/NextcloudTalkUITests/NextcloudTalkUITests.swift @@ -200,8 +200,16 @@ final class NextcloudTalkUITests: XCTestCase { message.press(forDuration: 2.0) // Add a reaction to close the context menu - XCTAssert(app.staticTexts["👍"].waitForExistence(timeout: timeoutShort)) - app.staticTexts["👍"].tap() + let reactionExists = app.staticTexts["👍"].waitForExistence(timeout: timeoutShort) + + if reactionExists { + app.staticTexts["👍"].tap() + } else { + // In case we are testing against a nextcloud version that does not support reactions (<= NC 23) + // we simply tap the "Reply" button from the context menu + XCTAssert(app.buttons["Reply"].waitForExistence(timeout: timeoutShort)) + app.buttons["Reply"].tap() + } // Go back to the main view controller let chatNavBar = app.navigationBars["NCChatView"]