@@ -2,7 +2,6 @@ import { expect } from '@esm-bundle/chai';
22import { aTimeout , fixtureSync , nextFrame } from '@vaadin/testing-helpers' ;
33import { sendKeys } from '@web/test-runner-commands' ;
44import sinon from 'sinon' ;
5- import '@polymer/polymer/lib/elements/dom-bind.js' ;
65import '../vaadin-checkbox-group.js' ;
76
87describe ( 'vaadin-checkbox-group' , ( ) => {
@@ -564,70 +563,6 @@ describe('vaadin-checkbox-group', () => {
564563 } ) ;
565564 } ) ;
566565
567- describe ( 'array mutation methods' , ( ) => {
568- let bind ;
569-
570- beforeEach ( async ( ) => {
571- group = fixtureSync ( `
572- <dom-bind>
573- <template>
574- <vaadin-checkbox-group id="group" value="{{value}}">
575- <vaadin-checkbox value="a" label="Checkbox A"></vaadin-checkbox>
576- <vaadin-checkbox value="b" label="Checkbox B"></vaadin-checkbox>
577- <vaadin-checkbox value="c" label="Checkbox C"></vaadin-checkbox>
578- </vaadin-checkbox-group>
579- </template>
580- </template>
581- </dom-bind>
582- ` ) ;
583- bind = document . querySelector ( 'dom-bind' ) ;
584- checkboxes = group . querySelectorAll ( 'vaadin-checkbox' ) ;
585- await nextFrame ( ) ;
586- } ) ;
587-
588- it ( 'should notify the value changes from inside' , ( ) => {
589- expect ( bind . value ) . to . be . instanceOf ( Array ) ;
590- expect ( bind . value . length ) . to . equal ( 0 ) ;
591- checkboxes [ 0 ] . checked = true ;
592- expect ( bind . value . length ) . to . equal ( 1 ) ;
593- expect ( bind . value [ 0 ] ) . to . equal ( 'a' ) ;
594- } ) ;
595-
596- it ( 'should update checkboxes when a checkbox value is updated using push' , ( ) => {
597- bind . push ( 'value' , 'a' ) ;
598- expect ( checkboxes [ 0 ] . checked ) . to . be . true ;
599- } ) ;
600-
601- it ( 'should update checkboxes when a checkbox value is updated using pop' , ( ) => {
602- bind . value = [ 'a' , 'b' ] ;
603- bind . pop ( 'value' ) ;
604- expect ( checkboxes [ 0 ] . checked ) . to . be . true ;
605- expect ( checkboxes [ 1 ] . checked ) . to . be . false ;
606- } ) ;
607-
608- it ( 'should update checkboxes when a checkbox value is updated using push' , ( ) => {
609- bind . value = [ 'b' ] ;
610- bind . unshift ( 'value' , 'a' ) ;
611- expect ( checkboxes [ 1 ] . checked ) . to . be . true ;
612- expect ( checkboxes [ 0 ] . checked ) . to . be . true ;
613- } ) ;
614-
615- it ( 'should update checkboxes when a checkbox value is updated using unshift' , ( ) => {
616- bind . value = [ 'a' , 'b' ] ;
617- bind . shift ( 'value' ) ;
618- expect ( checkboxes [ 0 ] . checked ) . to . be . false ;
619- expect ( checkboxes [ 1 ] . checked ) . to . be . true ;
620- } ) ;
621-
622- it ( 'should update checkboxes when a checkbox value is updated using splice' , ( ) => {
623- bind . value = [ 'a' , 'b' ] ;
624- bind . splice ( 'value' , 1 , 1 , 'c' ) ;
625- expect ( checkboxes [ 0 ] . checked ) . to . be . true ;
626- expect ( checkboxes [ 1 ] . checked ) . to . be . false ;
627- expect ( checkboxes [ 2 ] . checked ) . to . be . true ;
628- } ) ;
629- } ) ;
630-
631566 describe ( 'wrapping' , ( ) => {
632567 beforeEach ( async ( ) => {
633568 group = fixtureSync ( `
0 commit comments