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:
parent
eec1fb23d3
commit
b8c100744c
1 changed files with 16 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import { test } from "@playwright/test";
|
import { expect, test } from "@playwright/test";
|
||||||
import * as dotenv from "dotenv";
|
import * as dotenv from "dotenv";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||||
|
|
@ -171,11 +171,20 @@ test(
|
||||||
await page.waitForSelector("text=built successfully", { timeout: 30000 });
|
await page.waitForSelector("text=built successfully", { timeout: 30000 });
|
||||||
await page.waitForTimeout(600);
|
await page.waitForTimeout(600);
|
||||||
await page.keyboard.press("o");
|
await page.keyboard.press("o");
|
||||||
await page.waitForSelector(
|
await page.getByText(`Inspect the output of the component below.`, {
|
||||||
`[data-testid="${urlNodeId}-dataframe-output-modal"]`,
|
exact: true,
|
||||||
{
|
});
|
||||||
timeout: 3000,
|
|
||||||
},
|
await page.getByText(`Component Output`, {
|
||||||
);
|
exact: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const closeButton = await page
|
||||||
|
.getByText(`Close`, {
|
||||||
|
exact: true,
|
||||||
|
})
|
||||||
|
.count();
|
||||||
|
|
||||||
|
expect(closeButton).toBeGreaterThan(1);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue