diff --git a/src/framework/core/js/Fluid.js b/src/framework/core/js/Fluid.js index efab8d2838..ce31e09225 100644 --- a/src/framework/core/js/Fluid.js +++ b/src/framework/core/js/Fluid.js @@ -1122,7 +1122,7 @@ var fluid = fluid || fluid_2_0; var type = segs[0]; var lookup = fluid.priorityTypes[type]; if (lookup === undefined) { - fluid.fail("Invalid priority constraint type in constraint " + constraint + ": the only supported values are " + fluid.keys(fluid.priorityType).join(", ")); + fluid.fail("Invalid priority constraint type in constraint " + constraint + ": the only supported values are " + fluid.keys(fluid.priorityTypes).join(", ") + " or numeric"); } if (fixedOnly && lookup === 0) { fluid.fail("Constraint-based priority in constraint " + constraint + " is not supported in a " + site + " record - you must use either a numeric value or first, last"); diff --git a/tests/framework-tests/core/js/FluidIoCTests.js b/tests/framework-tests/core/js/FluidIoCTests.js index e699868a17..6ccc7db67d 100644 --- a/tests/framework-tests/core/js/FluidIoCTests.js +++ b/tests/framework-tests/core/js/FluidIoCTests.js @@ -2049,6 +2049,25 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt jqUnit.assertDeepEq("Children constructed in sort order", [1, 2, 3, 4], testComp.constructRecord); }); + fluid.defaults("fluid.tests.FLUID5762test", { + gradeNames: "fluid.component", + events: { + thing: null + }, + listeners: { + thing: { + funcName: "fluid.identity", + priority: "10" + } + } + }); + + jqUnit.test("FLUID-5762: Helpful diagnostic on faulty priority", function () { + jqUnit.expectFrameworkDiagnostic("Got framework diagnostic from faulty priority", function () { + fluid.tests.FLUID5762test(); + }, ["last", "numeric"]); + }); + /** Tree circularity tests (early detection of stack overflow) **/ fluid.defaults("fluid.tests.circularEvent", {