From c94d988be5def978d34987265a9ff73586d7874b Mon Sep 17 00:00:00 2001 From: CMK Date: Fri, 4 Mar 2022 02:22:05 +0800 Subject: [PATCH] chore: use the first photo for compose snapshot --- MastodonUITests/MastodonUISnapshotTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MastodonUITests/MastodonUISnapshotTests.swift b/MastodonUITests/MastodonUISnapshotTests.swift index cf2206b66..182ed1810 100644 --- a/MastodonUITests/MastodonUISnapshotTests.swift +++ b/MastodonUITests/MastodonUISnapshotTests.swift @@ -171,8 +171,8 @@ extension MastodonUISnapshotTests { XCTAssert(photoLibraryButton.waitForExistence(timeout: 5)) photoLibraryButton.tap() - // select photo - let photo = app.images["Photo, August 09, 2012, 2:52 AM"].firstMatch + // select the first photo + let photo = app.images.containing(NSPredicate(format: "label BEGINSWITH 'Photo'")).element(boundBy: 0).firstMatch XCTAssert(photo.waitForExistence(timeout: 5)) photo.tap()