From e0addf5b588a1244f9679becd90999dfcb4c3a94 Mon Sep 17 00:00:00 2001 From: "ITSERVICES\\rb7147" Date: Tue, 25 Apr 2017 11:46:00 -0400 Subject: Policy 1707 commit to LF Change-Id: Ibe6f01d92f9a434c040abb05d5386e89d675ae65 Signed-off-by: ITSERVICES\rb7147 --- .../policyApp/CSS/bootstrap/js/tests/unit/modal.js | 405 +++++++++++++++++++++ 1 file changed, 405 insertions(+) create mode 100644 POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/js/tests/unit/modal.js (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/js/tests/unit/modal.js') diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/js/tests/unit/modal.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/js/tests/unit/modal.js new file mode 100644 index 000000000..c6e747a3c --- /dev/null +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/js/tests/unit/modal.js @@ -0,0 +1,405 @@ +$(function () { + 'use strict'; + + QUnit.module('modal plugin') + + QUnit.test('should be defined on jquery object', function (assert) { + assert.expect(1) + assert.ok($(document.body).modal, 'modal method is defined') + }) + + QUnit.module('modal', { + beforeEach: function () { + // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode + $.fn.bootstrapModal = $.fn.modal.noConflict() + }, + afterEach: function () { + $.fn.modal = $.fn.bootstrapModal + delete $.fn.bootstrapModal + } + }) + + QUnit.test('should provide no conflict', function (assert) { + assert.expect(1) + assert.strictEqual($.fn.modal, undefined, 'modal was set back to undefined (orig value)') + }) + + QUnit.test('should return jquery collection containing the element', function (assert) { + assert.expect(2) + var $el = $('