Skip to content

Fix docs links #3351

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 1 commit into from
Aug 2, 2022
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
2 changes: 1 addition & 1 deletion coder.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description="Coder - Self-hosted developer workspaces on your infra"
Documentation=https://coder.com/docs/
Documentation=https://coder.com/docs/coder-oss
Requires=network-online.target
After=network-online.target
ConditionFileNotEmpty=/etc/coder.d/coder.env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()} />)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down