Skip to content

test(site): e2e: create workspace with rich parameters #9185

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 15 commits into from
Aug 22, 2023
Next Next commit
WIP
  • Loading branch information
mtojek committed Aug 18, 2023
commit fc1ada037b5e7277fad9d6558a7112e7c30ccbb7
101 changes: 101 additions & 0 deletions site/e2e/tests/createWorkspace.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,104 @@ test("create workspace", async ({ page }) => {
})
await createWorkspace(page, template)
})

test("create workspace with default parameters", async ({ page }) => {
const template = await createTemplate(page, {
plan: [
{
complete: {
parameters: [
{
name: "first_parameter",
displayName: "First parameter",
type: "number",
options: [],
description: "This is first parameter.",
icon: "/emojis/1f310.png",
defaultValue: "123",
mutable: true,
required: false,
order: 1,
validationRegex: "",
validationError: "",
validationMonotonic: "",
},
{
name: "second_parameter",
displayName: "Second parameter",
type: "string",
options: [],
description: "This is second parameter.",
defaultValue: "abc",
icon: "",
mutable: false,
required: false,
order: 2,
validationRegex: "",
validationError: "",
validationMonotonic: "",
},
{
name: "third_parameter",
displayName: "",
type: "string",
options: [],
description: "This is third parameter.",
defaultValue: "",
icon: "",
mutable: false,
required: true,
order: 3,
validationRegex: "",
validationError: "",
validationMonotonic: "",
},
{
name: "fourth_parameter",
displayName: "",
type: "bool",
options: [],
description: "This is fourth parameter.",
defaultValue: "true",
icon: "",
mutable: false,
required: true,
order: 3,
validationRegex: "",
validationError: "",
validationMonotonic: "",
},
{
name: "first_build_option",
displayName: "First build option",
type: "bool",
options: [],
description: "This is first build option.",
defaultValue: "false",
icon: "",
mutable: true,
ephemeral: true,
required: false,
order: 1,
validationRegex: "",
validationError: "",
validationMonotonic: "",
}
],
},
},
],
apply: [
{
complete: {
resources: [
{
name: "example",
},
],
},
},
],
})
await createWorkspace(page, template)
})