Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLUID-5193: Created a test case to demonstrate 5193 issue. #426

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 26 additions & 2 deletions src/tests/framework-tests/core/js/FluidIoCTests.js
Expand Up @@ -3640,8 +3640,6 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
jqUnit.assertEquals("Correctly resolved options from parent grade", 1, that.subComponent.options.parentOption); jqUnit.assertEquals("Correctly resolved options from parent grade", 1, that.subComponent.options.parentOption);
}); });




fluid.defaults("fluid.tests.dynamicInvoker", { fluid.defaults("fluid.tests.dynamicInvoker", {
gradeNames: ["autoInit", "fluid.littleComponent", "{that}.getDynamicInvoker"], gradeNames: ["autoInit", "fluid.littleComponent", "{that}.getDynamicInvoker"],
invokers: { invokers: {
Expand Down Expand Up @@ -3933,4 +3931,30 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
jqUnit.assertUndefined("Listeners after destruction point should not be notified", that.noted); jqUnit.assertUndefined("Listeners after destruction point should not be notified", that.noted);
}); });


// FLUID-5193: The matching form '*' in IoCSS doesn't match any subcomponents
fluid.defaults("fluid.tests.fluid5193root", {
gradeNames: ["fluid.littleComponent", "autoInit"],
components: {
sub1: {
type: "fluid.littleComponent"
},
sub2: {
type: "fluid.littleComponent"
}
},
userOption: 1,
distributeOptions: {
source: "{that}.options.userOption",
removeSource: true,
target: "{that > *}.options.userOption"
}
});

jqUnit.test("FLUID-5193 The matching form '*' in IoCSS doesn't match any subcomponents", function () {
var that = fluid.tests.fluid5193root();

jqUnit.assertEquals("The distributed options has been passed down to subComponent #1", 1, that.sub1.options.userOption);
jqUnit.assertEquals("The distributed options has been passed down to subComponent #2", 1, that.sub2.options.userOption);
});

})(jQuery); })(jQuery);