From aefc60e406ae1e9ad143fd3335c156de2010f03e Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 10 Mar 2011 10:29:49 +1300 Subject: [PATCH] MINOR Removed fixtures for TreeDropdownField, inlining them instead: loading files doesn't work with JSTestDriver --- .../TreeDropDownField/TreeDropdownField.js | 29 +++++++++++++++++-- .../TreeDropDownField/fixtures/fixture.html | 3 -- .../TreeDropDownField/fixtures/tree.html | 22 -------------- .../fixtures/tree.search.html | 10 ------- 4 files changed, 26 insertions(+), 38 deletions(-) delete mode 100644 tests/javascript/TreeDropDownField/fixtures/fixture.html delete mode 100644 tests/javascript/TreeDropDownField/fixtures/tree.html delete mode 100644 tests/javascript/TreeDropDownField/fixtures/tree.search.html diff --git a/tests/javascript/TreeDropDownField/TreeDropdownField.js b/tests/javascript/TreeDropDownField/TreeDropdownField.js index 26e1f5420..4790de32d 100644 --- a/tests/javascript/TreeDropDownField/TreeDropdownField.js +++ b/tests/javascript/TreeDropDownField/TreeDropdownField.js @@ -3,9 +3,32 @@ $.entwine.warningLevel = $.entwine.WARN_LEVEL_BESTPRACTISE; $.entwine.synchronous_mode(); + var fixtures = { + 'tree': '', + 'treesearch': '' + } + // helpers var loadTree = function(container, html) { - if(!html) html = readFixtures('fixtures/tree.html'); + if(!html) html = fixtures.tree; container.entwine('ss').loadTree(); var request = mostRecentAjaxRequest(); request.response({ @@ -50,7 +73,7 @@ request.response({ status: 200, contentType: 'text/html', - responseText: readFixtures('fixtures/tree.html') + responseText: fixtures.tree }); expect(panel).toContain('ul'); @@ -104,7 +127,7 @@ request.response({ status: 200, contentType: 'text/html', - responseText: readFixtures('fixtures/tree.search.html') + responseText: fixtures.treesearch }); expect(panel.text().match('Child node 1')).toBeTruthy(); diff --git a/tests/javascript/TreeDropDownField/fixtures/fixture.html b/tests/javascript/TreeDropDownField/fixtures/fixture.html deleted file mode 100644 index 6e3837679..000000000 --- a/tests/javascript/TreeDropDownField/fixtures/fixture.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/tests/javascript/TreeDropDownField/fixtures/tree.html b/tests/javascript/TreeDropDownField/fixtures/tree.html deleted file mode 100644 index 1b7e0b51a..000000000 --- a/tests/javascript/TreeDropDownField/fixtures/tree.html +++ /dev/null @@ -1,22 +0,0 @@ - \ No newline at end of file diff --git a/tests/javascript/TreeDropDownField/fixtures/tree.search.html b/tests/javascript/TreeDropDownField/fixtures/tree.search.html deleted file mode 100644 index b2443bec4..000000000 --- a/tests/javascript/TreeDropDownField/fixtures/tree.search.html +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file