Skip to content

Commit

Permalink
Merge pull request #1372 from nextcloud/test-with-24
Browse files Browse the repository at this point in the history
Test with 23
  • Loading branch information
Ivansss committed Sep 27, 2023
2 parents f64831c + 820b100 commit 6555df1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/uitests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- '.github/workflows/**'
- NextcloudTalk.xcodeproj/**
- NextcloudTalk/**
- NextcloudTalkUITests/**
- NotificationServiceExtension/**
- ShareExtension/**

Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 10 additions & 2 deletions NextcloudTalkUITests/NextcloudTalkUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 6555df1

Please sign in to comment.