@@ -166,18 +166,8 @@ test.describe("1.1.2 User Accounts - CREATE Register", () => {
166166 await expect ( anyValidationMessage . first ( ) ) . toBeVisible ( ) ;
167167 } ) ;
168168
169+ //createtests as username
169170 test ( "C Server error on register (simulated)" , async ( { page } ) => {
170- await page . route ( "**/useraccount/register" , async ( route ) => {
171- const req = route . request ( ) ;
172- if ( req . method ( ) !== "POST" ) return route . fallback ( ) ;
173-
174- return route . fulfill ( {
175- status : 500 ,
176- body : JSON . stringify ( { message : "Internal Server Error" } ) ,
177- headers : { "Content-Type" : "application/json" } ,
178- } ) ;
179- } ) ;
180-
181171 const {
182172 institutionSelect,
183173 username,
@@ -191,19 +181,18 @@ test.describe("1.1.2 User Accounts - CREATE Register", () => {
191181 successAlert,
192182 errorAlert,
193183 } = await setupRegisterPage ( page ) ;
184+ const uname = "createtests" ;
194185
195186 await selectVuetifyOptionByName ( page , institutionSelect , "ETH Zürich" ) ;
196187
197- const uname = `playwright-error-${ Date . now ( ) } ` ;
198188 await username . fill ( uname ) ;
199- await name . fill ( "Server " ) ;
200- await surname . fill ( "Error " ) ;
201- await email . fill ( `error+ ${ Date . now ( ) } @example.com` ) ;
189+ await name . fill ( "Andrei " ) ;
190+ await surname . fill ( "Mititelu " ) ;
191+ await email . fill ( `${ uname } @example.com` ) ;
202192
203193 await selectVuetifyFirstOption ( page , timezoneSelect ) ;
204-
205- await password . fill ( "ValidPass123!" ) ;
206- await confirmPassword . fill ( "ValidPass123!" ) ;
194+ await password . fill ( "StrongPass123!" ) ;
195+ await confirmPassword . fill ( "StrongPass123!" ) ;
207196
208197 await submitButton . click ( ) ;
209198
0 commit comments