mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-16 06:28:27 +02:00
updated package + tests
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift",
|
||||
"state" : {
|
||||
"revision" : "d5ef7054fb43924d5b92d5d627347ca2bc333717"
|
||||
"revision" : "3cafc52d257411e06d4be4d0e2cdeeb4bd4b7099"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -53,7 +53,7 @@ packages:
|
||||
branch: main
|
||||
WysiwygComposer:
|
||||
url: https://github.com/matrix-org/matrix-wysiwyg-composer-swift
|
||||
revision: d5ef7054fb43924d5b92d5d627347ca2bc333717
|
||||
revision: 3cafc52d257411e06d4be4d0e2cdeeb4bd4b7099
|
||||
DeviceKit:
|
||||
url: https://github.com/devicekit/DeviceKit
|
||||
majorVersion: 4.7.0
|
||||
|
||||
Reference in New Issue
Block a user