mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
fix(hierarchy): reach a web test tag through testTag and testID
Compose for Web writes a test tag as data-testid, which is what the web runtime resolves both names against. testTag aliased onto the three identifier keys and not that one, and testID aliased onto nothing at all, so a tag the web runtime found on every row of a list named no element here and every property over it passed vacuously.
This commit is contained in:
1 parent
ae629d9d7d
commit
1bcbb8b7e8
2 files changed
+42
-2
No files matched your search
@@ -274,8 +274,11 @@ var attributeAliases = map[string][]string{
|
||||
// iOS identifier names
|
||||
"identifier": {"resource-id", "accessibilityIdentifier"},
|
||||
"accessibilityIdentifier": {"resource-id", "identifier"},
|
||||
// Compose testTag surfaces as resource-id on Android, accessibilityIdentifier on iOS
|
||||
"testTag": {"resource-id", "identifier", "accessibilityIdentifier"},
|
||||
// Compose testTag surfaces as resource-id on Android, accessibilityIdentifier
|
||||
// on iOS and data-testid on web, which is the key the web runtime resolves
|
||||
// both names against.
|
||||
"testTag": {"resource-id", "identifier", "accessibilityIdentifier", "data-testid"},
|
||||
"testID": {"data-testid"},
|
||||
// iOS AXElement raw name for hintText
|
||||
"placeholderValue": {"hintText"},
|
||||
// iOS AXElement raw name for class
|
||||
|
||||
Reference in new issue
Block a user