From 80ad39e877460c1711879e69e162409c9a7bbd32 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Fri, 10 Jul 2026 18:12:05 +0100 Subject: [PATCH] Fix UI tests (#5862) * Fix UI tests compilation error. * Update UI Snapshots. --- ElementX/Sources/Other/Extensions/XCUIElement.swift | 2 +- UITests/Sources/AuthenticationFlowCoordinatorTests.swift | 2 +- .../Application/roomScreen.testPlainNoAvatar-iPad-en-GB.png | 4 ++-- .../Application/roomScreen.testPlainNoAvatar-iPhone-en-GB.png | 4 ++-- ....testSmallTimelineWithIncomingAndPagination-iPad-en-GB.png | 4 ++-- ...estSmallTimelineWithIncomingAndPagination-iPhone-en-GB.png | 4 ++-- ...Screen.testSmallTimelineWithLargePagination-iPad-en-GB.png | 4 ++-- ...reen.testSmallTimelineWithLargePagination-iPhone-en-GB.png | 4 ++-- .../roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-0.png | 4 ++-- .../roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-1.png | 4 ++-- .../roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-0.png | 4 ++-- .../roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-1.png | 4 ++-- .../roomScreen.testTimelineLayoutAtTop-iPad-en-GB.png | 4 ++-- .../roomScreen.testTimelineLayoutAtTop-iPhone-en-GB.png | 4 ++-- ...creen.testTimelineLayoutHighlightExisting-iPhone-en-GB.png | 4 ++-- .../roomScreen.testTimelineReadReceipts-iPhone-en-GB.png | 4 ++-- .../userSessionScreen.testSpaceExploration-iPad-en-GB-8.png | 4 ++-- .../userSessionScreen.testSpaceExploration-iPhone-en-GB-8.png | 4 ++-- .../userSessionScreen.testUserSessionFlows-iPad-en-GB-2.png | 4 ++-- .../userSessionScreen.testUserSessionFlows-iPhone-en-GB-2.png | 4 ++-- .../userSessionScreen.testUserSessionReply-iPad-en-GB.png | 4 ++-- .../userSessionScreen.testUserSessionReply-iPhone-en-GB.png | 4 ++-- 22 files changed, 42 insertions(+), 42 deletions(-) diff --git a/ElementX/Sources/Other/Extensions/XCUIElement.swift b/ElementX/Sources/Other/Extensions/XCUIElement.swift index 82efb893f..686e4d043 100644 --- a/ElementX/Sources/Other/Extensions/XCUIElement.swift +++ b/ElementX/Sources/Other/Extensions/XCUIElement.swift @@ -40,7 +40,7 @@ extension XCUIApplication { /// app instance anyway, and some of our tests assert that a default focus has been set on the text field, /// so having a method that would set the focus and show the keyboard isn't always desirable. func showKeyboardIfNeeded() { - if UIDevice.current.userInterfaceIdiom == .pad, keyboards.isEmpty { + if UIDevice.current.userInterfaceIdiom == .pad, keyboards.count == 0 { buttons["Keyboard"].tap() buttons["Show Keyboard"].tap() } diff --git a/UITests/Sources/AuthenticationFlowCoordinatorTests.swift b/UITests/Sources/AuthenticationFlowCoordinatorTests.swift index c6cda2abb..1171359e3 100644 --- a/UITests/Sources/AuthenticationFlowCoordinatorTests.swift +++ b/UITests/Sources/AuthenticationFlowCoordinatorTests.swift @@ -150,7 +150,7 @@ class AuthenticationFlowCoordinatorUITests: XCTestCase { XCTFail("Failed to present the web authentication session.") } - if !app.alerts.isEmpty { + if app.alerts.count > 0 { app.alerts.firstMatch.buttons["OK"].tap() } } diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testPlainNoAvatar-iPad-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testPlainNoAvatar-iPad-en-GB.png index 89722e5de..915859e7b 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testPlainNoAvatar-iPad-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testPlainNoAvatar-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:80c38707c5abe04743fc5e780af5419439aa904eae7d918fa0c56bcb508f38b9 -size 300567 +oid sha256:defc195e29dacd6d765479411d54e62c8fd9f78e5845c44a5db03ba3d2ec6ff8 +size 301979 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testPlainNoAvatar-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testPlainNoAvatar-iPhone-en-GB.png index 244f58263..318597ef0 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testPlainNoAvatar-iPhone-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testPlainNoAvatar-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:70b26a423ced9325b0eee1ff769e74de1e20d869116ce27d204a7ab686327d66 -size 345917 +oid sha256:7d070276f96503ee8266e1b60414bfbed2fede65687daccb5c65e67772325569 +size 342618 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithIncomingAndPagination-iPad-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithIncomingAndPagination-iPad-en-GB.png index 1b7d64f0f..88c6613a9 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithIncomingAndPagination-iPad-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithIncomingAndPagination-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45f584461552bde4b30728fcc88bbbcaa195e6efd65272adafab1a38478f7673 -size 140613 +oid sha256:b07ad74b106eddecdf0fbf04298cfd2f37a7d147681b1c21727152498e93f8aa +size 140570 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithIncomingAndPagination-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithIncomingAndPagination-iPhone-en-GB.png index a669a4824..783a4e9cb 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithIncomingAndPagination-iPhone-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithIncomingAndPagination-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c278fe6aa008a679e82a1ed3a92b25e1a15c446e8136892f31e8438c1c373f8b -size 186581 +oid sha256:7b061b6308bb63eb76858482bca5c56267565b5a136dc29586ee41cabda89d47 +size 186765 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithLargePagination-iPad-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithLargePagination-iPad-en-GB.png index 6a2d0c598..91811f924 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithLargePagination-iPad-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithLargePagination-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d76300f83480b2e9fd74be1931c2d156c47b364204c647f037ccbede1b50f357 -size 327114 +oid sha256:f84f19da1bde940ae94a68662c9ed6b0db1394d45bb73635e405afd9d5c7344a +size 313349 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithLargePagination-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithLargePagination-iPhone-en-GB.png index 3cf7d904a..f329ab6ab 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithLargePagination-iPhone-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testSmallTimelineWithLargePagination-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cff432f108cc03128a20efa275ef0d5d637bf0b280c39dc4df0b5dafc726ebb3 -size 308251 +oid sha256:5583d1fdb69a2a73c1eadcb8a61eb10fd2127c3f61c3a314ffdd71f7433e21bb +size 306040 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-0.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-0.png index 0475f2e69..7091565ee 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-0.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:084e15eaa18ab851a01d19cb3a4f6cef781d20ba73f8ee883d142c767fce68d5 -size 320007 +oid sha256:5c958a1850fc4861a42958d83399715a259bfa954c721f1315441c8e32ee8e06 +size 319677 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-1.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-1.png index 8c48bcd03..8d4901402 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-1.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPad-en-GB-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb99a0ec93d82c7d74cdc02da3d9b1bdfc5b8b4e5616f14a674545da0d4565a0 -size 325227 +oid sha256:76754c4d77876e2ff777f784c42b5173a5ce0f841f7b0d2302393c305a24700b +size 322763 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-0.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-0.png index a1d7de287..3233b1ccc 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-0.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ee4b63bb34f96ea6cd64236dff1428e18531c6059974d56edd32e54c4d1a5def -size 306148 +oid sha256:462cca612042f521f08b12fdee7abf0d6e32137c41050445426ade641e685c36 +size 297004 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-1.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-1.png index c49cabbd1..1a4a79dd9 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-1.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtBottom-iPhone-en-GB-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c113e24b769e59a01cf0ace1f3a31c6ce0ef3ceef215a0b9883b8465ffca66c -size 285123 +oid sha256:dbffccca1197c60a88871d141a0578e1b9e51cbbf12d69d55956bdae717e9390 +size 285125 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtTop-iPad-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtTop-iPad-en-GB.png index 21eca3053..47e858868 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtTop-iPad-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtTop-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6225dafba78888206bad097d0457d0d03965b957220dfa2cf07fdb334c86183 -size 365144 +oid sha256:b7119597f2d45b351674cd3d2c6c1a4483be3e7a2a00cead8c78f4d49392c755 +size 352603 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtTop-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtTop-iPhone-en-GB.png index 811a89d1c..d5a9067ed 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtTop-iPhone-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutAtTop-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d563ac937bf4f66a51498260d0fdbe70804c1440bef9a721a2671cfe0b6945b -size 320929 +oid sha256:8b2e610bab563863376b0748b7a7e3e015770708df230e5b62428d8b598ce22f +size 374570 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutHighlightExisting-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutHighlightExisting-iPhone-en-GB.png index 4a3ce79b8..0f57f241f 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutHighlightExisting-iPhone-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineLayoutHighlightExisting-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:255c65f23a54a9b7e911c93e548f954cff9a7d115b340a8226aa37e67055e393 -size 287572 +oid sha256:58023814d452f1180fd5bbdf9e561b6b99f383b35ec575790e51babff449a5ab +size 293191 diff --git a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineReadReceipts-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineReadReceipts-iPhone-en-GB.png index 276ebd568..1ff47a484 100644 --- a/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineReadReceipts-iPhone-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/roomScreen.testTimelineReadReceipts-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af0257701fcc6aec3f9c4faf1354c13d59e4d0d9c92f1f5d579e5095df12790f -size 185246 +oid sha256:62528f37f8a4f07469d35fc67e52b597531180e09b6162700d9adb630ec899ef +size 185186 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testSpaceExploration-iPad-en-GB-8.png b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testSpaceExploration-iPad-en-GB-8.png index 2199bf58c..d0f6adc0d 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testSpaceExploration-iPad-en-GB-8.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testSpaceExploration-iPad-en-GB-8.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c3061857163e9575f636a7d18bcad6346f2cef61937a8d7773b719548bfd4af -size 467895 +oid sha256:04f928c121b9c496ade5499aa92e62ea0a62393bd1e07458df4c86baf96f5aab +size 464383 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testSpaceExploration-iPhone-en-GB-8.png b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testSpaceExploration-iPhone-en-GB-8.png index 48d8e4a6d..f58072841 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testSpaceExploration-iPhone-en-GB-8.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testSpaceExploration-iPhone-en-GB-8.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43eaf0740e5fccdbba774fd71f1883fea7de2364088d36674ccfb2d6e48a600a -size 303990 +oid sha256:1be8dc6b3c1811c8de0b0cdcde4fd978e342715a890932be97053e3bbfed6158 +size 301193 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPad-en-GB-2.png b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPad-en-GB-2.png index 8db88115a..38a152281 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPad-en-GB-2.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPad-en-GB-2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:39b207f1dc702ee3d8271620718e25799393bd620124c88d58a354593a23cc1d -size 544150 +oid sha256:2a4545e57301116baaf48a0d18e85f5a33aec2a645ad768e04895d7404f7a60f +size 537357 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPhone-en-GB-2.png b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPhone-en-GB-2.png index 7b2d7398a..dd64c9dff 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPhone-en-GB-2.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPhone-en-GB-2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:deea3bc3e3180a862590fdd5371071d5ca80b745890c616e2a7515f084c6dbf5 -size 305096 +oid sha256:658f5a1019ad3976d8f8db49c90d619113a7e09728636558fa988a8da7e4d554 +size 302083 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionReply-iPad-en-GB.png b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionReply-iPad-en-GB.png index 98c3c01df..06d2eb25c 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionReply-iPad-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionReply-iPad-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b65fd3d5d36eba1cbdf3efcad96d3c8bdc3077894f91134fab81d56547845a3 -size 589791 +oid sha256:94ea41c71cda9ef5aa80d46835174b852f728423f901d5502004e1524299c0f0 +size 586866 diff --git a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionReply-iPhone-en-GB.png b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionReply-iPhone-en-GB.png index 838ea6239..e9e9eda65 100644 --- a/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionReply-iPhone-en-GB.png +++ b/UITests/Sources/__Snapshots__/Application/userSessionScreen.testUserSessionReply-iPhone-en-GB.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:198176e5aa4498c32b7edb64b6c1df3159d9a31168622d735b305005ffc145c6 -size 297976 +oid sha256:becf85ef58976fab61bc180abc61aa3a9872905c7656bdd4cdacd2006c9fccfa +size 302798