Event Permalink Tweaks (#2754)

* Handle errors focussing the timeline.

* Add a test for focussing on an existing timeline item.
This commit is contained in:
Doug
2024-04-29 10:00:41 +01:00
committed by GitHub
parent 231fc6defb
commit 7b2168a540
12 changed files with 100 additions and 8 deletions
+19
View File
@@ -109,6 +109,25 @@ class RoomScreenUITests: XCTestCase {
try await app.assertScreenshot(.roomLayoutBottom, step: 1)
}
func testTimelineLayoutHighlightExisting() async throws {
let client = try UITestsSignalling.Client(mode: .tests)
let app = Application.launch(.roomLayoutHighlight)
await client.waitForApp()
defer { try? client.stop() }
// Some time for the timeline to settle.
try await Task.sleep(for: .seconds(1))
// When tapping a permalink to an item in the timeline.
try await performOperation(.focusOnEvent("$5"), using: client)
// Some time for the timeline to settle.
try await Task.sleep(for: .seconds(1))
// Then the item should become highlighted.
try await app.assertScreenshot(.roomLayoutHighlight, step: 0)
}
func testTimelineReadReceipts() async throws {
let app = Application.launch(.roomSmallTimelineWithReadReceipts)
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85ccfdd71e9fa2e59b65b9731c8e0135e7e44349d7f3debdb5afcff0262576d0
size 233181
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79e3b444b2682f3697c1f27c898be7a3ed50d230c60d5c0fd33bfe9125056802
size 331437