@@ -1187,8 +1187,6 @@ export class DataSources {
11871187
11881188ToggleUsePreparedStatement ( enable = true || false ) {
11891189this . pluginActionForm . toolbar . toggleSettings ( ) ;
1190-
1191- // Determine current checkbox state before toggling to avoid unnecessary actions
11921190this . agHelper
11931191. GetElement ( this . _usePreparedStatement )
11941192. then ( ( $checkbox ) => $checkbox . is ( ":checked" ) )
@@ -1200,29 +1198,20 @@ export class DataSources {
12001198return ;
12011199}
12021200
1203- // If already disabled, no modal will appear, so short-circuit here
12041201if ( ! isCurrentlyEnabled ) {
12051202return ;
12061203}
12071204
1208- // When disabling, a confirmation modal will appear
1209- // Break up the chain to avoid DOM detachment issues when modal appears
12101205this . agHelper . GetElement ( this . _usePreparedStatement ) . uncheck ( {
12111206force :true ,
12121207} ) ;
1213-
1214- // Small wait for modal to appear
12151208this . agHelper . Sleep ( 200 ) ;
1216-
1217- // Wait for and confirm the security warning modal
12181209this . agHelper . AssertElementVisibility (
12191210"[data-testid='t--disable-prepared-statement-confirm-button']" ,
12201211) ;
12211212this . agHelper . GetNClick (
12221213"[data-testid='t--disable-prepared-statement-confirm-button']" ,
12231214) ;
1224-
1225- // Wait for modal to close and state to update
12261215this . agHelper . Sleep ( 200 ) ;
12271216} ) ;
12281217}