test: remove redundant frontend checks
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { composeStories } from "@storybook/react-vite";
|
||||
// eslint-disable-next-line testing-library/no-manual-cleanup -- Vitest globals are disabled, so RTL cannot register its automatic afterEach cleanup.
|
||||
import { cleanup, fireEvent, render, screen } from "@testing-library/react";
|
||||
import { fn } from "storybook/test";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import preview from "../../.storybook/preview";
|
||||
@@ -56,18 +55,4 @@ describe("Storybook isolated product examples", () => {
|
||||
|
||||
for (const spy of spies) expect(spy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("keeps synthetic totals visible while the refresh example calls a local retry", () => {
|
||||
const { RefreshError } = composeStories(RefreshStories, preview);
|
||||
const retry = fn();
|
||||
const view = render(<RefreshError retry={retry} />);
|
||||
expect(screen.getByText(/125\s*000,50/)).toBeVisible();
|
||||
fireEvent.click(screen.getByRole("button"));
|
||||
expect(retry).toHaveBeenCalledOnce();
|
||||
view.rerender(
|
||||
<RefreshError refreshError={false} refreshing retry={retry} />,
|
||||
);
|
||||
expect(screen.getByText(/125\s*000,50/)).toBeVisible();
|
||||
expect(screen.getByRole("status")).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user