Skip to content

Commit

Permalink
tests: Improve Error Handling and Update Element Test IDs in filterEd…
Browse files Browse the repository at this point in the history
…ge-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.
  • Loading branch information
Cristhianzl authored Feb 14, 2025
1 parent 45e2f73 commit d4c04c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/frontend/tests/extended/features/filterEdge-shard-1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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();
Expand Down

0 comments on commit d4c04c8

Please sign in to comment.