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