Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
3 changes: 2 additions & 1 deletion docs/get-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ This section includes some of the quicker ways to install Coder. For more detail
Templates define what's in your development environment. The template builder
guides you through creating one without writing any Terraform.

1. Select **Templates** > **New Template**. The template builder opens.
1. Coder opens the template builder after initial setup.
To open it again later, select **Templates** > **New Template**.

1. Select the **Docker** base template from the list.

Expand Down
6 changes: 4 additions & 2 deletions site/e2e/setup/addUsersAndLicense.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ test("setup deployment", async ({ page }) => {
await page.getByLabel("Password").fill(users.owner.password);
await page.getByTestId("create").click();

await expectUrl(page).toHavePathName("/templates");
await page.getByTestId("button-select-template").isVisible();
await expectUrl(page).toHavePathName("/templates/new/builder");
await expect(
page.getByRole("heading", { name: "Create new template" }),
).toBeVisible();

for (const user of Object.values(users)) {
// Already created as first user
Expand Down
8 changes: 4 additions & 4 deletions site/src/pages/SetupPage/SetupPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe("Setup Page", () => {
await waitFor(() => screen.findByText("Password is too short"));
});

it("redirects to the app when setup is successful", async () => {
it("redirects to the template builder when setup is successful", async () => {
let userHasBeenCreated = false;

server.use(
Expand Down Expand Up @@ -110,16 +110,16 @@ describe("Setup Page", () => {
element: <SetupPage />,
},
{
path: "/templates",
element: <h1>Templates</h1>,
path: "/templates/new/builder",
element: <h1>Template Builder</h1>,
},
],
{ initialEntries: ["/setup"] },
),
);
await waitForLoaderToBeRemoved();
await fillForm();
await waitFor(() => screen.findByText("Templates"));
await waitFor(() => screen.findByText("Template Builder"));
});

it("calls sendBeacon with telemetry", async () => {
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/SetupPage/SetupPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const SetupPage: FC = () => {
// If the user is logged in, navigate to the app
if (isSignedIn) {
return setupRequired.current ? (
<Navigate to="/templates" replace />
<Navigate to="/templates/new/builder" replace />
Comment thread
jeremyruppel marked this conversation as resolved.
) : (
<Navigate to="/" state={{ isRedirect: true }} replace />
);
Expand Down
6 changes: 5 additions & 1 deletion site/src/pages/SetupPage/SetupPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ export const SetupPageView: FC<SetupPageViewProps> = ({
{authMethods?.github.enabled && (
<>
<Button className="w-full" asChild type="submit" size="lg">
<a href="/api/v2/users/oauth2/github/callback">
<a
href={`/api/v2/users/oauth2/github/callback?redirect=${encodeURIComponent(
"/templates/new/builder",
)}`}
>
<ExternalImage src="/icon/github.svg?blackWithColor" />
GitHub
</a>
Expand Down
Loading