Accessibiliy Tests part 2 (#4325)
* running all the tests * setting up CI * fixed the workflow * workflow on pull request, just to make it appear * removed the test to run var * fix archived tests name * improved the tests, by filtering out some noise * pr suggestions and added an improvement to the filtering * improved the interrupt handler * improved the UI interruption monitor handler * some more refinement to handle the interruptor + false positive for non human readable labels * reverted wrong commit * ready for review, removed the on pull request check * pr suggestions
This commit is contained in:
119
AccessibilityTests/Sources/AccessibilityTests.swift
Normal file
119
AccessibilityTests/Sources/AccessibilityTests.swift
Normal file
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// Copyright 2025 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
@MainActor
|
||||
final class AccessibilityTests: XCTestCase {
|
||||
var app: XCUIApplication!
|
||||
|
||||
func performAccessibilityAudit(named name: String) async throws {
|
||||
let client = try UITestsSignalling.Client(mode: .tests)
|
||||
app = Application.launch(viewID: name)
|
||||
await client.waitForApp()
|
||||
defer { try? client.stop() }
|
||||
|
||||
// To handle system interrupts
|
||||
_ = addUIInterruptionMonitor(withDescription: "Location access alert handler") { alert in
|
||||
let alwaysAllowButton = alert.buttons["Allow While Using App"]
|
||||
if alwaysAllowButton.exists {
|
||||
alwaysAllowButton.tap()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
// This interaction is needed to have the UIInterruptionMonitor work properly.
|
||||
app.tap()
|
||||
|
||||
try client.send(.accessibilityAudit(.nextPreview))
|
||||
forLoop: for await signal in client.signals.values {
|
||||
switch signal {
|
||||
case .accessibilityAudit(let auditSignal):
|
||||
switch auditSignal {
|
||||
case .nextPreviewReady(let name):
|
||||
performAccessibilityAuditForPreview(named: name)
|
||||
try client.send(.accessibilityAudit(.nextPreview))
|
||||
case .noMorePreviews:
|
||||
break forLoop
|
||||
default:
|
||||
XCTFail("Unhandled signal")
|
||||
}
|
||||
default:
|
||||
XCTFail("Unhandled signal")
|
||||
}
|
||||
}
|
||||
|
||||
app.terminate()
|
||||
}
|
||||
|
||||
private func performAccessibilityAuditForPreview(named name: String) {
|
||||
// Alows us to log the name of the preview that is being tested
|
||||
XCTContext.runActivity(named: name) { _ in
|
||||
do {
|
||||
// We have removed `textClipped` and `contrast` for now
|
||||
try app.performAccessibilityAudit(for: [.dynamicType, .elementDetection, .hitRegion, .sufficientElementDescription, .trait]) { issue in
|
||||
// Remove false positives for null elements
|
||||
guard let element = issue.element else {
|
||||
return true
|
||||
}
|
||||
|
||||
// We are fine with elements that only partially support dynamic types
|
||||
guard issue.compactDescription != Self.partiallyUnsupportedDynamicTypeMessage else {
|
||||
return true
|
||||
}
|
||||
|
||||
// We can filter out matrix entities from the non human-readable error
|
||||
if issue.compactDescription == Self.notHumanReadableMessage, Self.isMatrixIdentifier(element.label) {
|
||||
return true
|
||||
}
|
||||
|
||||
// Additional filters for specific elements that lead to false positives or neglectable issues.
|
||||
if Self.ignoredA11yIdentifiers[element.identifier]?.isAccessibilityIssueFiltered(issue) == true {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
} catch {
|
||||
XCTFail("Failed to perform the accessibility audit: \(error)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static func isMatrixIdentifier(_ string: String) -> Bool {
|
||||
MatrixEntityRegex.isMatrixRoomAlias(string) || MatrixEntityRegex.isMatrixUserIdentifier(string) || string == PillUtilities.atRoom
|
||||
}
|
||||
|
||||
private static let partiallyUnsupportedDynamicTypeMessage = "Dynamic Type font sizes are partially unsupported"
|
||||
private static let notHumanReadableMessage = "Label not human-readable"
|
||||
|
||||
/// Use this array to filter add specific filters to ignore specific issues for certain elements
|
||||
private static let ignoredA11yIdentifiers: [String: [FilterType]] = [A11yIdentifiers.authenticationStartScreen.appVersion: [.auditType(.hitRegion)]]
|
||||
}
|
||||
|
||||
private enum FilterType {
|
||||
/// Filter by the content of the compactDescription of the issue
|
||||
case compactDescription(String)
|
||||
/// Filter by the type of the issue
|
||||
case auditType(XCUIAccessibilityAuditType)
|
||||
}
|
||||
|
||||
private extension Array where Element == FilterType {
|
||||
func isAccessibilityIssueFiltered(_ issue: XCUIAccessibilityAuditIssue) -> Bool {
|
||||
for filter in self {
|
||||
switch filter {
|
||||
case .auditType(issue.auditType):
|
||||
return true
|
||||
case .compactDescription(issue.compactDescription):
|
||||
return true
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
768
AccessibilityTests/Sources/GeneratedAccessibilityTests.swift
Normal file
768
AccessibilityTests/Sources/GeneratedAccessibilityTests.swift
Normal file
@@ -0,0 +1,768 @@
|
||||
// Generated using Sourcery 2.2.7 — https://github.com/krzysztofzablocki/Sourcery
|
||||
// DO NOT EDIT
|
||||
|
||||
// swiftlint:disable all
|
||||
// swiftformat:disable all
|
||||
|
||||
|
||||
extension AccessibilityTests {
|
||||
|
||||
func testAdvancedSettingsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "AdvancedSettingsScreen_Previews")
|
||||
}
|
||||
|
||||
func testAnalyticsPromptScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "AnalyticsPromptScreen_Previews")
|
||||
}
|
||||
|
||||
func testAnalyticsSettingsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "AnalyticsSettingsScreen_Previews")
|
||||
}
|
||||
|
||||
func testAppLockScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "AppLockScreen_Previews")
|
||||
}
|
||||
|
||||
func testAppLockSetupBiometricsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "AppLockSetupBiometricsScreen_Previews")
|
||||
}
|
||||
|
||||
func testAppLockSetupPINScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "AppLockSetupPINScreen_Previews")
|
||||
}
|
||||
|
||||
func testAppLockSetupSettingsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "AppLockSetupSettingsScreen_Previews")
|
||||
}
|
||||
|
||||
func testAudioMediaEventsTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "AudioMediaEventsTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testAudioRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "AudioRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testAuthenticationStartScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "AuthenticationStartScreen_Previews")
|
||||
}
|
||||
|
||||
func testAvatarHeaderView() async throws {
|
||||
try await performAccessibilityAudit(named: "AvatarHeaderView_Previews")
|
||||
}
|
||||
|
||||
func testBadgeLabel() async throws {
|
||||
try await performAccessibilityAudit(named: "BadgeLabel_Previews")
|
||||
}
|
||||
|
||||
func testBigIcon() async throws {
|
||||
try await performAccessibilityAudit(named: "BigIcon_Previews")
|
||||
}
|
||||
|
||||
func testBlockedUsersScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "BlockedUsersScreen_Previews")
|
||||
}
|
||||
|
||||
func testBugReportScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "BugReportScreen_Previews")
|
||||
}
|
||||
|
||||
func testCallInviteRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "CallInviteRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testCallNotificationRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "CallNotificationRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testCollapsibleRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "CollapsibleRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testCompletionSuggestion() async throws {
|
||||
try await performAccessibilityAudit(named: "CompletionSuggestion_Previews")
|
||||
}
|
||||
|
||||
func testComposerToolbar() async throws {
|
||||
try await performAccessibilityAudit(named: "ComposerToolbar_Previews")
|
||||
}
|
||||
|
||||
func testCreateRoom() async throws {
|
||||
try await performAccessibilityAudit(named: "CreateRoom_Previews")
|
||||
}
|
||||
|
||||
func testDeactivateAccountScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "DeactivateAccountScreen_Previews")
|
||||
}
|
||||
|
||||
func testDeclineAndBlockScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "DeclineAndBlockScreen_Previews")
|
||||
}
|
||||
|
||||
func testEditRoomAddressScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "EditRoomAddressScreen_Previews")
|
||||
}
|
||||
|
||||
func testElementTextFieldStyle() async throws {
|
||||
try await performAccessibilityAudit(named: "ElementTextFieldStyle_Previews")
|
||||
}
|
||||
|
||||
func testEmojiPickerScreenHeaderView() async throws {
|
||||
try await performAccessibilityAudit(named: "EmojiPickerScreenHeaderView_Previews")
|
||||
}
|
||||
|
||||
func testEmojiPickerScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "EmojiPickerScreen_Previews")
|
||||
}
|
||||
|
||||
func testEmoteRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "EmoteRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testEncryptedRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "EncryptedRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testEncryptionResetPasswordScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "EncryptionResetPasswordScreen_Previews")
|
||||
}
|
||||
|
||||
func testEncryptionResetScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "EncryptionResetScreen_Previews")
|
||||
}
|
||||
|
||||
func testEstimatedWaveformView() async throws {
|
||||
try await performAccessibilityAudit(named: "EstimatedWaveformView_Previews")
|
||||
}
|
||||
|
||||
func testFileMediaEventsTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "FileMediaEventsTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testFileRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "FileRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testFormButtonStyles() async throws {
|
||||
try await performAccessibilityAudit(named: "FormButtonStyles_Previews")
|
||||
}
|
||||
|
||||
func testFormattedBodyText() async throws {
|
||||
try await performAccessibilityAudit(named: "FormattedBodyText_Previews")
|
||||
}
|
||||
|
||||
func testFormattingToolbar() async throws {
|
||||
try await performAccessibilityAudit(named: "FormattingToolbar_Previews")
|
||||
}
|
||||
|
||||
func testFullscreenDialog() async throws {
|
||||
try await performAccessibilityAudit(named: "FullscreenDialog_Previews")
|
||||
}
|
||||
|
||||
func testGlobalSearchScreenListRow() async throws {
|
||||
try await performAccessibilityAudit(named: "GlobalSearchScreenListRow_Previews")
|
||||
}
|
||||
|
||||
func testGlobalSearchScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "GlobalSearchScreen_Previews")
|
||||
}
|
||||
|
||||
func testHighlightedTimelineItemModifier() async throws {
|
||||
try await performAccessibilityAudit(named: "HighlightedTimelineItemModifier_Previews")
|
||||
}
|
||||
|
||||
func testHomeScreenEmptyStateView() async throws {
|
||||
try await performAccessibilityAudit(named: "HomeScreenEmptyStateView_Previews")
|
||||
}
|
||||
|
||||
func testHomeScreenInviteCell() async throws {
|
||||
try await performAccessibilityAudit(named: "HomeScreenInviteCell_Previews")
|
||||
}
|
||||
|
||||
func testHomeScreenKnockedCell() async throws {
|
||||
try await performAccessibilityAudit(named: "HomeScreenKnockedCell_Previews")
|
||||
}
|
||||
|
||||
func testHomeScreenRecoveryKeyConfirmationBanner() async throws {
|
||||
try await performAccessibilityAudit(named: "HomeScreenRecoveryKeyConfirmationBanner_Previews")
|
||||
}
|
||||
|
||||
func testHomeScreenRoomCell() async throws {
|
||||
try await performAccessibilityAudit(named: "HomeScreenRoomCell_Previews")
|
||||
}
|
||||
|
||||
func testHomeScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "HomeScreen_Previews")
|
||||
}
|
||||
|
||||
func testIdentityConfirmationScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "IdentityConfirmationScreen_Previews")
|
||||
}
|
||||
|
||||
func testIdentityConfirmedScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "IdentityConfirmedScreen_Previews")
|
||||
}
|
||||
|
||||
func testImageMediaEventsTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "ImageMediaEventsTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testImageRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "ImageRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testInviteUsersScreenSelectedItem() async throws {
|
||||
try await performAccessibilityAudit(named: "InviteUsersScreenSelectedItem_Previews")
|
||||
}
|
||||
|
||||
func testInviteUsersScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "InviteUsersScreen_Previews")
|
||||
}
|
||||
|
||||
func testJoinRoomByAddressView() async throws {
|
||||
try await performAccessibilityAudit(named: "JoinRoomByAddressView_Previews")
|
||||
}
|
||||
|
||||
func testJoinRoomScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "JoinRoomScreen_Previews")
|
||||
}
|
||||
|
||||
func testKnockRequestCell() async throws {
|
||||
try await performAccessibilityAudit(named: "KnockRequestCell_Previews")
|
||||
}
|
||||
|
||||
func testKnockRequestsBannerView() async throws {
|
||||
try await performAccessibilityAudit(named: "KnockRequestsBannerView_Previews")
|
||||
}
|
||||
|
||||
func testKnockRequestsListEmptyStateView() async throws {
|
||||
try await performAccessibilityAudit(named: "KnockRequestsListEmptyStateView_Previews")
|
||||
}
|
||||
|
||||
func testKnockRequestsListScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "KnockRequestsListScreen_Previews")
|
||||
}
|
||||
|
||||
func testLegalInformationScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "LegalInformationScreen_Previews")
|
||||
}
|
||||
|
||||
func testLoadableImage() async throws {
|
||||
try await performAccessibilityAudit(named: "LoadableImage_Previews")
|
||||
}
|
||||
|
||||
func testLocationMarkerView() async throws {
|
||||
try await performAccessibilityAudit(named: "LocationMarkerView_Previews")
|
||||
}
|
||||
|
||||
func testLocationRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "LocationRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testLoginScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "LoginScreen_Previews")
|
||||
}
|
||||
|
||||
func testLongPressWithFeedback() async throws {
|
||||
try await performAccessibilityAudit(named: "LongPressWithFeedback_Previews")
|
||||
}
|
||||
|
||||
func testManageRoomMemberSheetView() async throws {
|
||||
try await performAccessibilityAudit(named: "ManageRoomMemberSheetView_Previews")
|
||||
}
|
||||
|
||||
func testMapLibreStaticMapView() async throws {
|
||||
try await performAccessibilityAudit(named: "MapLibreStaticMapView_Previews")
|
||||
}
|
||||
|
||||
func testMatrixUserPermalink() async throws {
|
||||
try await performAccessibilityAudit(named: "MatrixUserPermalink_Previews")
|
||||
}
|
||||
|
||||
func testMediaEventsTimelineScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "MediaEventsTimelineScreen_Previews")
|
||||
}
|
||||
|
||||
func testMediaUploadPreviewScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "MediaUploadPreviewScreen_Previews")
|
||||
}
|
||||
|
||||
func testMentionSuggestionItemView() async throws {
|
||||
try await performAccessibilityAudit(named: "MentionSuggestionItemView_Previews")
|
||||
}
|
||||
|
||||
func testMessageComposerTextField() async throws {
|
||||
try await performAccessibilityAudit(named: "MessageComposerTextField_Previews")
|
||||
}
|
||||
|
||||
func testMessageComposer() async throws {
|
||||
try await performAccessibilityAudit(named: "MessageComposer_Previews")
|
||||
}
|
||||
|
||||
func testMessageForwardingScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "MessageForwardingScreen_Previews")
|
||||
}
|
||||
|
||||
func testMessageText() async throws {
|
||||
try await performAccessibilityAudit(named: "MessageText_Previews")
|
||||
}
|
||||
|
||||
func testNoticeRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "NoticeRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testNotificationPermissionsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "NotificationPermissionsScreen_Previews")
|
||||
}
|
||||
|
||||
func testNotificationSettingsEditScreenRoomCell() async throws {
|
||||
try await performAccessibilityAudit(named: "NotificationSettingsEditScreenRoomCell_Previews")
|
||||
}
|
||||
|
||||
func testNotificationSettingsEditScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "NotificationSettingsEditScreen_Previews")
|
||||
}
|
||||
|
||||
func testNotificationSettingsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "NotificationSettingsScreen_Previews")
|
||||
}
|
||||
|
||||
func testPINTextField() async throws {
|
||||
try await performAccessibilityAudit(named: "PINTextField_Previews")
|
||||
}
|
||||
|
||||
func testPaginationIndicatorRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "PaginationIndicatorRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testPillViewOnBubble() async throws {
|
||||
try await performAccessibilityAudit(named: "PillViewOnBubble_Previews")
|
||||
}
|
||||
|
||||
func testPillView() async throws {
|
||||
try await performAccessibilityAudit(named: "PillView_Previews")
|
||||
}
|
||||
|
||||
func testPinnedEventsTimelineScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "PinnedEventsTimelineScreen_Previews")
|
||||
}
|
||||
|
||||
func testPinnedItemsBannerView() async throws {
|
||||
try await performAccessibilityAudit(named: "PinnedItemsBannerView_Previews")
|
||||
}
|
||||
|
||||
func testPinnedItemsIndicatorView() async throws {
|
||||
try await performAccessibilityAudit(named: "PinnedItemsIndicatorView_Previews")
|
||||
}
|
||||
|
||||
func testPlaceholderAvatarImage() async throws {
|
||||
try await performAccessibilityAudit(named: "PlaceholderAvatarImage_Previews")
|
||||
}
|
||||
|
||||
func testPlaceholderScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "PlaceholderScreen_Previews")
|
||||
}
|
||||
|
||||
func testPollFormScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "PollFormScreen_Previews")
|
||||
}
|
||||
|
||||
func testPollOptionView() async throws {
|
||||
try await performAccessibilityAudit(named: "PollOptionView_Previews")
|
||||
}
|
||||
|
||||
func testPollRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "PollRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testPollView() async throws {
|
||||
try await performAccessibilityAudit(named: "PollView_Previews")
|
||||
}
|
||||
|
||||
func testQRCodeLoginScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "QRCodeLoginScreen_Previews")
|
||||
}
|
||||
|
||||
func testReactionsSummaryView() async throws {
|
||||
try await performAccessibilityAudit(named: "ReactionsSummaryView_Previews")
|
||||
}
|
||||
|
||||
func testReadMarkerRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "ReadMarkerRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testReadReceiptCell() async throws {
|
||||
try await performAccessibilityAudit(named: "ReadReceiptCell_Previews")
|
||||
}
|
||||
|
||||
func testReadReceiptsSummaryView() async throws {
|
||||
try await performAccessibilityAudit(named: "ReadReceiptsSummaryView_Previews")
|
||||
}
|
||||
|
||||
func testRedactedRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "RedactedRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testReportContentScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "ReportContentScreen_Previews")
|
||||
}
|
||||
|
||||
func testReportRoomScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "ReportRoomScreen_Previews")
|
||||
}
|
||||
|
||||
func testResolveVerifiedUserSendFailureScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "ResolveVerifiedUserSendFailureScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomAttachmentPicker() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomAttachmentPicker_Previews")
|
||||
}
|
||||
|
||||
func testRoomAvatarImage() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomAvatarImage_Previews")
|
||||
}
|
||||
|
||||
func testRoomChangePermissionsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomChangePermissionsScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomChangeRolesScreenRow() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomChangeRolesScreenRow_Previews")
|
||||
}
|
||||
|
||||
func testRoomChangeRolesScreenSelectedItem() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomChangeRolesScreenSelectedItem_Previews")
|
||||
}
|
||||
|
||||
func testRoomChangeRolesScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomChangeRolesScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomDetailsEditScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomDetailsEditScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomDetailsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomDetailsScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomDirectorySearchCell() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomDirectorySearchCell_Previews")
|
||||
}
|
||||
|
||||
func testRoomDirectorySearchScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomDirectorySearchScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomHeaderView() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomHeaderView_Previews")
|
||||
}
|
||||
|
||||
func testRoomInviterLabel() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomInviterLabel_Previews")
|
||||
}
|
||||
|
||||
func testRoomListFilterView() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomListFilterView_Previews")
|
||||
}
|
||||
|
||||
func testRoomListFiltersEmptyStateView() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomListFiltersEmptyStateView_Previews")
|
||||
}
|
||||
|
||||
func testRoomListFiltersView() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomListFiltersView_Previews")
|
||||
}
|
||||
|
||||
func testRoomMemberDetailsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomMemberDetailsScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomMembersListMemberCell() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomMembersListMemberCell_Previews")
|
||||
}
|
||||
|
||||
func testRoomMembersListScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomMembersListScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomNotificationSettingsCustomSectionView() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomNotificationSettingsCustomSectionView_Previews")
|
||||
}
|
||||
|
||||
func testRoomNotificationSettingsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomNotificationSettingsScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomNotificationSettingsUserDefinedScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomNotificationSettingsUserDefinedScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomPollsHistoryScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomPollsHistoryScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomRolesAndPermissionsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomRolesAndPermissionsScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomScreenFooterView() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomScreenFooterView_Previews")
|
||||
}
|
||||
|
||||
func testRoomScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomScreen_Previews")
|
||||
}
|
||||
|
||||
func testRoomSelectionScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "RoomSelectionScreen_Previews")
|
||||
}
|
||||
|
||||
func testSFNumberedListView() async throws {
|
||||
try await performAccessibilityAudit(named: "SFNumberedListView_Previews")
|
||||
}
|
||||
|
||||
func testSecureBackupKeyBackupScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "SecureBackupKeyBackupScreen_Previews")
|
||||
}
|
||||
|
||||
func testSecureBackupLogoutConfirmationScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "SecureBackupLogoutConfirmationScreen_Previews")
|
||||
}
|
||||
|
||||
func testSecureBackupRecoveryKeyScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "SecureBackupRecoveryKeyScreen_Previews")
|
||||
}
|
||||
|
||||
func testSecureBackupScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "SecureBackupScreen_Previews")
|
||||
}
|
||||
|
||||
func testSecurityAndPrivacyScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "SecurityAndPrivacyScreen_Previews")
|
||||
}
|
||||
|
||||
func testSendInviteConfirmationView() async throws {
|
||||
try await performAccessibilityAudit(named: "SendInviteConfirmationView_Previews")
|
||||
}
|
||||
|
||||
func testSeparatorMediaEventsTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "SeparatorMediaEventsTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testSeparatorRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "SeparatorRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testServerConfirmationScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "ServerConfirmationScreen_Previews")
|
||||
}
|
||||
|
||||
func testServerSelection() async throws {
|
||||
try await performAccessibilityAudit(named: "ServerSelection_Previews")
|
||||
}
|
||||
|
||||
func testSessionVerificationRequestDetailsView() async throws {
|
||||
try await performAccessibilityAudit(named: "SessionVerificationRequestDetailsView_Previews")
|
||||
}
|
||||
|
||||
func testSessionVerification() async throws {
|
||||
try await performAccessibilityAudit(named: "SessionVerification_Previews")
|
||||
}
|
||||
|
||||
func testSettingsScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "SettingsScreen_Previews")
|
||||
}
|
||||
|
||||
func testShimmerOverlay() async throws {
|
||||
try await performAccessibilityAudit(named: "ShimmerOverlay_Previews")
|
||||
}
|
||||
|
||||
func testSoftLogoutScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "SoftLogoutScreen_Previews")
|
||||
}
|
||||
|
||||
func testSplashScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "SplashScreen_Previews")
|
||||
}
|
||||
|
||||
func testStackedAvatarsView() async throws {
|
||||
try await performAccessibilityAudit(named: "StackedAvatarsView_Previews")
|
||||
}
|
||||
|
||||
func testStartChatScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "StartChatScreen_Previews")
|
||||
}
|
||||
|
||||
func testStateRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "StateRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testStaticLocationScreenViewer() async throws {
|
||||
try await performAccessibilityAudit(named: "StaticLocationScreenViewer_Previews")
|
||||
}
|
||||
|
||||
func testStickerRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "StickerRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testSwipeRightAction() async throws {
|
||||
try await performAccessibilityAudit(named: "SwipeRightAction_Previews")
|
||||
}
|
||||
|
||||
func testSwipeToReplyView() async throws {
|
||||
try await performAccessibilityAudit(named: "SwipeToReplyView_Previews")
|
||||
}
|
||||
|
||||
func testTextRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "TextRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testThreadDecorator() async throws {
|
||||
try await performAccessibilityAudit(named: "ThreadDecorator_Previews")
|
||||
}
|
||||
|
||||
func testTimelineDeliveryStatusView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineDeliveryStatusView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineItemBubbledStylerView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineItemBubbledStylerView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineItemDebugView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineItemDebugView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineItemMenu() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineItemMenu_Previews")
|
||||
}
|
||||
|
||||
func testTimelineItemSendInfoLabel() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineItemSendInfoLabel_Previews")
|
||||
}
|
||||
|
||||
func testTimelineItemStyler() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineItemStyler_Previews")
|
||||
}
|
||||
|
||||
func testTimelineMediaPreviewDetailsView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineMediaPreviewDetailsView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineMediaPreviewRedactConfirmationView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineMediaPreviewRedactConfirmationView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineReactionView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineReactionView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineReadReceiptsView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineReadReceiptsView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineReplyView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineReplyView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineStartRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineStartRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineThreadSummaryView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineThreadSummaryView_Previews")
|
||||
}
|
||||
|
||||
func testTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "TimelineView_Previews")
|
||||
}
|
||||
|
||||
func testTombstonedAvatarImage() async throws {
|
||||
try await performAccessibilityAudit(named: "TombstonedAvatarImage_Previews")
|
||||
}
|
||||
|
||||
func testTypingIndicatorView() async throws {
|
||||
try await performAccessibilityAudit(named: "TypingIndicatorView_Previews")
|
||||
}
|
||||
|
||||
func testUnsupportedRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "UnsupportedRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testUserDetailsEditScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "UserDetailsEditScreen_Previews")
|
||||
}
|
||||
|
||||
func testUserIndicatorModalView() async throws {
|
||||
try await performAccessibilityAudit(named: "UserIndicatorModalView_Previews")
|
||||
}
|
||||
|
||||
func testUserIndicatorToastView() async throws {
|
||||
try await performAccessibilityAudit(named: "UserIndicatorToastView_Previews")
|
||||
}
|
||||
|
||||
func testUserProfileCell() async throws {
|
||||
try await performAccessibilityAudit(named: "UserProfileCell_Previews")
|
||||
}
|
||||
|
||||
func testUserProfileScreen() async throws {
|
||||
try await performAccessibilityAudit(named: "UserProfileScreen_Previews")
|
||||
}
|
||||
|
||||
func testVerificationBadge() async throws {
|
||||
try await performAccessibilityAudit(named: "VerificationBadge_Previews")
|
||||
}
|
||||
|
||||
func testVideoMediaEventsTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "VideoMediaEventsTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testVideoRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "VideoRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testVisualListItem() async throws {
|
||||
try await performAccessibilityAudit(named: "VisualListItem_Previews")
|
||||
}
|
||||
|
||||
func testVoiceMessageButton() async throws {
|
||||
try await performAccessibilityAudit(named: "VoiceMessageButton_Previews")
|
||||
}
|
||||
|
||||
func testVoiceMessageMediaEventsTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "VoiceMessageMediaEventsTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testVoiceMessagePreviewComposer() async throws {
|
||||
try await performAccessibilityAudit(named: "VoiceMessagePreviewComposer_Previews")
|
||||
}
|
||||
|
||||
func testVoiceMessageRecordingButton() async throws {
|
||||
try await performAccessibilityAudit(named: "VoiceMessageRecordingButton_Previews")
|
||||
}
|
||||
|
||||
func testVoiceMessageRecordingComposer() async throws {
|
||||
try await performAccessibilityAudit(named: "VoiceMessageRecordingComposer_Previews")
|
||||
}
|
||||
|
||||
func testVoiceMessageRecordingView() async throws {
|
||||
try await performAccessibilityAudit(named: "VoiceMessageRecordingView_Previews")
|
||||
}
|
||||
|
||||
func testVoiceMessageRoomPlaybackView() async throws {
|
||||
try await performAccessibilityAudit(named: "VoiceMessageRoomPlaybackView_Previews")
|
||||
}
|
||||
|
||||
func testVoiceMessageRoomTimelineView() async throws {
|
||||
try await performAccessibilityAudit(named: "VoiceMessageRoomTimelineView_Previews")
|
||||
}
|
||||
|
||||
func testWaveformCursorView() async throws {
|
||||
try await performAccessibilityAudit(named: "WaveformCursorView_Previews")
|
||||
}
|
||||
}
|
||||
|
||||
// swiftlint:enable all
|
||||
// swiftformat:enable all
|
||||
@@ -1,43 +0,0 @@
|
||||
//
|
||||
// Copyright 2025 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
@MainActor
|
||||
class Test: XCTestCase {
|
||||
var app: XCUIApplication!
|
||||
|
||||
func test() async throws {
|
||||
let client = try UITestsSignalling.Client(mode: .tests)
|
||||
app = Application.launch(viewID: "SecureBackupLogoutConfirmationScreen_Previews")
|
||||
await client.waitForApp()
|
||||
defer { try? client.stop() }
|
||||
|
||||
try client.send(.accessibilityAudit(.nextPreview))
|
||||
forLoop: for await signal in client.signals.values {
|
||||
switch signal {
|
||||
case .accessibilityAudit(let auditSignal):
|
||||
switch auditSignal {
|
||||
case .nextPreviewReady(let name):
|
||||
try? app.performAccessibilityAudit { issue in
|
||||
XCTFail("\(name): \(issue)")
|
||||
return true
|
||||
}
|
||||
try? client.send(.accessibilityAudit(.nextPreview))
|
||||
case .noMorePreviews:
|
||||
break forLoop
|
||||
default:
|
||||
fatalError("Unhandled signal")
|
||||
}
|
||||
default:
|
||||
fatalError("Unhandled signal")
|
||||
}
|
||||
}
|
||||
|
||||
app.terminate()
|
||||
}
|
||||
}
|
||||
@@ -48,4 +48,8 @@ targets:
|
||||
- path: ../Sources
|
||||
- path: ../SupportingFiles
|
||||
- path: ../../ElementX/Sources/UITests/UITestsSignalling.swift
|
||||
- path: ../../ElementX/Sources/Other/AccessibilityIdentifiers.swift
|
||||
- path: ../../ElementX/Sources/Other/MatrixEntityRegex.swift
|
||||
- path: ../../ElementX/Sources/Other/Pills/PillUtilities.swift
|
||||
- path: ../../ElementX/Sources/Other/Extensions/NSRegularExpresion.swift
|
||||
|
||||
|
||||
Reference in New Issue
Block a user