mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 18:12:44 +02:00
updated package + tests
This commit is contained in:
@@ -45,6 +45,41 @@ final class ComposerUITests: MockScreenTestCase {
|
||||
XCTAssertTrue(maximiseButton.exists)
|
||||
}
|
||||
|
||||
// This test requires "connect hardware keyboard" to be off on the simulator
|
||||
func testFastTyping() {
|
||||
app.goToScreenWithIdentifier(MockComposerScreenState.send.title)
|
||||
let text = "Some text that should be typed very fast!"
|
||||
let wysiwygTextView = app.textViews.allElementsBoundByIndex[0]
|
||||
wysiwygTextView.tap()
|
||||
sleep(1)
|
||||
wysiwygTextView.typeText(text)
|
||||
XCTAssert(wysiwygTextView.value as? String == text)
|
||||
}
|
||||
|
||||
// This test requires "connect hardware keyboard" to be off on the simulator
|
||||
func testLongPressDelete() {
|
||||
app.goToScreenWithIdentifier(MockComposerScreenState.send.title)
|
||||
let text =
|
||||
"""
|
||||
Line 1
|
||||
Line 2
|
||||
Line 3
|
||||
Line 4
|
||||
Line 5
|
||||
Line 6
|
||||
Line 7
|
||||
Line 8
|
||||
Line 9
|
||||
Line 10
|
||||
"""
|
||||
let wysiwygTextView = app.textViews.allElementsBoundByIndex[0]
|
||||
wysiwygTextView.tap()
|
||||
sleep(1)
|
||||
wysiwygTextView.typeText(text)
|
||||
XCUIApplication().keys["delete"].press(forDuration: 10.0)
|
||||
XCTAssert(wysiwygTextView.value as? String == "")
|
||||
}
|
||||
|
||||
func testReplyMode() throws {
|
||||
app.goToScreenWithIdentifier(MockComposerScreenState.reply.title)
|
||||
|
||||
|
||||
@@ -112,10 +112,7 @@ struct Composer: View {
|
||||
HStack(alignment: .top, spacing: 0) {
|
||||
WysiwygComposerView(
|
||||
focused: $focused,
|
||||
content: wysiwygViewModel.content,
|
||||
replaceText: wysiwygViewModel.replaceText,
|
||||
select: wysiwygViewModel.select,
|
||||
didUpdateText: wysiwygViewModel.didUpdateText
|
||||
viewModel: wysiwygViewModel
|
||||
)
|
||||
.tintColor(theme.colors.accent)
|
||||
.placeholder(viewModel.viewState.placeholder, color: theme.colors.tertiaryContent)
|
||||
|
||||
Reference in New Issue
Block a user