Skip to content

Commit

Permalink
Fix build failures
Browse files Browse the repository at this point in the history
  • Loading branch information
hthi-atlassian committed Oct 9, 2023
1 parent be3e8af commit be3fede
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Proton/Tests/Core/Mocks/MockKeyboardPress.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import UIKit

@available(iOS 13.4, *)
class MockUIPress: UIPress {
var _characters: String
private let _characters: String
override var key: UIKey? {
MockUIKey(characters: _characters)
}
Expand All @@ -34,7 +34,7 @@ class MockUIPress: UIPress {

@available(iOS 13.4, *)
class MockUIKey: UIKey {
var _characters: String
private let _characters: String
override var charactersIgnoringModifiers: String { _characters }

init(characters: String) {
Expand Down
5 changes: 3 additions & 2 deletions Proton/Tests/Core/RichTextViewContextTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,13 @@ class RichTextViewContextTests: XCTestCase {
let selectedRange = NSRange.zero
textView.selectedRange = selectedRange

mockTextViewDelegate.onShouldHandleKey = { _, key, _, range, _ in
mockTextViewDelegate.onShouldHandleKey = { _, key, _, _, _ in
XCTAssertEqual(key, EditorKey.right)
testExpectation.fulfill()
}

textView.pressesBegan(Set(arrayLiteral: MockUIPress(characters: UIKeyCommand.inputRightArrow)), with: nil)
let uiPresses: Set<UIPress> = [MockUIPress(characters: UIKeyCommand.inputRightArrow)]
textView.pressesBegan(uiPresses, with: nil)
waitForExpectations(timeout: 1.0)
}

Expand Down

0 comments on commit be3fede

Please sign in to comment.