@@ -326,6 +326,35 @@ describe('Cluster Manager', { testIsolation: 'off', tags: ['@manager', '@adminUs
326326 expect ( obj . kind ) . to . equal ( 'Cluster' ) ;
327327 } ) ;
328328 } ) ;
329+ it ( 'preserves custom addon config values after saving cluster config' , ( ) => {
330+ const customAddonConfig = `goodvalue: yay\nnested:\n enabled: true` ;
331+ const updatedDescription = `${ rke2CustomName } -addon-persist-check` ;
332+
333+ clusterList . goTo ( ) ;
334+ clusterList . list ( ) . actionMenu ( rke2CustomName ) . getMenuItem ( 'Edit Config' ) . click ( ) ;
335+
336+ editCreatedClusterPage ( ) . waitForPage ( 'mode=edit' , 'basic' ) ;
337+ editCreatedClusterPage ( ) . clusterConfigurationTabs ( ) . clickTabWithSelector ( '#rke2-calico' ) ;
338+ editCreatedClusterPage ( ) . calicoAddonConfig ( ) . yamlEditor ( ) . input ( )
339+ . set ( customAddonConfig ) ;
340+ editCreatedClusterPage ( ) . save ( ) ;
341+
342+ clusterList . waitForPage ( ) ;
343+ clusterList . list ( ) . actionMenu ( rke2CustomName ) . getMenuItem ( 'Edit Config' ) . click ( ) ;
344+
345+ editCreatedClusterPage ( ) . waitForPage ( 'mode=edit' , 'basic' ) ;
346+ editCreatedClusterPage ( ) . nameNsDescription ( ) . description ( ) . set ( updatedDescription ) ;
347+ editCreatedClusterPage ( ) . save ( ) ;
348+
349+ clusterList . waitForPage ( ) ;
350+ clusterList . list ( ) . actionMenu ( rke2CustomName ) . getMenuItem ( 'Edit Config' ) . click ( ) ;
351+
352+ editCreatedClusterPage ( ) . waitForPage ( 'mode=edit' , 'basic' ) ;
353+ editCreatedClusterPage ( ) . clusterConfigurationTabs ( ) . clickTabWithSelector ( '#rke2-calico' ) ;
354+ editCreatedClusterPage ( ) . calicoAddonConfig ( ) . yamlEditor ( ) . input ( )
355+ . value ( )
356+ . should ( 'equal' , customAddonConfig ) ;
357+ } ) ;
329358
330359 it ( 'can delete cluster' , ( ) => {
331360 clusterList . goTo ( ) ;
0 commit comments