Skip to content

chore: add e2e tests for organization members #15807

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 9 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
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
:|
  • Loading branch information
aslilac committed Dec 11, 2024
commit 85f72f8dd5c24cbac3bdf76efbabd531adc8a95f
13 changes: 11 additions & 2 deletions site/e2e/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type ChildProcess, exec, spawn } from "node:child_process";
import { randomUUID } from "node:crypto";
import * as fs from "node:fs";
import net from "node:net";
import path from "node:path";
import { Duplex } from "node:stream";
Expand Down Expand Up @@ -862,15 +863,15 @@ export const updateTemplate = async (
[
"run",
coderMain,
"-O",
organization,
"templates",
"push",
"--test.provisioner",
"echo",
"-y",
"-d",
"-",
"-O",
organization,
templateName,
],
{
Expand All @@ -882,7 +883,15 @@ export const updateTemplate = async (
},
);

child.stdout.on("data", (data) =>
console.log("::::", new TextDecoder().decode(data)),
);
child.stderr.on("data", (data) =>
console.log(";;;;", new TextDecoder().decode(data)),
);

const uploaded = new Awaiter();

child.on("exit", (code) => {
if (code === 0) {
uploaded.done();
Expand Down
4 changes: 2 additions & 2 deletions site/e2e/tests/workspaces/updateWorkspace.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test("update workspace, new optional, immutable parameter added", async ({
const updatedRichParameters = [...richParameters, fifthParameter];
await updateTemplate(
page,
"default",
"coder",
template,
echoResponsesWithParameters(updatedRichParameters),
);
Expand Down Expand Up @@ -80,7 +80,7 @@ test("update workspace, new required, mutable parameter added", async ({
const updatedRichParameters = [...richParameters, sixthParameter];
await updateTemplate(
page,
"default",
"coder",
template,
echoResponsesWithParameters(updatedRichParameters),
);
Expand Down
Loading