mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
Fix docs links (#3351)
This commit is contained in:
@@ -29,20 +29,6 @@ describe("UserDropdownContent", () => {
|
||||
expect(screen.getByText(MockAdminRole.display_name)).toBeDefined()
|
||||
})
|
||||
|
||||
it("has the correct link for the documentation item", () => {
|
||||
process.env.CODER_VERSION = "v0.5.4"
|
||||
render(<UserDropdownContent user={MockUser} onSignOut={jest.fn()} onPopoverClose={jest.fn()} />)
|
||||
|
||||
const link = screen.getByText(Language.docsLabel).closest("a")
|
||||
if (!link) {
|
||||
throw new Error("Anchor tag not found for the documentation menu item")
|
||||
}
|
||||
|
||||
expect(link.getAttribute("href")).toBe(
|
||||
`https://github.com/coder/coder/tree/${process.env.CODER_VERSION}/docs`,
|
||||
)
|
||||
})
|
||||
|
||||
it("has the correct link for the account item", () => {
|
||||
render(<UserDropdownContent user={MockUser} onSignOut={jest.fn()} onPopoverClose={jest.fn()} />)
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ export const UserDropdownContent: FC<UserDropdownContentProps> = ({
|
||||
<Divider />
|
||||
|
||||
<a
|
||||
href={`https://github.com/coder/coder/tree/${process.env.CODER_VERSION}/docs`}
|
||||
href="https://coder.com/docs/coder-oss"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className={styles.link}
|
||||
|
||||
Reference in New Issue
Block a user