mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
fix: remove render test with no value and add aria helper for btn identification
This commit is contained in:
@@ -102,6 +102,7 @@ export function ToolBar({
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Help"
|
||||
onClick={() => setSealBtnClicked(false)}
|
||||
className={`bg-transparent cursor-pointer -mt-2 absolute z-1000001 right-0 text-primary ${sealBtnClicked ? "" : "hidden"}`}
|
||||
>
|
||||
|
||||
@@ -83,11 +83,9 @@ describe("Editor Page", () => {
|
||||
expect(screen.queryByText(/Opening your draft/i)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
// Initial state: DRAFT (not read-only)
|
||||
const canvas = screen.getByTestId("canvas");
|
||||
expect(canvas.getAttribute("data-readonly")).toBe("false");
|
||||
|
||||
// Click Seal in the main toolbar (it's in the div with id="writer-toolbar")
|
||||
const toolbar = container.querySelector("#writer-toolbar");
|
||||
const sealBtn = toolbar?.querySelector(".btn-primary");
|
||||
if (!sealBtn) throw new Error("Seal button not found");
|
||||
|
||||
@@ -14,16 +14,6 @@ describe("Login Page", () => {
|
||||
server.resetHandlers();
|
||||
});
|
||||
|
||||
it("should render the sign-in form correctly", () => {
|
||||
render(
|
||||
<MemoryRouter>
|
||||
<Login />
|
||||
</MemoryRouter>,
|
||||
);
|
||||
|
||||
expect(screen.getByText("Sign in to")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should display a technical issues message when the server is down", async () => {
|
||||
server.use(
|
||||
http.post(`${API_URL}${endpoints.LOGIN}`, () =>
|
||||
|
||||
Reference in New Issue
Block a user