File tree 2 files changed +39
-0
lines changed
src/pages/DeploySettingsPage/AppearanceSettingsPage
2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { chromium , expect , test } from "@playwright/test" ;
2
+ import { randomName , requiresEnterpriseLicense } from "../../helpers" ;
3
+
4
+ test ( "set application name" , async ( { page } ) => {
5
+ requiresEnterpriseLicense ( ) ;
6
+
7
+ await page . goto ( "/deployment/appearance" , { waitUntil : "domcontentloaded" } ) ;
8
+
9
+ const applicationName = randomName ( ) ;
10
+
11
+ // Fill out the form
12
+ const form = page . locator ( "form" , { hasText : "Application name" } )
13
+ await form . getByLabel ( "Application name" , { exact : true } ) . fill ( applicationName ) ;
14
+ await form . getByRole ( "button" , { name : "Submit" } ) . click ( ) ;
15
+
16
+ // Open a new session without cookies to see the login page
17
+ const browser = await chromium . launch ( )
18
+ const incognitoContext = await browser . newContext ( )
19
+ await incognitoContext . clearCookies ( )
20
+ const incognitoPage = await incognitoContext . newPage ( )
21
+ await incognitoPage . goto ( "/" , { waitUntil : "domcontentloaded" } ) ;
22
+
23
+ const banner = incognitoPage . locator ( "h1" , { hasText : applicationName } )
24
+ await expect ( banner ) . toBeVisible ( )
25
+
26
+ // Shut down browser
27
+ await incognitoPage . close ( )
28
+ await browser . close ( )
29
+ } ) ;
Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ export const AppearanceSettingsPageView: FC<
105
105
fullWidth
106
106
placeholder = 'Leave empty to display "Coder".'
107
107
disabled = { ! isEntitled }
108
+ inputProps = { {
109
+ "aria-label" : "Application name" ,
110
+ } }
108
111
/>
109
112
</ Fieldset >
110
113
@@ -150,6 +153,9 @@ export const AppearanceSettingsPageView: FC<
150
153
</ InputAdornment >
151
154
) ,
152
155
} }
156
+ inputProps = { {
157
+ "aria-label" : "Logo URL" ,
158
+ } }
153
159
/>
154
160
</ Fieldset >
155
161
@@ -208,6 +214,7 @@ export const AppearanceSettingsPageView: FC<
208
214
) ;
209
215
await serviceBannerForm . setFieldValue ( "enabled" , newState ) ;
210
216
} }
217
+ data-testid = "switch-service-banner"
211
218
/>
212
219
}
213
220
label = "Enabled"
@@ -221,6 +228,9 @@ export const AppearanceSettingsPageView: FC<
221
228
fullWidth
222
229
label = "Message"
223
230
multiline
231
+ inputProps = { {
232
+ "aria-label" : "Message" ,
233
+ } }
224
234
/>
225
235
</ Stack >
226
236
You can’t perform that action at this time.
0 commit comments