From 6fcfb7c04d32e1c8b26a312295bf7ac3ec2d2ad7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 13 Jul 2018 19:06:45 +0200 Subject: Fixed many permissions and began admin interface --- .../select2/tests/options/width-tests.js | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 public/bower_components/select2/tests/options/width-tests.js (limited to 'public/bower_components/select2/tests/options/width-tests.js') diff --git a/public/bower_components/select2/tests/options/width-tests.js b/public/bower_components/select2/tests/options/width-tests.js new file mode 100644 index 0000000..e724034 --- /dev/null +++ b/public/bower_components/select2/tests/options/width-tests.js @@ -0,0 +1,66 @@ +module('Options - Width'); + +var $ = require('jquery'); + +var Select2 = require('select2/core'); +var select = new Select2($('')); + +test('string passed as width', function (assert) { + var $test = $(''); + + var width = select._resolveWidth($test, '80%'); + + assert.equal(width, '80%'); +}); + +test('width from style attribute', function (assert) { + var $test = $(''); + + var width = select._resolveWidth($test, 'style'); + + assert.equal(width, null); +}); + +test('width from computed element width', function (assert) { + var $style = $( + '' + ); + var $test = $(''); + + $('#qunit-fixture').append($style); + $('#qunit-fixture').append($test); + + var width = select._resolveWidth($test, 'element'); + + assert.equal(width, '500px'); +}); + +test('resolve gets the style if it is there', function (assert) { + var $test = $(''); + + $('#qunit-fixture').append($style); + $('#qunit-fixture').append($test); + + var width = select._resolveWidth($test, 'resolve'); + + assert.equal(width, '500px'); +}); -- cgit v1.2.3