[Behat] Normalize whitespace characters in string

This commit is contained in:
Wojdylak 2024-10-14 13:25:47 +02:00
parent a0b99068e9
commit 61adbd84b1
No known key found for this signature in database
GPG key ID: 7509E560A6821ABE

View file

@ -98,8 +98,9 @@ class ShowPage extends SymfonyPage implements ShowPageInterface
}
$row = $nameTd->getParent();
$text = $row->find('css', '[data-test-product-attribute-value]')->getText();
return trim($row->find('css', '[data-test-product-attribute-value]')->getText());
return str_replace(["\u{200B}", "\u{200A}", "\u{202F}"], ' ', trim($text));
}
public function getAttributeListByName(string $name): array