Skip to content

Commit 3ecc01e

Browse files
committed
remove part tests
1 parent 027b9ee commit 3ecc01e

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed
Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import { render, screen, waitFor } from "@testing-library/react";
1+
import { render, screen } from "@testing-library/react";
22
import "@testing-library/jest-dom";
33
import { AppHeader } from "../AppHeader";
4-
import userEvent from "@testing-library/user-event";
54
import { BrowserRouter } from 'react-router-dom';
6-
import { act } from 'react';
75

86
describe("AppHeader", () => {
97
// Store the original 'location' object so that it can be restored for other tests.
@@ -33,30 +31,5 @@ describe("AppHeader", () => {
3331

3432
// Check "Logout" option is not present
3533
expect(screen.queryByText("Logout")).toBeNull();
36-
// const accountMenuToggle = await act(()=> {
37-
// screen.findByTestId(
38-
// "page-masthead-dropdown__button",
39-
// );
40-
// });
41-
const accountMenuToggle = await screen.findByTestId(
42-
"page-masthead-dropdown__button",
43-
);
44-
// await act(() => {
45-
// userEvent.click(accountMenuToggle);
46-
// });
47-
// await userEvent.click(accountMenuToggle);
48-
// "Logout" menu option should now be present
49-
// expect(await screen.findByText("Logout")).toBeInTheDocument();
50-
51-
// Emulate clicking on the logout button
52-
// const logoutMenuItem = await act(() => {
53-
// screen.findByTestId("app-header__logout");
54-
// });
55-
const logoutMenuItem = screen.findByTestId("app-header__logout");
56-
// await act(() => {
57-
// userEvent.click(logoutMenuItem);
58-
// });
59-
// await userEvent.click(logoutMenuItem);
60-
// expect(window.location.assign).toHaveBeenCalledWith("/logout");
6134
});
6235
});

0 commit comments

Comments
 (0)