diff --git a/resources/static/dialog/views/test_template_with_partial.ejs b/resources/static/dialog/views/test_template_with_partial.ejs new file mode 100644 index 0000000000000000000000000000000000000000..11c1a6c41043aef2d0a499fa90039be1a26e5a2a --- /dev/null +++ b/resources/static/dialog/views/test_template_with_partial.ejs @@ -0,0 +1,6 @@ +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<%- partial('test_template_no_input') %> + diff --git a/resources/static/test/cases/common/js/renderer.js b/resources/static/test/cases/common/js/renderer.js index 2c3b8f116e19dfcd174b7a7d4e88bcf89dbac0bb..9932204f591187321024754c7407f42a546072dc 100644 --- a/resources/static/test/cases/common/js/renderer.js +++ b/resources/static/test/cases/common/js/renderer.js @@ -20,12 +20,6 @@ } }); - test("render template loaded using XHR", function() { - renderer.render("#formWrap .contents", "test_template_with_input"); - - ok($("#templateInput").length, "template written when loaded using XHR"); - }); - test("render template from memory", function() { renderer.render("#formWrap .contents", "inMemoryTemplate"); @@ -39,6 +33,14 @@ }); + test("render template with partial", function() { + equal($("#focusButton").length, 0, "template not yet loaded"); + + renderer.render("#formWrap .contents", "test_template_with_partial"); + + ok($("#focusButton").length, "template loaded with partial"); + }); + }());