Skip to content

Commit

Permalink
Add test support for NC version 23
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Müller <[email protected]>
  • Loading branch information
SystemKeeper committed Sep 26, 2023
1 parent f506059 commit 9ae4305
Showing 1 changed file with 10 additions and 2 deletions.
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 9ae4305

Please sign in to comment.