[Forms] Prune obsolete specs
Prune obsolete specs after changes made to support integration of forms component, WTD-593.
This commit is contained in:
@@ -19,10 +19,7 @@ define(
|
||||
"property" + name,
|
||||
[ "getDefinition", "getValue", "setValue" ]
|
||||
);
|
||||
mockProperty.getDefinition.andReturn({
|
||||
name: name,
|
||||
key: name.toLowerCase()
|
||||
});
|
||||
mockProperty.getDefinition.andReturn({});
|
||||
return mockProperty;
|
||||
}
|
||||
|
||||
@@ -62,23 +59,23 @@ define(
|
||||
});
|
||||
|
||||
it("creates a form model with a Properties section", function () {
|
||||
expect(wizard.getFormModel().sections[0].name)
|
||||
expect(wizard.getFormStructure().sections[0].name)
|
||||
.toEqual("Properties");
|
||||
});
|
||||
|
||||
it("adds one row per defined type property", function () {
|
||||
// Three properties were defined in the mock type
|
||||
expect(wizard.getFormModel().sections[0].rows.length)
|
||||
expect(wizard.getFormStructure().sections[0].rows.length)
|
||||
.toEqual(3);
|
||||
});
|
||||
|
||||
it("interprets form data using type-defined properties", function () {
|
||||
// Use key names from mock properties
|
||||
wizard.createModel({
|
||||
a: "field 0",
|
||||
b: "field 1",
|
||||
c: "field 2"
|
||||
});
|
||||
wizard.createModel([
|
||||
"field 0",
|
||||
"field 1",
|
||||
"field 2"
|
||||
]);
|
||||
|
||||
// Should have gotten a setValue call
|
||||
mockProperties.forEach(function (mockProperty, i) {
|
||||
|
||||
Reference in New Issue
Block a user