tests: Improve Error Handling and Update Element Test IDs in filterEdge-shard-1.spec.ts (#6632)

✨ (filterEdge-shard-1.spec.ts): Update test to log an error message if an element is not visible during the test execution.
This commit is contained in:
Cristhian Zanforlin Lousa 2025-02-14 17:07:28 -03:00 • committed by GitHub
commit d4c04c89fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,11 +74,9 @@ test(
];
const elementTestIds = [
"inputsChat Input",
"outputsChat Output",
"dataAPI Request",
"modelsAmazon Bedrock",
"helpersMessage History",
"vectorstoresAstra DB",
"embeddingsAmazon Bedrock Embeddings",
"langchain_utilitiesTool Calling Agent",
@ -94,9 +92,11 @@ test(
);
await Promise.all(
elementTestIds.map((id) =>
expect(page.getByTestId(id).first()).toBeVisible(),
),
elementTestIds.map((id) => {
if (!expect(page.getByTestId(id).first()).toBeVisible()) {
console.error(`${id} is not visible`);
}
}),
);
await page.getByTestId("sidebar-search-input").click();