Skip to content

Commit

Permalink
FLUID-4317: more fix on ui enhancer unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyli committed Jul 22, 2011
1 parent cdb81f2 commit 03b6035
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/webapp/tests/component-tests/uiOptions/js/UIEnhancerTests.js
Expand Up @@ -18,18 +18,18 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt

(function ($) {
$(document).ready(function () {
fluid.staticEnvironment.uiEnhancerTests = fluid.typeTag("fluid.uiOptions.uiEnhancerTests");

var testSettings = {
textSize: "1.5",
textFont: "verdana",
theme: "bw",
layout: false
};

var options = {
settingsStore: {
type: "fluid.uiEnhancer.tempStore"
}
};
fluid.demands("fluid.uiOptions.store", ["fluid.uiEnhancer", "fluid.uiOptions.uiEnhancerTests"], {
funcName: "fluid.tempStore"
});

// Supply the table of contents' template URL
fluid.demands("fluid.tableOfContents.levels", "fluid.tableOfContents", {
Expand All @@ -54,7 +54,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
jqUnit.assertEquals("Initially font-sans class exists", 1, $(".fl-font-sans").length);
jqUnit.assertEquals("Initially font-arial class exists", 1, $(".fl-font-arial").length);
jqUnit.assertEquals("Initially text-spacing class exists", 1, $(".fl-font-spacing-3").length);
fluid.pageEnhancer(options);
fluid.pageEnhancer();
jqUnit.assertEquals("font size classes should not be removed", 3, $(".fl-font-size-90").length);
jqUnit.assertEquals("layout class is gone", 0, $(".fl-layout-linear").length);
jqUnit.assertEquals("Fluid theme class is gone", 0, $(".fl-theme-hci").length);
Expand All @@ -70,7 +70,7 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
var body = $("body");
var initialFontSize = parseFloat(body.css("fontSize"));

var uiEnhancer = fluid.pageEnhancer(options).uiEnhancer;
var uiEnhancer = fluid.pageEnhancer().uiEnhancer;
uiEnhancer.updateModel(testSettings);

var expectedTextSize = initialFontSize * testSettings.textSize;
Expand Down

0 comments on commit 03b6035

Please sign in to comment.