mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
test improvement
This commit is contained in:
parent
bfcf5206f0
commit
f63090da03
1 changed files with 3 additions and 7 deletions
|
@ -53,7 +53,7 @@ final class ComposerUITests: MockScreenTestCase {
|
|||
let wysiwygTextView = app.textViews.allElementsBoundByIndex[0]
|
||||
XCTAssertTrue(wysiwygTextView.exists)
|
||||
wysiwygTextView.tap()
|
||||
sleep(2)
|
||||
sleep(1)
|
||||
wysiwygTextView.typeText(text)
|
||||
let options = XCTExpectedFailure.Options()
|
||||
options.isStrict = false
|
||||
|
@ -62,20 +62,16 @@ final class ComposerUITests: MockScreenTestCase {
|
|||
XCTAssert(value == text, "Text view value is: \(value ?? "nil")")
|
||||
}
|
||||
|
||||
// This test requires "connect hardware keyboard" to be off on the simulator
|
||||
// And may not work on the CI
|
||||
func testLongPressDelete() throws {
|
||||
app.goToScreenWithIdentifier(MockComposerScreenState.send.title)
|
||||
let text = "test1 test2 test3 test4 test5 test6 test7"
|
||||
let wysiwygTextView = app.textViews.allElementsBoundByIndex[0]
|
||||
XCTAssertTrue(wysiwygTextView.exists)
|
||||
wysiwygTextView.tap()
|
||||
sleep(2)
|
||||
sleep(1)
|
||||
wysiwygTextView.typeText(text)
|
||||
sleep(1)
|
||||
app.keys["delete"].press(forDuration: 10.0)
|
||||
let options = XCTExpectedFailure.Options()
|
||||
options.isStrict = false
|
||||
XCTExpectFailure("Test may fail on CI", options: options)
|
||||
let value = wysiwygTextView.value as? String
|
||||
XCTAssert(value == "", "Text view value is: \(value ?? "nil")")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue