matchesSelection static method
Implementation
static bool matchesSelection(
EnsembleTestDefinition def,
EnsembleTestSelection selection,
) {
final test = def.testCase;
final idMatches = selection.ids.isNotEmpty &&
selection.ids.any(
(id) =>
test.id == id ||
test.id.startsWith('$id[') ||
id.startsWith('${test.id}['),
);
final featureMatches = selection.features.isNotEmpty &&
selection.features.contains(test.feature);
final profileMatches = selection.profiles.isNotEmpty &&
matchesProfileSelection(test, selection);
final tagMatches = selection.tags.isNotEmpty &&
test.tags.any((tag) => selection.tags.contains(tag));
final pathMatches = selection.paths.isNotEmpty &&
selection.paths.any((path) => def.assetPath.contains(path));
return idMatches ||
featureMatches ||
profileMatches ||
tagMatches ||
pathMatches;
}