Skip to content

Commit

Permalink
FLUID-5700: Fetching text size template for panel test
Browse files Browse the repository at this point in the history
  • Loading branch information
maozillah committed Jul 8, 2015
1 parent 5e9413c commit bab2197
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/framework-tests/preferences/html/Panels-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ <h2><span class="fl-icon-contrast"></span><span class="flc-prefsEditor-contrast-
</div>

<div class="flc-textSize">
<ul class="fl-prefsEditor-topContainer fl-clearfix">
<!-- <ul class="fl-prefsEditor-topContainer fl-clearfix">
<li class="flc-prefsEditor-min-text-size">
<label for="min-text-size">Text Size</label>
<div class="fl-inputs">
Expand All @@ -84,7 +84,7 @@ <h2><span class="fl-icon-contrast"></span><span class="flc-prefsEditor-contrast-
</div>
</li>
</ul>
</ul> -->
</div>

<div class="flc-lineSpace">
Expand Down
8 changes: 7 additions & 1 deletion tests/framework-tests/preferences/js/PanelTestUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
fluid.registerNamespace("fluid.tests.panels.utils");

fluid.defaults("fluid.tests.panels.utils.defaultTestPanel", {
gradeNames: ["fluid.eventedComponent", "autoInit"],
listeners: {"onCreate.getTemplate": "fluid.tests.panels.utils.getTemplate"},
strings: {},
testMessages: {},
parentBundle: {
Expand All @@ -42,4 +42,10 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
jqUnit.assertEquals(message, expectedState, checkbox.is(":checked"));
};

fluid.tests.panels.utils.getTemplate = function (that) {
fluid.fetchResources(that.options.resources, function () {
// that.refreshView();
});
};

})();
7 changes: 7 additions & 0 deletions tests/framework-tests/preferences/js/PanelsTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1199,11 +1199,17 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
/*******************************************************************************
* textSize
*******************************************************************************/
fluid.tests.prefs.panel.templatePrefix = "../../../../src/framework/preferences/html/";

fluid.defaults("fluid.tests.prefs.panel.textSize", {
gradeNames: ["fluid.prefs.panel.textSize", "fluid.tests.panels.utils.defaultTestPanel", "autoInit"],
model: {
textSize: 1
},
resources: {
template: {
href: fluid.tests.prefs.panel.templatePrefix + "PrefsEditorTemplate-textSize.html"
}
}
});

Expand Down Expand Up @@ -1231,6 +1237,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
expect: 2,
name: "Test the rendering of the text size panel",
sequence: [{
//remove to prevent it being called twice
func: "{textSize}.refreshView"
}, {
listener: "fluid.tests.testDefault",
Expand Down

0 comments on commit bab2197

Please sign in to comment.