@@ -59,8 +59,8 @@ describe('VariantManagement', () => {
59
59
cy . findAllByTitle ( 'Unselected as Favorite' ) . eq ( 0 ) . click ( ) ;
60
60
cy . findAllByPlaceholderText ( 'View' ) . eq ( 0 ) . shadow ( ) . find ( 'input' ) . type ( ' Updated!' , { force : true } ) ;
61
61
62
- cy . findAllByLabelText ( ' Use as standard view') . eq ( 0 ) . click ( ) ;
63
- cy . findAllByLabelText ( ' Apply Automatically') . eq ( 0 ) . click ( ) ;
62
+ cy . get ( '[accessible-name=" Use as standard view"] ') . eq ( 0 ) . click ( ) ;
63
+ cy . get ( '[accessible-name=" Apply Automatically"] ') . eq ( 0 ) . click ( ) ;
64
64
65
65
cy . findByText ( 'Save' ) . click ( ) ;
66
66
cy . get ( '@onSaveManageViews' ) . should ( 'have.been.calledOnce' ) ;
@@ -375,6 +375,14 @@ describe('VariantManagement', () => {
375
375
{ rowId : 'HideDelete - false & global - true' , props : { hideDelete : false , global : true } } ,
376
376
{ rowId : 'Global' , props : { global : true } } ,
377
377
{ rowId : 'Apply Automatically (List item)' , props : { applyAutomatically : true } } ,
378
+ {
379
+ rowId : 'Apply Automatically with text' ,
380
+ props : { applyAutomatically : true , applyAutomaticallyText : 'applyAutomaticallyText' }
381
+ } ,
382
+ {
383
+ rowId : 'Apply Automatically (false) with text' ,
384
+ props : { applyAutomatically : false , applyAutomaticallyText : 'applyAutomaticallyText' }
385
+ } ,
378
386
{ rowId : 'Author' , props : { author : 'author' } } ,
379
387
{
380
388
rowId : 'All props' ,
@@ -423,7 +431,16 @@ describe('VariantManagement', () => {
423
431
const manageViewsRowTest = ( variantItems , showOnlyFavorites ) => {
424
432
variantItems . forEach ( ( item ) => {
425
433
const { rowId, props } = item ;
426
- const { favorite, labelReadOnly, isDefault, hideDelete, global, applyAutomatically, author } = props ;
434
+ const {
435
+ favorite,
436
+ labelReadOnly,
437
+ isDefault,
438
+ hideDelete,
439
+ global,
440
+ applyAutomatically,
441
+ applyAutomaticallyText,
442
+ author
443
+ } = props ;
427
444
428
445
cy . get ( `ui5-table-row[data-id="${ rowId } "]` ) . as ( 'row' ) ;
429
446
if ( showOnlyFavorites ) {
@@ -481,6 +498,9 @@ describe('VariantManagement', () => {
481
498
} else {
482
499
cy . get ( '@row' ) . find ( '[ui5-checkbox]' ) . findShadowInput ( ) . should ( 'not.be.checked' ) ;
483
500
}
501
+ if ( applyAutomaticallyText ) {
502
+ cy . get ( '@row' ) . find ( '[ui5-checkbox]' ) . should ( 'have.attr' , 'text' , 'applyAutomaticallyText' ) ;
503
+ }
484
504
485
505
if ( author ) {
486
506
cy . get ( '@row' ) . findByText ( author ) . should ( 'be.visible' ) ;
@@ -498,7 +518,7 @@ describe('VariantManagement', () => {
498
518
cy . findByText ( 'Save' ) . click ( ) ;
499
519
cy . get ( '@saveView' ) . should ( 'have.been.calledOnce' ) ;
500
520
cy . findByText (
501
- '{"deletedVariants":[],"prevVariants":[{"children":"Default VariantItem"},{"labelReadOnly":true,"children":"LabelReadOnly"},{"favorite":true,"children":"Favorite"},{"favorite":true,"isDefault":true,"children":"Favorite & isDefault"},{"isDefault":true,"children":"IsDefault"},{"hideDelete":true,"children":"HideDelete"},{"hideDelete":false,"global":true,"children":"HideDelete - false & global - true"},{"global":true,"children":"Global"},{"applyAutomatically":true,"children":"Apply Automatically (List item)"},{"author":"author","children":"Author"},{"labelReadOnly":true,"favorite":true,"isDefault":true,"hideDelete":true,"global":true,"applyAutomatically":true,"author":"bla","children":"All props"}],"updatedVariants":[],"variants":[{"children":"Default VariantItem"},{"labelReadOnly":true,"children":"LabelReadOnly"},{"favorite":true,"children":"Favorite"},{"favorite":true,"isDefault":true,"children":"Favorite & isDefault"},{"isDefault":true,"children":"IsDefault"},{"hideDelete":true,"children":"HideDelete"},{"hideDelete":false,"global":true,"children":"HideDelete - false & global - true"},{"global":true,"children":"Global"},{"applyAutomatically":true,"children":"Apply Automatically (List item)"},{"author":"author","children":"Author"},{"labelReadOnly":true,"favorite":true,"isDefault":true,"hideDelete":true,"global":true,"applyAutomatically":true,"author":"bla","children":"All props"}]}'
521
+ '{"deletedVariants":[],"prevVariants":[{"children":"Default VariantItem"},{"labelReadOnly":true,"children":"LabelReadOnly"},{"favorite":true,"children":"Favorite"},{"favorite":true,"isDefault":true,"children":"Favorite & isDefault"},{"isDefault":true,"children":"IsDefault"},{"hideDelete":true,"children":"HideDelete"},{"hideDelete":false,"global":true,"children":"HideDelete - false & global - true"},{"global":true,"children":"Global"},{"applyAutomatically":true,"children":"Apply Automatically (List item)"},{"applyAutomatically":true,"applyAutomaticallyText":"applyAutomaticallyText","children":"Apply Automatically with text"},{"applyAutomatically":false,"applyAutomaticallyText":"applyAutomaticallyText","children":"Apply Automatically (false) with text"},{"author":"author","children":"Author"},{"labelReadOnly":true,"favorite":true,"isDefault":true,"hideDelete":true,"global":true,"applyAutomatically":true,"author":"bla","children":"All props"}],"updatedVariants":[],"variants":[{"children":"Default VariantItem"},{"labelReadOnly":true,"children":"LabelReadOnly"},{"favorite":true,"children":"Favorite"},{"favorite":true,"isDefault":true,"children":"Favorite & isDefault"},{"isDefault":true,"children":"IsDefault"},{"hideDelete":true,"children":"HideDelete"},{"hideDelete":false,"global":true,"children":"HideDelete - false & global - true"},{"global":true,"children":"Global"},{"applyAutomatically":true,"children":"Apply Automatically (List item)"},{"applyAutomatically":true,"applyAutomaticallyText":"applyAutomaticallyText","children":"Apply Automatically with text"},{"applyAutomatically":false,"applyAutomaticallyText":"applyAutomaticallyText","children":"Apply Automatically (false) with text"},{"author":"author","children":"Author"},{"labelReadOnly":true,"favorite":true,"isDefault":true,"hideDelete":true,"global":true,"applyAutomatically":true,"author":"bla","children":"All props"}]}'
502
522
) ;
503
523
504
524
cy . mount ( < TestComp onSaveManageViews = { onSaveView } showOnlyFavorites /> ) ;
@@ -509,7 +529,7 @@ describe('VariantManagement', () => {
509
529
cy . findByText ( 'Save' ) . click ( ) ;
510
530
cy . get ( '@saveView' ) . should ( 'have.been.calledTwice' ) ;
511
531
cy . findByText (
512
- '{"deletedVariants":[],"prevVariants":[{"children":"Default VariantItem"},{"labelReadOnly":true,"children":"LabelReadOnly"},{"favorite":true,"children":"Favorite"},{"favorite":true,"isDefault":true,"children":"Favorite & isDefault"},{"isDefault":true,"children":"IsDefault"},{"hideDelete":true,"children":"HideDelete"},{"hideDelete":false,"global":true,"children":"HideDelete - false & global - true"},{"global":true,"children":"Global"},{"applyAutomatically":true,"children":"Apply Automatically (List item)"},{"author":"author","children":"Author"},{"labelReadOnly":true,"favorite":true,"isDefault":true,"hideDelete":true,"global":true,"applyAutomatically":true,"author":"bla","children":"All props"}],"updatedVariants":[],"variants":[{"children":"Default VariantItem"},{"labelReadOnly":true,"children":"LabelReadOnly"},{"favorite":true,"children":"Favorite"},{"favorite":true,"isDefault":true,"children":"Favorite & isDefault"},{"isDefault":true,"children":"IsDefault"},{"hideDelete":true,"children":"HideDelete"},{"hideDelete":false,"global":true,"children":"HideDelete - false & global - true"},{"global":true,"children":"Global"},{"applyAutomatically":true,"children":"Apply Automatically (List item)"},{"author":"author","children":"Author"},{"labelReadOnly":true,"favorite":true,"isDefault":true,"hideDelete":true,"global":true,"applyAutomatically":true,"author":"bla","children":"All props"}]}'
532
+ '{"deletedVariants":[],"prevVariants":[{"children":"Default VariantItem"},{"labelReadOnly":true,"children":"LabelReadOnly"},{"favorite":true,"children":"Favorite"},{"favorite":true,"isDefault":true,"children":"Favorite & isDefault"},{"isDefault":true,"children":"IsDefault"},{"hideDelete":true,"children":"HideDelete"},{"hideDelete":false,"global":true,"children":"HideDelete - false & global - true"},{"global":true,"children":"Global"},{"applyAutomatically":true,"children":"Apply Automatically (List item)"},{"applyAutomatically":true,"applyAutomaticallyText":"applyAutomaticallyText","children":"Apply Automatically with text"},{"applyAutomatically":false,"applyAutomaticallyText":"applyAutomaticallyText","children":"Apply Automatically (false) with text"},{"author":"author","children":"Author"},{"labelReadOnly":true,"favorite":true,"isDefault":true,"hideDelete":true,"global":true,"applyAutomatically":true,"author":"bla","children":"All props"}],"updatedVariants":[],"variants":[{"children":"Default VariantItem"},{"labelReadOnly":true,"children":"LabelReadOnly"},{"favorite":true,"children":"Favorite"},{"favorite":true,"isDefault":true,"children":"Favorite & isDefault"},{"isDefault":true,"children":"IsDefault"},{"hideDelete":true,"children":"HideDelete"},{"hideDelete":false,"global":true,"children":"HideDelete - false & global - true"},{"global":true,"children":"Global"},{"applyAutomatically":true,"children":"Apply Automatically (List item)"},{"applyAutomatically":true,"applyAutomaticallyText":"applyAutomaticallyText","children":"Apply Automatically with text"},{"applyAutomatically":false,"applyAutomaticallyText":"applyAutomaticallyText","children":"Apply Automatically (false) with text"},{"author":"author","children":"Author"},{"labelReadOnly":true,"favorite":true,"isDefault":true,"hideDelete":true,"global":true,"applyAutomatically":true,"author":"bla","children":"All props"}]}'
513
533
) ;
514
534
} ) ;
515
535
0 commit comments