Merge pull request #1764 from modelcontextprotocol/v2/fix-1699-flaky-viewheader-animation
test: de-flake ViewHeader connect/disconnect animation assertion (#1699)
This commit is contained in:
commit
d76c4d5379
1 changed files with 9 additions and 3 deletions
|
|
@ -355,12 +355,18 @@ describe("ViewHeader", () => {
|
|||
?.getAttribute("data-anim"),
|
||||
).toBe("out");
|
||||
|
||||
// The server name and the Disconnect button are removed by two
|
||||
// independent Transition exits; on a slow runner the button's exit can
|
||||
// lag the name's, so each "removed" assertion gets its own waitFor rather
|
||||
// than assuming the two transitions complete in lockstep (#1699).
|
||||
await waitFor(() =>
|
||||
expect(screen.queryByText("my-mcp-server")).not.toBeInTheDocument(),
|
||||
);
|
||||
expect(
|
||||
screen.queryByRole("button", { name: "Disconnect from server" }),
|
||||
).not.toBeInTheDocument();
|
||||
await waitFor(() =>
|
||||
expect(
|
||||
screen.queryByRole("button", { name: "Disconnect from server" }),
|
||||
).not.toBeInTheDocument(),
|
||||
);
|
||||
});
|
||||
|
||||
it("renders the dark-scheme icon/logo branch under a dark color scheme", () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue