fix: Compare lowercase component IDs

- This was failing. Make this more lenient so the user can specify component id in the test file in a non-case-sensitive manner.
- Also switched around a wrong token order which was causing a failure (not sure we care about token order but we may in the future? Python didn't care...)
This commit is contained in:
TAMARA LIPOWSKI
2025-09-17 18:20:13 -04:00
committed by Tamara
parent 779c690b6d
commit 0226bda482
3 changed files with 8 additions and 8 deletions

View File

@@ -28,8 +28,8 @@ impl ProtocolComponentExpectation {
pub fn compare(&self, other: &ProtocolComponent, colorize_output: bool) -> Option<String> {
let mut diffs = Vec::new();
// Compare id
if self.id != other.id {
// Compare id (case-insensitive)
if self.id.to_lowercase() != other.id.to_lowercase() {
let diff = self.format_diff("id", &self.id, &other.id, colorize_output);
diffs.push(format!("Field 'id' mismatch for {}:\n{}", self.id, diff));
}