Skip to content

Commit

Permalink
update testAccessbilityAudit
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Oct 28, 2024
1 parent 79f35c6 commit 0928d8b
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,24 @@ - (void)testAccessbilityAudit
[set addObject:@"XCUIAccessibilityAuditTypeAll"];
NSArray *auditIssues2 = [XCUIApplication.fb_activeApplication fb_performAccessibilityAuditWithAuditTypesSet:set.copy
error:&error];
XCTAssertEqualObjects(auditIssues1, auditIssues2);
// 'elementDescription' is not in this list because it could have
// different object id's debug description in XCTest.
NSArray *checkKeys = @[
@"auditType",
@"compactDescription",
@"detailedDescription",
@"element",
@"elementAttributes"
];

for (int i = 1; i < [auditIssues1 count]; i++) {
for (NSString *k in checkKeys) {
XCTAssertEqualObjects(
[auditIssues1[i] objectForKey:k],
[auditIssues2[i] objectForKey:k]
);
}
}
XCTAssertNil(error);
}

Expand Down

0 comments on commit 0928d8b

Please sign in to comment.