Passed
Push — master ( e298e7...38f0a8 )
by Rafael
01:23
created

control_test.js ➔ ... ➔ it(ꞌCreates HTMLꞌ)   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
dl 0
loc 3
rs 10
nop 0
1
import { DeviceVisibility } from '../../../controls';
2
3
describe( 'Responsive Utility', function() {
4
	let $target = $( '<div class="hidden-sm">' ),
5
		control = new DeviceVisibility( { target: $target } ),
6
		$control = control.render();
7
8
	it( 'Creates HTML', function() {
9
		expect( !! $control.html().length ).toEqual( true );
10
	} );
11
12
	it( 'Sets Default', function() {
13
		expect( $control.find( '.checkboxes input[name="tablet-visibility"]:checked' ).length ).toEqual( 1 );
14
	} );
15
	it( 'Prevents all hidden', function() {
16
		$control.find( '.checkboxes input' ).prop( 'checked', true ).change();
17
		expect( $control.find( '.checkboxes input:checked' ).length ).toEqual( 3 );
18
	} );
19
} );
20