Adjust tests after fixing ESLint
CI Pipeline / test (20) (pull_request) Successful in 6m20s
CI Pipeline / test (18) (pull_request) Successful in 9m25s
CI Pipeline / e2e (firefox) (pull_request) Successful in 4m14s
CI Pipeline / e2e (webkit) (pull_request) Successful in 4m29s
CI Pipeline / e2e (chromium) (pull_request) Successful in 14m33s
CI Pipeline / visual-regression (pull_request) Successful in 6m24s
CI Pipeline / performance (pull_request) Successful in 5m40s
CI Pipeline / storybook (pull_request) Successful in 2m20s
CI Pipeline / lint (pull_request) Successful in 1m55s
CI Pipeline / build (pull_request) Successful in 2m4s
CI Pipeline / test (20) (pull_request) Successful in 6m20s
CI Pipeline / test (18) (pull_request) Successful in 9m25s
CI Pipeline / e2e (firefox) (pull_request) Successful in 4m14s
CI Pipeline / e2e (webkit) (pull_request) Successful in 4m29s
CI Pipeline / e2e (chromium) (pull_request) Successful in 14m33s
CI Pipeline / visual-regression (pull_request) Successful in 6m24s
CI Pipeline / performance (pull_request) Successful in 5m40s
CI Pipeline / storybook (pull_request) Successful in 2m20s
CI Pipeline / lint (pull_request) Successful in 1m55s
CI Pipeline / build (pull_request) Successful in 2m4s
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { render, screen, cleanup } from "@testing-library/react";
|
import { render, screen, cleanup } from "@testing-library/react";
|
||||||
import userEvent from "@testing-library/user-event";
|
import userEvent from "@testing-library/user-event";
|
||||||
import { vi, describe, test, expect, afterEach } from "vitest";
|
import { vi, describe, test, expect, afterEach } from "vitest";
|
||||||
|
import { logger } from "../../lib/logger";
|
||||||
import RuleStack from "../../app/components/RuleStack";
|
import RuleStack from "../../app/components/RuleStack";
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@@ -99,16 +100,18 @@ describe("RuleStack Component", () => {
|
|||||||
|
|
||||||
test("handles template click events", async () => {
|
test("handles template click events", async () => {
|
||||||
const user = userEvent.setup();
|
const user = userEvent.setup();
|
||||||
const consoleSpy = vi.spyOn(console, "log").mockImplementation(() => {});
|
const debugSpy = vi
|
||||||
|
.spyOn(logger, "debug")
|
||||||
|
.mockImplementation(() => undefined);
|
||||||
|
|
||||||
render(<RuleStack />);
|
render(<RuleStack />);
|
||||||
|
|
||||||
const consensusCard = screen.getByText("Consensus").closest("div");
|
const consensusCard = screen.getByText("Consensus").closest("div");
|
||||||
await user.click(consensusCard);
|
await user.click(consensusCard);
|
||||||
|
|
||||||
expect(consoleSpy).toHaveBeenCalledWith("Consensus template clicked");
|
expect(debugSpy).toHaveBeenCalledWith("Consensus template clicked");
|
||||||
|
|
||||||
consoleSpy.mockRestore();
|
debugSpy.mockRestore();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("renders with proper semantic structure", () => {
|
test("renders with proper semantic structure", () => {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from "react";
|
||||||
import { render, screen, fireEvent } from "@testing-library/react";
|
import { render, screen, fireEvent } from "@testing-library/react";
|
||||||
import { describe, it, expect, vi } from "vitest";
|
import { describe, it, expect, vi } from "vitest";
|
||||||
import Switch from "../../app/components/Switch";
|
import Switch from "../../app/components/Switch";
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from "react";
|
||||||
import { render, screen, fireEvent } from "@testing-library/react";
|
import { render, screen, fireEvent } from "@testing-library/react";
|
||||||
import { describe, it, expect, vi } from "vitest";
|
import { describe, it, expect, vi } from "vitest";
|
||||||
import ToggleGroup from "../../app/components/ToggleGroup";
|
import ToggleGroup from "../../app/components/ToggleGroup";
|
||||||
|
|||||||
Reference in New Issue
Block a user