#352: Add basic UI tests for the timeline. (#363)

Makes the MockTimelineController configurable with incoming items and pagination responses.
This commit is contained in:
Doug
2022-12-12 12:27:49 +00:00
committed by GitHub
parent 1791993560
commit 6dc2ea800e
21 changed files with 380 additions and 82 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ extension XCUIApplication {
let lastLabel = staticTexts["lastItem"]
while !button.isHittable, !lastLabel.isHittable {
tables.firstMatch.swipeUp()
swipeUp()
}
button.tap()
+24
View File
@@ -38,4 +38,28 @@ class RoomScreenUITests: XCTestCase {
app.assertScreenshot(.roomEncryptedWithAvatar)
}
func testSmallTimelineLayout() {
let app = Application.launch()
app.goToScreenWithIdentifier(.roomSmallTimeline)
// The messages should be bottom aligned.
app.assertScreenshot(.roomSmallTimeline)
}
func testSmallTimelineWithIncomingAndPagination() {
let app = Application.launch()
app.goToScreenWithIdentifier(.roomSmallTimelineIncomingAndSmallPagination)
// Wait for both the incoming message and the pagination chunk.
XCTAssert(app.staticTexts["Bob"].waitForExistence(timeout: 2))
XCTAssert(app.staticTexts["Helena"].waitForExistence(timeout: 2))
// The messages should still be bottom aligned after the new items are added.
app.assertScreenshot(.roomSmallTimelineIncomingAndSmallPagination)
}
func testSmallTimelineWithLargePagination() {
// To be implemented
}
}
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:96d580e92e1618c729240a00439801feccbfadf6bd7e00119a4df5b3724e1c82
size 92567
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:925c9edf55718ec2e1195fbe8a6e313f435eee075c703c74a487ca0425a60f2f
size 133380
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3295b6e8348a37998c95f72285ae0bfc5651ec3166a376c327f482a0baa1e93d
size 114678
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:015eb7e93e193d635194bb6d0d67a3a8751180598fc63762ada0f94be11099e9
size 212903
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:12af6767660c17c4eaebdb951da4e61ac1cc365ba950e237fe8f08d4707f39a5
size 92342
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:087309a5c640fe574e3f80e9e8cbccef71bced0d49016a27c963d7bff07e24d1
size 133159
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a365ef80c8bce284dfddd840433afe9fa6b3d7eee8521da98e065777a6819530
size 114689
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:31267576b8c4c8d038b3f5dde9e3f6c1f06c00b72cea3e5e9d02765e231fa682
size 212873
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:12af6767660c17c4eaebdb951da4e61ac1cc365ba950e237fe8f08d4707f39a5
size 92342
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:087309a5c640fe574e3f80e9e8cbccef71bced0d49016a27c963d7bff07e24d1
size 133159
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:180aae2e7f67beb59cfee31788efaf7f0a6b4fef910956ba1db1ed22edbfdc7f
size 114685
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:31267576b8c4c8d038b3f5dde9e3f6c1f06c00b72cea3e5e9d02765e231fa682
size 212873