11import { importLocale } from '@node-core/website-i18n' ;
22import type { Locale } from '@node-core/website-i18n/types' ;
3- import { test , expect , type Page } from '@playwright/test' ;
3+ import { test , expect } from '@playwright/test' ;
4+ import type { Page } from '@playwright/test' ;
45
56const englishLocale = await importLocale ( 'en' ) ;
67
@@ -14,7 +15,7 @@ const locators = {
1415 // Global UI controls
1516 languageDropdownName : englishLocale . components . common . languageDropdown . label ,
1617 // default light theme
17- themeToggleName : englishLocale . components . common . themeToggle . label . light ,
18+ themeToggleName : englishLocale . components . common . themeToggle . light ,
1819
1920 // Search components (from Orama library)
2021 searchButtonTag : 'orama-button' ,
@@ -75,7 +76,7 @@ test.describe('Node.js Website', () => {
7576 const initialTheme = await getTheme ( page ) ;
7677 const initialAriaLabel = await themeToggle . getAttribute ( 'aria-label' ) ;
7778 expect ( initialAriaLabel ) . toBe (
78- englishLocale . components . common . themeToggle . label [ initialTheme ]
79+ englishLocale . components . common . themeToggle [ initialTheme ]
7980 ) ;
8081
8182 await themeToggle . click ( ) ;
@@ -87,7 +88,7 @@ test.describe('Node.js Website', () => {
8788 expect ( [ 'light' , 'dark' ] ) . toContain ( newTheme ) ;
8889
8990 expect ( newAriaLabel ) . toBe (
90- englishLocale . components . common . themeToggle . label [ newTheme ]
91+ englishLocale . components . common . themeToggle [ newTheme ]
9192 ) ;
9293 } ) ;
9394
0 commit comments