@@ -5,7 +5,7 @@ import { loginAsTestUser } from "./helpers/auth";
55
66type ApiPlayer = components [ "schemas" ] [ "Player" ] ;
77type ApiRound = components [ "schemas" ] [ "Round" ] ;
8- type ApiFettMattis = components [ "schemas" ] [ "FettMattis " ] ;
8+ type ApiFettmattis = components [ "schemas" ] [ "Fettmattis " ] ;
99
1010const ASTRID = "Astrid Nygaard" ;
1111const EMIL = "Emil Kavli" ;
@@ -141,7 +141,7 @@ test("T037: user can toggle player activity from the roster", async ({
141141 ) . toBeVisible ( ) ;
142142} ) ;
143143
144- test ( "T037: leaderboard view surfaces regular and FettMattis standings" , async ( {
144+ test ( "T037: leaderboard view surfaces regular and Fettmattis standings" , async ( {
145145 page,
146146} ) => {
147147 await page . goto ( "/leaderboard" , { waitUntil : "domcontentloaded" } ) ;
@@ -163,18 +163,18 @@ test("T037: leaderboard view surfaces regular and FettMattis standings", async (
163163 regularTable . getByRole ( "row" , { name : new RegExp ( LINA , "i" ) } ) ,
164164 ) . toBeVisible ( ) ;
165165
166- const fettMattisTable = page . getByRole ( "table" ) . filter ( {
166+ const fettmattisTable = page . getByRole ( "table" ) . filter ( {
167167 has : page . getByRole ( "columnheader" , {
168- name : "FettMattis " ,
168+ name : "Fettmattis " ,
169169 exact : true ,
170170 } ) ,
171171 } ) ;
172- await expect ( fettMattisTable ) . toBeVisible ( ) ;
172+ await expect ( fettmattisTable ) . toBeVisible ( ) ;
173173 await expect (
174- fettMattisTable . getByRole ( "row" , { name : new RegExp ( ASTRID , "i" ) } ) ,
174+ fettmattisTable . getByRole ( "row" , { name : new RegExp ( ASTRID , "i" ) } ) ,
175175 ) . toBeVisible ( ) ;
176176 await expect (
177- fettMattisTable . getByRole ( "row" , { name : new RegExp ( LINA , "i" ) } ) ,
177+ fettmattisTable . getByRole ( "row" , { name : new RegExp ( LINA , "i" ) } ) ,
178178 ) . toBeVisible ( ) ;
179179} ) ;
180180
@@ -244,17 +244,17 @@ test("T193: rounds dashboard enforces 24-hour deletion window", async ({
244244 page . locator ( `button[aria-controls="round-details-${ latestRound . id } "]` ) ,
245245 ) . toHaveCount ( 0 ) ;
246246
247- const archivedFettMattisButton = page . locator (
247+ const archivedFettmattisButton = page . locator (
248248 'button[aria-controls="fettmattis-details-30000000-0000-4000-8000-000000000302"]' ,
249249 ) ;
250- await expect ( archivedFettMattisButton ) . toBeVisible ( ) ;
250+ await expect ( archivedFettmattisButton ) . toBeVisible ( ) ;
251251
252- const archivedFettMattisRow = page
252+ const archivedFettmattisRow = page
253253 . locator ( "tr" )
254- . filter ( { has : archivedFettMattisButton } )
254+ . filter ( { has : archivedFettmattisButton } )
255255 . first ( ) ;
256256 await expect (
257- archivedFettMattisRow . getByRole ( "button" , { name : "Slett" } ) ,
257+ archivedFettmattisRow . getByRole ( "button" , { name : "Slett" } ) ,
258258 ) . toHaveCount ( 0 ) ;
259259
260260 await page . getByLabel ( "Spiller" ) . selectOption ( { label : LINA } ) ;
@@ -263,48 +263,48 @@ test("T193: rounds dashboard enforces 24-hour deletion window", async ({
263263 page . getByText ( "Fettmattis tildelt. Klar for feiring!" ) ,
264264 ) . toBeVisible ( ) ;
265265
266- const fettMattisResponse = await page . request . get ( "/api/fettmattis?limit=1" ) ;
267- expect ( fettMattisResponse . ok ( ) ) . toBeTruthy ( ) ;
268- const [ latestFettMattis ] =
269- ( await fettMattisResponse . json ( ) ) as ApiFettMattis [ ] ;
270- if ( ! latestFettMattis ) {
266+ const fettmattisResponse = await page . request . get ( "/api/fettmattis?limit=1" ) ;
267+ expect ( fettmattisResponse . ok ( ) ) . toBeTruthy ( ) ;
268+ const [ latestFettmattis ] =
269+ ( await fettmattisResponse . json ( ) ) as ApiFettmattis [ ] ;
270+ if ( ! latestFettmattis ) {
271271 throw new Error ( "Latest Fettmattis entry was not returned after creation." ) ;
272272 }
273273
274- const latestFettMattisDetailsButton = page
274+ const latestFettmattisDetailsButton = page
275275 . locator (
276- `button[aria-controls="fettmattis-details-${ latestFettMattis . id } "]` ,
276+ `button[aria-controls="fettmattis-details-${ latestFettmattis . id } "]` ,
277277 )
278278 . first ( ) ;
279- const latestFettMattisRow = page
279+ const latestFettmattisRow = page
280280 . locator ( "tr" )
281- . filter ( { has : latestFettMattisDetailsButton } )
281+ . filter ( { has : latestFettmattisDetailsButton } )
282282 . first ( ) ;
283- await latestFettMattisDetailsButton . click ( ) ;
283+ await latestFettmattisDetailsButton . click ( ) ;
284284
285- const latestFettMattisDetails = page . locator (
286- `#fettmattis-details-${ latestFettMattis . id } ` ,
285+ const latestFettmattisDetails = page . locator (
286+ `#fettmattis-details-${ latestFettmattis . id } ` ,
287287 ) ;
288- await expect ( latestFettMattisDetails ) . toBeVisible ( ) ;
288+ await expect ( latestFettmattisDetails ) . toBeVisible ( ) ;
289289 await expect (
290- latestFettMattisDetails . getByText ( "Spillerstatus" ) ,
290+ latestFettmattisDetails . getByText ( "Spillerstatus" ) ,
291291 ) . toBeVisible ( ) ;
292292 await expect (
293- latestFettMattisDetails . getByText ( "Endringsvindu" ) ,
293+ latestFettmattisDetails . getByText ( "Endringsvindu" ) ,
294294 ) . toBeVisible ( ) ;
295295
296- const latestFettMattisDeleteButton = latestFettMattisRow . getByRole ( "button" , {
296+ const latestFettmattisDeleteButton = latestFettmattisRow . getByRole ( "button" , {
297297 name : "Slett" ,
298298 } ) ;
299- await expect ( latestFettMattisDeleteButton ) . toBeVisible ( ) ;
300- await latestFettMattisDeleteButton . click ( ) ;
299+ await expect ( latestFettmattisDeleteButton ) . toBeVisible ( ) ;
300+ await latestFettmattisDeleteButton . click ( ) ;
301301
302302 await expect (
303303 page . getByText ( "Fettmattis fjernet. Oversikten er oppdatert." ) ,
304304 ) . toBeVisible ( ) ;
305305 await expect (
306306 page . locator (
307- `button[aria-controls="fettmattis-details-${ latestFettMattis . id } "]` ,
307+ `button[aria-controls="fettmattis-details-${ latestFettmattis . id } "]` ,
308308 ) ,
309309 ) . toHaveCount ( 0 ) ;
310310} ) ;
0 commit comments