fix test case
This commit is contained in:
committed by
Benoit TELLIER
parent
42c953ccf9
commit
202feb3d23
@@ -660,8 +660,8 @@ describe("Event Full Display", () => {
|
||||
// Check that event title is displayed
|
||||
expect(screen.getAllByText("Test Event")).toHaveLength(2);
|
||||
|
||||
// Check that event time is displayed
|
||||
expect(screen.getByText(/2025-10-06T17:/)).toBeInTheDocument();
|
||||
// Check that event time is displayed (use more flexible pattern)
|
||||
expect(screen.getByText(/2025-10-06T\d{2}:/)).toBeInTheDocument();
|
||||
|
||||
expect(screen.getByText("First Calendar")).toBeInTheDocument();
|
||||
});
|
||||
@@ -1016,6 +1016,10 @@ describe("Event Full Display", () => {
|
||||
/>,
|
||||
preloadedState
|
||||
);
|
||||
|
||||
// Initially should show "Show More" button
|
||||
expect(screen.getByText("Show More")).toBeInTheDocument();
|
||||
|
||||
act(() => {
|
||||
fireEvent.click(screen.getByText("Show More"));
|
||||
});
|
||||
@@ -1024,8 +1028,8 @@ describe("Event Full Display", () => {
|
||||
expect(screen.getByLabelText(/Notification/i)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
// Debug: Print DOM to see what's rendered
|
||||
console.log("DOM after Show More clicked:", document.body.innerHTML);
|
||||
// After clicking, should show "Show Less" button
|
||||
expect(screen.getByText("Show Less")).toBeInTheDocument();
|
||||
|
||||
// EventDisplay modal doesn't have Repeat checkbox, only RepeatEvent component
|
||||
// which shows repetition settings when repetition data exists
|
||||
@@ -1105,7 +1109,7 @@ describe("Event Full Display", () => {
|
||||
expect(screen.getAllByText("Test Event")).toHaveLength(2);
|
||||
|
||||
// Check that event time is displayed (use a more flexible regex)
|
||||
expect(screen.getByText(/2025-10-06T17:/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/2025-10-06T\d{2}:/)).toBeInTheDocument();
|
||||
});
|
||||
it("displays event with multiple calendars", () => {
|
||||
const day = new Date();
|
||||
|
||||
Reference in New Issue
Block a user