Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
added test for #821
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnR committed Oct 1, 2021
1 parent 449fe15 commit ce3064f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/spec/itemset.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,4 +581,18 @@ describe( 'Itemset functionality', () => {

} );

describe( 'forms using randomize() for itemsets', () => {
it( 'displays randomized select-minimal options ', () => {
const form = loadForm( 'randomize.xml' );
form.init();

const options = [ ...form.view.html.querySelectorAll( 'select > option' ) ]
.map( option => option.value )
.filter( val => val ); // just in case future lists don't contain an empty option

// This test has a 1/270 chance of failing, I believe.
expect( options ).to.not.eql( [ 'banana', 'beans', 'cacao', 'coffee', 'foddergrass', 'foddertree' ] );
} );
} );

} );

0 comments on commit ce3064f

Please sign in to comment.