File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ describe("parser", () => {
67
67
68
68
"1" ,
69
69
"--verbose" ,
70
+ [ "--app-name" , "custom instance name" ] ,
71
+ [ "--welcome-text" , "welcome to code" ] ,
70
72
"2" ,
71
73
72
74
[ "--locale" , "ja" ] ,
@@ -123,6 +125,8 @@ describe("parser", () => {
123
125
socket : path . resolve ( "mumble" ) ,
124
126
"socket-mode" : "777" ,
125
127
verbose : true ,
128
+ "app-name" : "custom instance name" ,
129
+ "welcome-text" : "welcome to code" ,
126
130
version : true ,
127
131
"bind-addr" : "192.169.0.1:8080" ,
128
132
} )
Original file line number Diff line number Diff line change @@ -92,5 +92,27 @@ describe("login", () => {
92
92
93
93
expect ( htmlContent ) . toContain ( "Incorrect password" )
94
94
} )
95
+
96
+ it ( "should return correct app-name" , async ( ) => {
97
+ process . env . PASSWORD = previousEnvPassword
98
+ const appName = "testnäme"
99
+ const codeServer = await integration . setup ( [ `--app-name=${ appName } ` ] , "" )
100
+ const resp = await codeServer . fetch ( "/login" , { method : "GET" } )
101
+
102
+ const htmlContent = await resp . text ( )
103
+ expect ( resp . status ) . toBe ( 200 )
104
+ expect ( htmlContent ) . toContain ( appName )
105
+ } )
106
+
107
+ it ( "should return correct welcome text" , async ( ) => {
108
+ process . env . PASSWORD = previousEnvPassword
109
+ const welcomeText = "Welcome to your code workspace! öäü🔐"
110
+ const codeServer = await integration . setup ( [ `--welcome-text=${ welcomeText } ` ] , "" )
111
+ const resp = await codeServer . fetch ( "/login" , { method : "GET" } )
112
+
113
+ const htmlContent = await resp . text ( )
114
+ expect ( resp . status ) . toBe ( 200 )
115
+ expect ( htmlContent ) . toContain ( welcomeText )
116
+ } )
95
117
} )
96
118
} )
You can’t perform that action at this time.
0 commit comments