test: enhance chat integration tests with additional assertions and validations (#7102)

 (chatInputOutputUser-shard-1.spec.ts): add assertion to check if the close button count is greater than 1 for improved test coverage
This commit is contained in:
Cristhian Zanforlin Lousa 2025-03-17 11:37:00 -03:00 committed by GitHub
commit b8c100744c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
import { test } from "@playwright/test";
import { expect, test } from "@playwright/test";
import * as dotenv from "dotenv";
import path from "path";
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
@ -171,11 +171,20 @@ test(
await page.waitForSelector("text=built successfully", { timeout: 30000 });
await page.waitForTimeout(600);
await page.keyboard.press("o");
await page.waitForSelector(
`[data-testid="${urlNodeId}-dataframe-output-modal"]`,
{
timeout: 3000,
},
);
await page.getByText(`Inspect the output of the component below.`, {
exact: true,
});
await page.getByText(`Component Output`, {
exact: true,
});
const closeButton = await page
.getByText(`Close`, {
exact: true,
})
.count();
expect(closeButton).toBeGreaterThan(1);
},
);