Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAP-36512: FIx Admin portal tests fallout due to PF5 and latest Ansible-UI-framework #1475

Merged
merged 4 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions ansible_ai_connect_admin_portal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions ansible_ai_connect_admin_portal/src/__tests__/AppHeader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { render, screen } from "@testing-library/react";
import "@testing-library/jest-dom";
import { AppHeader } from "../AppHeader";
import { BrowserRouter } from "react-router-dom";
import userEvent from "@testing-library/user-event";

describe("AppHeader", () => {
// Store the original 'location' object so that it can be restored for other tests.
Expand Down Expand Up @@ -33,5 +34,16 @@ describe("AppHeader", () => {

// Check "Logout" option is not present
expect(screen.queryByText("Logout")).toBeNull();

// Emulate click on menu button
await userEvent.click(accountMenu);

// "Logout" menu option should now be present
const logoutMenuButton = await screen.findByText("Logout");
expect(logoutMenuButton).toBeInTheDocument();

// Emulate clicking on the logout button
await userEvent.click(logoutMenuButton);
expect(window.location.assign).toBeCalledWith("/logout");
});
});
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ipython==8.10.0
# remove this once django-oauth-toolkit is updated to properly
# pull a version of jwcrypto >= 1.5.6.
jwcrypto==1.5.6
# pin jinja2 on 3.1.5 to address GHSA-h75v-3vvj-5mfj,
# pin jinja2 on 3.1.5 to address GHSA-h75v-3vvj-5mfj,
# CVE-2024-56326, CVE-2024-56201
# remove this once ansible-core or torch are updated
jinja2==3.1.5
Expand Down
Loading