[Forms] Prune obsolete specs

Prune obsolete specs after changes made to support
integration of forms component, WTD-593.
This commit is contained in:
Victor Woeltjen
2014-12-03 17:26:02 -08:00
parent 5aff4e3777
commit 6fb5da1b35
5 changed files with 62 additions and 129 deletions

View File

@@ -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) {