@pdtf/schemas 0.12.0-0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -164,9 +164,9 @@
|
|
|
164
164
|
"ntsRef": "A1.1",
|
|
165
165
|
"title": "Ownership",
|
|
166
166
|
"type": "object",
|
|
167
|
-
"required": ["
|
|
167
|
+
"required": ["ownershipsToBeTransferred"],
|
|
168
168
|
"properties": {
|
|
169
|
-
"
|
|
169
|
+
"ownershipsToBeTransferred": {
|
|
170
170
|
"baspiRef": "A1.3",
|
|
171
171
|
"lawSocietyRef": "TA7/1",
|
|
172
172
|
"title": "Ownerships to be transferred on sale",
|
|
@@ -33,7 +33,7 @@ test("sample with missing dependent required fields is invalid", () => {
|
|
|
33
33
|
const clonedExampleTransaction = JSON.parse(
|
|
34
34
|
JSON.stringify(exampleTransaction)
|
|
35
35
|
);
|
|
36
|
-
clonedExampleTransaction.propertyPack.materialFacts.ownership.
|
|
36
|
+
clonedExampleTransaction.propertyPack.materialFacts.ownership.ownershipsToBeTransferred[0].ownershipType =
|
|
37
37
|
"leashold";
|
|
38
38
|
const isValid = validator(clonedExampleTransaction);
|
|
39
39
|
expect(isValid).toBe(false);
|
|
@@ -90,14 +90,14 @@ test("correctly gets a subschema through a dependency", () => {
|
|
|
90
90
|
|
|
91
91
|
test("correctly gets another subschema through a dependency", () => {
|
|
92
92
|
const subschema = getSubschema(
|
|
93
|
-
"/propertyPack/materialFacts/ownership/
|
|
93
|
+
"/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/lengthOfLeaseInYears"
|
|
94
94
|
);
|
|
95
95
|
expect(subschema.title).toBe("Length of lease (years)");
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
test("correctly gets yet another subschema through a dependency", () => {
|
|
99
99
|
const subschema = getSubschema(
|
|
100
|
-
"/propertyPack/materialFacts/ownership/
|
|
100
|
+
"/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/rentIncrease/details"
|
|
101
101
|
);
|
|
102
102
|
expect(subschema.title).toBe("Details");
|
|
103
103
|
});
|
|
@@ -145,19 +145,19 @@ test("correctly gets titles across schemas, arrays and non-existient title prope
|
|
|
145
145
|
expect(
|
|
146
146
|
getTitleAtPath(
|
|
147
147
|
transactionSchema,
|
|
148
|
-
"/propertyPack/materialFacts/ownership/
|
|
148
|
+
"/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/ownershipType"
|
|
149
149
|
)
|
|
150
150
|
).toBe("What type of ownership is the property?");
|
|
151
151
|
expect(
|
|
152
152
|
getTitleAtPath(
|
|
153
153
|
transactionSchema,
|
|
154
|
-
"/propertyPack/materialFacts/ownership/
|
|
154
|
+
"/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/lengthOfLeaseInYears"
|
|
155
155
|
)
|
|
156
156
|
).toBe("Length of lease (years)");
|
|
157
157
|
expect(
|
|
158
158
|
getTitleAtPath(
|
|
159
159
|
transactionSchema,
|
|
160
|
-
"/propertyPack/materialFacts/ownership/
|
|
160
|
+
"/propertyPack/materialFacts/ownership/ownershipsToBeTransferred/0/annualServiceCharge"
|
|
161
161
|
)
|
|
162
162
|
).toBe(
|
|
163
163
|
"Amount of current annual service charge/estate rentcharge/maintenance contribution (£)"
|