Fix docs links (#3351)

This commit is contained in:
Ammar Bandukwala
2022-08-02 01:22:14 -04:00
committed by GitHub
parent c1885dab27
commit bd785ddd87
3 changed files with 2 additions and 16 deletions
@@ -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}