readValueKeyLocatorId function
Compact string ValueKey on element itself (= Ensemble testId).
Implementation
String? readValueKeyLocatorId(Element element) {
final key = element.widget.key;
final keyValue = key is ValueKey ? key.value : null;
if (keyValue is! String) return null;
final compact = compactWidgetLocatorId(keyValue);
return compact.isEmpty ? null : compact;
}