@@ -1438,41 +1438,13 @@ describe("Day Picker Tests", () => {
14381438} ) ;
14391439
14401440describe ( "Calendar Global Configuration" , ( ) => {
1441- beforeEach ( ( ) => {
1442- // Reload the page to ensure completely clean state
1443- cy . reload ( ) ;
1444-
1445- // Clean up any existing configuration scripts first
1446- cy . window ( ) . then ( $el => {
1447- const existingScripts = $el . document . head . querySelectorAll ( "script[data-ui5-config]" ) ;
1448- existingScripts . forEach ( script => script . remove ( ) ) ;
1449- } ) ;
1450-
1451- // Reset configuration to ensure clean state
1452- cy . wrap ( { resetConfiguration } )
1453- . invoke ( "resetConfiguration" , true ) ;
1454- } ) ;
1455-
1456- afterEach ( ( ) => {
1457- // Clean up configuration scripts
1458- cy . window ( ) . then ( $el => {
1459- const scriptElements = $el . document . head . querySelectorAll ( "script[data-ui5-config]" ) ;
1460- scriptElements . forEach ( script => script . remove ( ) ) ;
1461- } ) ;
1462-
1463- // Reset configuration to default state
1464- cy . wrap ( { resetConfiguration } )
1465- . invoke ( "resetConfiguration" , true ) ;
1466- } ) ;
1467-
14681441 it ( "Should respect firstDayOfWeek from global formatSettings configuration" , ( ) => {
14691442 const configurationObject = {
14701443 "formatSettings" : {
14711444 "firstDayOfWeek" : 6 // Saturday
14721445 }
14731446 } ;
14741447
1475- // Set up configuration script
14761448 cy . window ( )
14771449 . then ( $el => {
14781450 const scriptElement = $el . document . createElement ( "script" ) ;
@@ -1482,21 +1454,16 @@ describe("Calendar Global Configuration", () => {
14821454 $el . document . head . appendChild ( scriptElement ) ;
14831455 } ) ;
14841456
1485- // Reset configuration to trigger parsing of the new script
14861457 cy . wrap ( { resetConfiguration } )
14871458 . invoke ( "resetConfiguration" , true ) ;
14881459
1489- // Verify configuration is applied
14901460 cy . wrap ( { getFirstDayOfWeek } )
14911461 . invoke ( "getFirstDayOfWeek" )
14921462 . should ( "equal" , 6 ) ;
14931463
1494- // Mount a calendar with calendarWeekNumbering="Default"
1495- // so it uses the global configuration
14961464 const date = new Date ( Date . UTC ( 2023 , 0 , 1 , 0 , 0 , 0 ) ) ; // January 1, 2023
14971465 cy . mount ( < Calendar id = "calendar1" timestamp = { date . valueOf ( ) / 1000 } calendarWeekNumbering = "Default" /> ) ;
14981466
1499- // Verify that Saturday (Sat) is now the first day of the week
15001467 cy . get < Calendar > ( "#calendar1" )
15011468 . shadow ( )
15021469 . find ( "[ui5-daypicker]" )
0 commit comments