fix: remove render test with no value and add aria helper for btn identification

This commit is contained in:
ramvignesh-b
2026-04-28 03:20:48 +05:30
parent ac2c7b0eac
commit 72346d8721
3 changed files with 1 additions and 12 deletions
@@ -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"}`}
>
-2
View File
@@ -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");
-10
View File
@@ -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}`, () =>