8000 feat: Enable custom support links by mtojek · Pull Request #6313 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: Enable custom support links #6313

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

Merged
merged 13 commits into from
Feb 27, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix
  • Loading branch information
mtojek committed Feb 24, 2023
commit 9be1f98881b34a4c6eac736081f2fa0fe3f90cd6
7 changes: 5 additions & 2 deletions site/src/components/UserDropdown/UserDropdown.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fireEvent, screen } from "@testing-library/react"
import { MockUser } from "../../testHelpers/entities"
import { MockSupportLinks, MockUser } from "../../testHelpers/entities"
import { render } from "../../testHelpers/renderHelpers"
import { Language } from "../UserDropdownContent/UserDropdownContent"
import { UserDropdown, UserDropdownProps } from "./UsersDropdown"
Expand All @@ -8,6 +8,7 @@ const renderAndClick = async (props: Partial<UserDropdownProps> = {}) => {
render(
<UserDropdown
user={props.user ?? MockUser}
supportLinks={MockSupportLinks}
onSignOut={props.onSignOut ?? jest.fn()}
/>,
)
Expand All @@ -20,7 +21,9 @@ describe("UserDropdown", () => {
it("opens the menu", async () => {
await renderAndClick()
expect(screen.getByText(Language.accountLabel)).toBeDefined()
expect(screen.getByText(Language.docsLabel)).toBeDefined()
expect(screen.getByText(MockSupportLinks[0].name)).toBeDefined()
expect(screen.getByText(MockSupportLinks[1].name)).toBeDefined()
expect(screen.getByText(MockSupportLinks[2].name)).toBeDefined()
expect(screen.getByText(Language.signOutLabel)).toBeDefined()
})
})
Expand Down
0