feat: add notification snapshot

This commit is contained in:
CMK 2022-03-04 00:04:36 +08:00
parent f2f71e7102
commit 633d1ae62a
1 changed files with 18 additions and 0 deletions

View File

@ -59,6 +59,7 @@ extension MastodonUISnapshotTests {
try await testSnapshotHome()
try await testSnapshotSearch()
try await testSnapshotNotification()
try await testSnapshotProfile()
try await testSnapshotCompose()
}
@ -97,6 +98,23 @@ extension MastodonUISnapshotTests {
takeSnapshot(name: "Search - 3")
}
func testSnapshotNotification() async throws {
let app = XCUIApplication()
app.launch()
tapTab(app: app, tab: "Notification")
try await Task.sleep(nanoseconds: .second * 3)
takeSnapshot(name: "Notification - 1")
tapTab(app: app, tab: "Notification")
try await Task.sleep(nanoseconds: .second * 3)
takeSnapshot(name: "Notification - 2")
tapTab(app: app, tab: "Notification")
try await Task.sleep(nanoseconds: .second * 3)
takeSnapshot(name: "Notification - 3")
}
func testSnapshotProfile() async throws {
let username = ProcessInfo.processInfo.environment["username_snapshot"] ?? "Gargron"