@@ -17,3 +17,104 @@ test("create workspace", async ({ page }) => {
17
17
} )
18
18
await createWorkspace ( page , template )
19
19
} )
20
+
21
+ test ( "create workspace with default parameters" , async ( { page } ) => {
22
+ const template = await createTemplate ( page , {
23
+ plan : [
24
+ {
25
+ complete : {
26
+ parameters : [
27
+ {
28
+ name : "first_parameter" ,
29
+ displayName : "First parameter" ,
30
+ type : "number" ,
31
+ options : [ ] ,
32
+ description : "This is first parameter." ,
33
+ icon : "/emojis/1f310.png" ,
34
+ defaultValue : "123" ,
35
+ mutable : true ,
36
+ required : false ,
37
+ order : 1 ,
38
+ validationRegex : "" ,
39
+ validationError : "" ,
40
+ validationMonotonic : "" ,
41
+ } ,
42
+ {
43
+ name : "second_parameter" ,
44
+ displayName : "Second parameter" ,
45
+ type : "string" ,
46
+ options : [ ] ,
47
+ description : "This is second parameter." ,
48
+ defaultValue : "abc" ,
49
+ icon : "" ,
50
+ mutable : false ,
51
+ required : false ,
52
+ order : 2 ,
53
+ validationRegex : "" ,
54
+ validationError : "" ,
55
+ validationMonotonic : "" ,
56
+ } ,
57
+ {
58
+ name : "third_parameter" ,
59
+ displayName : "" ,
60
+ type : "string" ,
61
+ options : [ ] ,
62
+ description : "This is third parameter." ,
63
+ defaultValue : "" ,
64
+ icon : "" ,
65
+ mutable : false ,
66
+ required : true ,
67
+ order : 3 ,
68
+ validationRegex : "" ,
69
+ validationError : "" ,
70
+ validationMonotonic : "" ,
71
+ } ,
72
+ {
73
+ name : "fourth_parameter" ,
74
+ displayName : "" ,
75
+ type : "bool" ,
76
+ options : [ ] ,
77
+ description : "This is fourth parameter." ,
78
+ defaultValue : "true" ,
79
+ icon : "" ,
80
+ mutable : false ,
81
+ required : true ,
82
+ order : 3 ,
83
+ validationRegex : "" ,
84
+ validationError : "" ,
85
+ validationMonotonic : "" ,
86
+ } ,
87
+ {
88
+ name : "first_build_option" ,
89
+ displayName : "First build option" ,
90
+ type : "bool" ,
91
+ options : [ ] ,
92
+ description : "This is first build option." ,
93
+ defaultValue : "false" ,
94
+ icon : "" ,
95
+ mutable : true ,
96
+ ephemeral : true ,
97
+ required : false ,
98
+ order : 1 ,
99
+ validationRegex : "" ,
100
+ validationError : "" ,
101
+ validationMonotonic : "" ,
102
+ }
103
+ ] ,
104
+ } ,
105
+ } ,
106
+ ] ,
107
+ apply : [
108
+ {
109
+ complete : {
110
+ resources : [
111
+ {
112
+ name : "example" ,
113
+ } ,
114
+ ] ,
115
+ } ,
116
+ } ,
117
+ ] ,
118
+ } )
119
+ await createWorkspace ( page , template )
120
+ } )
0 commit comments