@pdtf/schemas 0.5.14 → 0.6.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://homebuyingandsellinggroup.co.uk/schemas/title-deed.json",
4
- "title": "Property Data Trust Framework HMLR Register Extract representation",
4
+ "title": "HMLR Official Copy Register Extract",
5
5
  "description": "A schema mirroring the V2_1 XML version of the HMLR Register Extract web service.",
6
6
  "definitions": {
7
7
  "BinaryObjectType": {
@@ -107,7 +107,7 @@
107
107
  "130"
108
108
  ]
109
109
  },
110
- "Infills": { "$ref": "#/definitions/Q1InfillDetailsType" }
110
+ "Infills": { "type": "object" }
111
111
  }
112
112
  },
113
113
  "Q1PricePaidEntryType": {
@@ -131,11 +131,6 @@
131
131
  "AddressLineType": {
132
132
  "type": "object",
133
133
  "properties": {
134
- "IndexNumeric": {
135
- "type": "array",
136
- "items": { "type": "number" },
137
- "minItems": 0
138
- },
139
134
  "Line": {
140
135
  "type": "array",
141
136
  "items": { "type": "string" },
@@ -152,27 +147,22 @@
152
147
  }
153
148
  },
154
149
  "ClassOfTitleCodeType": {
155
- "type": "object",
156
- "properties": {
157
- "Value": {
158
- "type": "string",
159
- "enum": [
160
- "10",
161
- "20",
162
- "30",
163
- "40",
164
- "50",
165
- "60",
166
- "70",
167
- "80",
168
- "90",
169
- "100",
170
- "110",
171
- "120",
172
- "130"
173
- ]
174
- }
175
- }
150
+ "type": "string",
151
+ "enum": [
152
+ "10",
153
+ "20",
154
+ "30",
155
+ "40",
156
+ "50",
157
+ "60",
158
+ "70",
159
+ "80",
160
+ "90",
161
+ "100",
162
+ "110",
163
+ "120",
164
+ "130"
165
+ ]
176
166
  },
177
167
  "IndicatorType": {
178
168
  "type": "string",
@@ -198,11 +188,7 @@
198
188
  "$ref": "#/definitions/LandRegistryOfficeNameTextType"
199
189
  },
200
190
  "LatestEditionDate": { "type": "string", "format": "date" },
201
- "PostcodeZone": {
202
- "type": "array",
203
- "items": { "$ref": "#/definitions/Q1PostcodeZoneType" },
204
- "minItems": 0
205
- },
191
+ "PostcodeZone": { "$ref": "#/definitions/Q1PostcodeZoneType" },
206
192
  "RegistrationDate": { "type": "string", "format": "date" }
207
193
  }
208
194
  },
@@ -316,9 +302,14 @@
316
302
  "properties": {
317
303
  "Name": { "$ref": "#/definitions/Q1NameType" },
318
304
  "Alias": {
319
- "type": "array",
320
- "items": { "$ref": "#/definitions/Q1NameType" },
321
- "minItems": 0
305
+ "oneOf": [
306
+ {
307
+ "type": "array",
308
+ "items": { "$ref": "#/definitions/Q1NameType" },
309
+ "minItems": 0
310
+ },
311
+ { "$ref": "#/definitions/Q1NameType" }
312
+ ]
322
313
  }
323
314
  }
324
315
  },
@@ -345,31 +336,32 @@
345
336
  "required": ["CharityName", "CharityType"],
346
337
  "properties": {
347
338
  "CharityName": {
348
- "type": "array",
349
- "items": { "type": "string" },
350
- "minItems": 1
339
+ "oneOf": [
340
+ { "type": "array", "items": { "type": "string" }, "minItems": 1 },
341
+ { "type": "string" }
342
+ ]
351
343
  },
352
344
  "CharityAddress": {
353
- "type": "array",
354
- "items": { "$ref": "#/definitions/Q1AddressType" },
355
- "minItems": 0
345
+ "oneOf": [
346
+ {
347
+ "type": "array",
348
+ "items": { "$ref": "#/definitions/Q1AddressType" },
349
+ "minItems": 0
350
+ },
351
+ { "$ref": "#/definitions/Q1AddressType" }
352
+ ]
356
353
  },
357
354
  "CharityType": { "$ref": "#/definitions/CharityCodeType" }
358
355
  }
359
356
  },
360
357
  "Q1PartyType": {
361
358
  "type": "object",
362
- "required": ["PrivateIndividual", "Organization"],
363
359
  "properties": {
364
360
  "PrivateIndividual": {
365
361
  "$ref": "#/definitions/Q1PrivateIndividualType"
366
362
  },
367
363
  "Organization": { "$ref": "#/definitions/Q1OrganizationType" },
368
- "Address": {
369
- "type": "array",
370
- "items": { "$ref": "#/definitions/Q1AddressType" },
371
- "minItems": 0
372
- },
364
+ "Address": { "$ref": "#/definitions/Q1AddressType" },
373
365
  "CharityDetails": { "$ref": "#/definitions/Q1CharityDetailsType" },
374
366
  "TradingName": { "type": "string" },
375
367
  "PartyNumber": { "type": "string" },
@@ -378,18 +370,27 @@
378
370
  },
379
371
  "Q1ProprietorshipType": {
380
372
  "type": "object",
381
- "required": ["CautionerParty", "RegisteredProprietorParty"],
382
373
  "properties": {
383
374
  "CurrentProprietorshipDate": { "type": "string", "format": "date" },
384
375
  "CautionerParty": {
385
- "type": "array",
386
- "items": { "$ref": "#/definitions/Q1PartyType" },
387
- "minItems": 1
376
+ "oneOf": [
377
+ {
378
+ "type": "array",
379
+ "items": { "$ref": "#/definitions/Q1PartyType" },
380
+ "minItems": 1
381
+ },
382
+ { "$ref": "#/definitions/Q1PartyType" }
383
+ ]
388
384
  },
389
385
  "RegisteredProprietorParty": {
390
- "type": "array",
391
- "items": { "$ref": "#/definitions/Q1PartyType" },
392
- "minItems": 1
386
+ "oneOf": [
387
+ {
388
+ "type": "array",
389
+ "items": { "$ref": "#/definitions/Q1PartyType" },
390
+ "minItems": 1
391
+ },
392
+ { "$ref": "#/definitions/Q1PartyType" }
393
+ ]
393
394
  }
394
395
  }
395
396
  },
@@ -449,9 +450,14 @@
449
450
  "required": ["RestrictionEntry"],
450
451
  "properties": {
451
452
  "RestrictionEntry": {
452
- "type": "array",
453
- "items": { "$ref": "#/definitions/Q1RestrictionEntryType" },
454
- "minItems": 1
453
+ "oneOf": [
454
+ {
455
+ "type": "array",
456
+ "items": { "$ref": "#/definitions/Q1RestrictionEntryType" },
457
+ "minItems": 1
458
+ },
459
+ { "$ref": "#/definitions/Q1RestrictionEntryType" }
460
+ ]
455
461
  }
456
462
  }
457
463
  },
@@ -468,9 +474,14 @@
468
474
  "required": ["ChargeeParty", "EntryDetails"],
469
475
  "properties": {
470
476
  "ChargeeParty": {
471
- "type": "array",
472
- "items": { "$ref": "#/definitions/Q1PartyType" },
473
- "minItems": 1
477
+ "oneOf": [
478
+ {
479
+ "type": "array",
480
+ "items": { "$ref": "#/definitions/Q1PartyType" },
481
+ "minItems": 1
482
+ },
483
+ { "$ref": "#/definitions/Q1PartyType" }
484
+ ]
474
485
  },
475
486
  "EntryDetails": { "$ref": "#/definitions/Q1EntryDetailsType" }
476
487
  }
@@ -493,9 +504,14 @@
493
504
  "RegisteredCharge": { "$ref": "#/definitions/Q1ChargeType" },
494
505
  "ChargeProprietor": { "$ref": "#/definitions/Q1ChargeProprietorType" },
495
506
  "SubCharge": {
496
- "type": "array",
497
- "items": { "$ref": "#/definitions/Q1SubChargeDetailsType" },
498
- "minItems": 0
507
+ "oneOf": [
508
+ {
509
+ "type": "array",
510
+ "items": { "$ref": "#/definitions/Q1SubChargeDetailsType" },
511
+ "minItems": 0
512
+ },
513
+ { "$ref": "#/definitions/Q1SubChargeDetailsType" }
514
+ ]
499
515
  }
500
516
  }
501
517
  },
@@ -504,9 +520,14 @@
504
520
  "required": ["ChargeEntry"],
505
521
  "properties": {
506
522
  "ChargeEntry": {
507
- "type": "array",
508
- "items": { "$ref": "#/definitions/Q1ChargeDetailsType" },
509
- "minItems": 1
523
+ "oneOf": [
524
+ {
525
+ "type": "array",
526
+ "items": { "$ref": "#/definitions/Q1ChargeDetailsType" },
527
+ "minItems": 1
528
+ },
529
+ { "$ref": "#/definitions/Q1ChargeDetailsType" }
530
+ ]
510
531
  }
511
532
  }
512
533
  },
@@ -526,9 +547,14 @@
526
547
  "required": ["AgreedNoticeEntry"],
527
548
  "properties": {
528
549
  "AgreedNoticeEntry": {
529
- "type": "array",
530
- "items": { "$ref": "#/definitions/Q1AgreedNoticeType" },
531
- "minItems": 1
550
+ "oneOf": [
551
+ {
552
+ "type": "array",
553
+ "items": { "$ref": "#/definitions/Q1AgreedNoticeType" },
554
+ "minItems": 1
555
+ },
556
+ { "$ref": "#/definitions/Q1AgreedNoticeType" }
557
+ ]
532
558
  }
533
559
  }
534
560
  },
@@ -537,9 +563,14 @@
537
563
  "required": ["EntryDetails"],
538
564
  "properties": {
539
565
  "EntryDetails": {
540
- "type": "array",
541
- "items": { "$ref": "#/definitions/Q1EntryDetailsType" },
542
- "minItems": 1
566
+ "oneOf": [
567
+ {
568
+ "type": "array",
569
+ "items": { "$ref": "#/definitions/Q1EntryDetailsType" },
570
+ "minItems": 1
571
+ },
572
+ { "$ref": "#/definitions/Q1EntryDetailsType" }
573
+ ]
543
574
  }
544
575
  }
545
576
  },
@@ -561,9 +592,14 @@
561
592
  "required": ["HomeRightsEntry"],
562
593
  "properties": {
563
594
  "HomeRightsEntry": {
564
- "type": "array",
565
- "items": { "$ref": "#/definitions/Q1HomeRightsType" },
566
- "minItems": 1
595
+ "oneOf": [
596
+ {
597
+ "type": "array",
598
+ "items": { "$ref": "#/definitions/Q1HomeRightsType" },
599
+ "minItems": 1
600
+ },
601
+ { "$ref": "#/definitions/Q1HomeRightsType" }
602
+ ]
567
603
  }
568
604
  }
569
605
  },
@@ -601,9 +637,10 @@
601
637
  },
602
638
  "DocumentDate": { "type": "string" },
603
639
  "EntryNumber": {
604
- "type": "array",
605
- "items": { "type": "string" },
606
- "minItems": 1
640
+ "oneOf": [
641
+ { "type": "array", "items": { "type": "string" }, "minItems": 1 },
642
+ { "type": "string" }
643
+ ]
607
644
  },
608
645
  "PlanOnlyIndicator": { "$ref": "#/definitions/IndicatorType" },
609
646
  "FiledUnder": { "type": "string" },
@@ -615,9 +652,14 @@
615
652
  "required": ["Document"],
616
653
  "properties": {
617
654
  "Document": {
618
- "type": "array",
619
- "items": { "$ref": "#/definitions/Q1DocumentEntryType" },
620
- "minItems": 1
655
+ "oneOf": [
656
+ {
657
+ "type": "array",
658
+ "items": { "$ref": "#/definitions/Q1DocumentEntryType" },
659
+ "minItems": 1
660
+ },
661
+ { "$ref": "#/definitions/Q1DocumentEntryType" }
662
+ ]
621
663
  }
622
664
  }
623
665
  },
@@ -636,9 +678,16 @@
636
678
  "required": ["UnilateralNoticeEntry"],
637
679
  "properties": {
638
680
  "UnilateralNoticeEntry": {
639
- "type": "array",
640
- "items": { "$ref": "#/definitions/Q1UnilateralNoticeDetailsType" },
641
- "minItems": 1
681
+ "oneOf": [
682
+ {
683
+ "type": "array",
684
+ "items": {
685
+ "$ref": "#/definitions/Q1UnilateralNoticeDetailsType"
686
+ },
687
+ "minItems": 1
688
+ },
689
+ { "$ref": "#/definitions/Q1UnilateralNoticeDetailsType" }
690
+ ]
642
691
  }
643
692
  }
644
693
  },
@@ -656,11 +705,7 @@
656
705
  "OfficialCopyDateTime": { "type": "string", "format": "date-time" },
657
706
  "EditionDate": { "type": "string", "format": "date" },
658
707
  "PricePaidEntry": { "$ref": "#/definitions/Q1PricePaidEntryType" },
659
- "PropertyAddress": {
660
- "type": "array",
661
- "items": { "$ref": "#/definitions/Q1AddressType" },
662
- "minItems": 1
663
- },
708
+ "PropertyAddress": { "$ref": "#/definitions/Q1AddressType" },
664
709
  "Title": { "$ref": "#/definitions/Q1TitleType" },
665
710
  "RegisterEntryIndicators": {
666
711
  "$ref": "#/definitions/Q1RegisterEntryIndicatorsType"
@@ -697,9 +742,10 @@
697
742
  "type": "object",
698
743
  "properties": {
699
744
  "EntryText": {
700
- "type": "array",
701
- "items": { "type": "string" },
702
- "minItems": 0
745
+ "oneOf": [
746
+ { "type": "array", "items": { "type": "string" }, "minItems": 0 },
747
+ { "type": "string" }
748
+ ]
703
749
  }
704
750
  }
705
751
  },
@@ -711,9 +757,10 @@
711
757
  "EntryDate": { "type": "string" },
712
758
  "EntryType": { "type": "string" },
713
759
  "EntryText": {
714
- "type": "array",
715
- "items": { "type": "string" },
716
- "minItems": 1
760
+ "oneOf": [
761
+ { "type": "array", "items": { "type": "string" }, "minItems": 1 },
762
+ { "type": "string" }
763
+ ]
717
764
  }
718
765
  }
719
766
  },
@@ -723,9 +770,14 @@
723
770
  "properties": {
724
771
  "ScheduleType": { "type": "string" },
725
772
  "ScheduleEntry": {
726
- "type": "array",
727
- "items": { "$ref": "#/definitions/Q1RegisterEntryType" },
728
- "minItems": 1
773
+ "oneOf": [
774
+ {
775
+ "type": "array",
776
+ "items": { "$ref": "#/definitions/Q1RegisterEntryType" },
777
+ "minItems": 1
778
+ },
779
+ { "$ref": "#/definitions/Q1RegisterEntryType" }
780
+ ]
729
781
  }
730
782
  }
731
783
  },
@@ -735,14 +787,24 @@
735
787
  "properties": {
736
788
  "DistrictDetails": { "$ref": "#/definitions/Q1DistrictDetailsType" },
737
789
  "RegisterEntry": {
738
- "type": "array",
739
- "items": { "$ref": "#/definitions/Q1RegisterEntryType" },
740
- "minItems": 1
790
+ "oneOf": [
791
+ {
792
+ "type": "array",
793
+ "items": { "$ref": "#/definitions/Q1RegisterEntryType" },
794
+ "minItems": 1
795
+ },
796
+ { "$ref": "#/definitions/Q1RegisterEntryType" }
797
+ ]
741
798
  },
742
799
  "Schedule": {
743
- "type": "array",
744
- "items": { "$ref": "#/definitions/Q1ScheduleType" },
745
- "minItems": 0
800
+ "oneOf": [
801
+ {
802
+ "type": "array",
803
+ "items": { "$ref": "#/definitions/Q1ScheduleType" },
804
+ "minItems": 0
805
+ },
806
+ { "$ref": "#/definitions/Q1ScheduleType" }
807
+ ]
746
808
  }
747
809
  }
748
810
  },
@@ -765,6 +827,7 @@
765
827
  }
766
828
  },
767
829
  "type": "object",
830
+ "required": ["OCSummaryData", "OCRegisterData"],
768
831
  "properties": {
769
832
  "OCSummaryData": {
770
833
  "title": "Official Copy Summary Data",
@@ -1,9 +1,6 @@
1
- const jp = require("jsonpointer");
2
1
  const Ajv = require("ajv");
3
2
  const addFormats = require("ajv-formats");
4
3
 
5
- const { getSubschemaValidator, getTitleAtPath } = require("../../index.js");
6
-
7
4
  const verifiedClaimsSchema = require("../schemas/pdtf-verified-claims.json");
8
5
  const exampleElectronicRecord = require("../examples/exampleElectronicRecord.json");
9
6
  const exampleVouch = require("../examples/exampleVouch.json");
@@ -11,7 +8,7 @@ const exampleDocumentedVouch = require("../examples/exampleDocumentedVouch.json"
11
8
 
12
9
  const ajv = new Ajv({
13
10
  allErrors: true,
14
- strictSchema: false
11
+ strictSchema: false,
15
12
  });
16
13
  addFormats(ajv);
17
14
 
@@ -39,7 +36,7 @@ test("claim with missing claims is invalid", () => {
39
36
  expect(isValid).toBe(false);
40
37
  });
41
38
 
42
- test.only("claim with invalid claims path is invalid", () => {
39
+ test("claim with invalid claims path is invalid", () => {
43
40
  const clonedVouch = JSON.parse(JSON.stringify(exampleVouch));
44
41
  const originalPath = Object.keys(clonedVouch.claims)[0];
45
42
  const data = clonedVouch.claims[originalPath];
@@ -1,39 +1,41 @@
1
1
  const jp = require("jsonpointer");
2
2
 
3
3
  const {
4
- propertyPackSchema,
4
+ transactionSchema,
5
5
  validator,
6
6
  getSubschema,
7
+ isPathValid,
7
8
  getSubschemaValidator,
8
9
  getTitleAtPath,
9
10
  } = require("../../index.js");
10
- const examplePropertyPack = require("../examples/examplePropertyPack.json");
11
+ const exampleTransaction = require("../examples/exampleTransaction.json");
11
12
 
12
13
  test("exports a property pack schema", () => {
13
- expect(propertyPackSchema).not.toBeNull();
14
+ expect(transactionSchema).not.toBeNull();
14
15
  });
15
16
 
16
17
  test("sample is valid", () => {
17
- const isValid = validator(examplePropertyPack);
18
+ const isValid = validator(exampleTransaction);
19
+ if (!isValid) console.log(validator.errors);
18
20
  expect(isValid).toBe(true);
19
21
  });
20
22
 
21
23
  test("invalid sample is invalid", () => {
22
- const clonedExamplePropertyPack = JSON.parse(
23
- JSON.stringify(examplePropertyPack)
24
+ const clonedExampleTransaction = JSON.parse(
25
+ JSON.stringify(exampleTransaction)
24
26
  );
25
- delete clonedExamplePropertyPack.propertyPack.materialFacts.notices;
26
- const isValid = validator(clonedExamplePropertyPack);
27
+ delete clonedExampleTransaction.propertyPack.materialFacts.notices;
28
+ const isValid = validator(clonedExampleTransaction);
27
29
  expect(isValid).toBe(false);
28
30
  });
29
31
 
30
32
  test("sample with missing dependent required fields is invalid", () => {
31
- const clonedExamplePropertyPack = JSON.parse(
32
- JSON.stringify(examplePropertyPack)
33
+ const clonedExampleTransaction = JSON.parse(
34
+ JSON.stringify(exampleTransaction)
33
35
  );
34
- clonedExamplePropertyPack.propertyPack.materialFacts.ownership.ownershipType =
36
+ clonedExampleTransaction.propertyPack.materialFacts.ownership.ownershipType =
35
37
  "leashold";
36
- const isValid = validator(clonedExamplePropertyPack);
38
+ const isValid = validator(clonedExampleTransaction);
37
39
  expect(isValid).toBe(false);
38
40
  });
39
41
 
@@ -42,11 +44,43 @@ test("correctly gets a top level subschema", () => {
42
44
  expect(subschema.title).toBe("Property Pack");
43
45
  });
44
46
 
47
+ test("correctly identifies a valid path", () => {
48
+ const isValid = isPathValid("/propertyPack/materialFacts");
49
+ expect(isValid).toBe(true);
50
+ });
51
+
52
+ test("correctly identifies an undefined invalid path", () => {
53
+ const isValid = isPathValid("/propertyPack/materialItems");
54
+ expect(isValid).toBe(false);
55
+ });
56
+
57
+ test("correctly identifies an error generating invalid path", () => {
58
+ const isValid = isPathValid("/propertyPack/materialItems/someProperty/item");
59
+ expect(isValid).toBe(false);
60
+ });
61
+
62
+ test("correctly identifies an array invalid path", () => {
63
+ const isValid = isPathValid("/propertyPack/materialFacts/1/item");
64
+ expect(isValid).toBe(false);
65
+ });
66
+
45
67
  test("correctly gets a subschema", () => {
46
68
  const subschema = getSubschema("/propertyPack/materialFacts/notices");
47
69
  expect(subschema.title).toBe("Notices which Affect the Property");
48
70
  });
49
71
 
72
+ test("correctly gets a subschema through an arrays element", () => {
73
+ const subschema = getSubschema(
74
+ "/propertyPack/titlesToBeSold/0/registerExtract"
75
+ );
76
+ expect(subschema.title).toBe("HMLR Official Copy Register Extract");
77
+ });
78
+
79
+ test("correctly gets another subschema through an arrays element", () => {
80
+ const subschema = getSubschema("/participants/0/name/forenames");
81
+ expect(subschema.title).toBe("Forenames");
82
+ });
83
+
50
84
  test("correctly gets a subschema validator which is already cached", () => {
51
85
  const validator = getSubschemaValidator(
52
86
  "/propertyPack/energyPerformanceCertificate"
@@ -58,10 +92,10 @@ test("correctly gets a subschema validator which is already cached", () => {
58
92
  expect(anotherValidator).not.toBeNull();
59
93
  });
60
94
 
61
- test("correctly gets a working subschema validator", () => {
95
+ test("correctly gets a subschema validator which validates", () => {
62
96
  const path = "/propertyPack/materialFacts/notices";
63
97
  const validator = getSubschemaValidator(path);
64
- const data = jp.get(examplePropertyPack, path);
98
+ const data = jp.get(exampleTransaction, path);
65
99
  expect(data.neighbourDevelopment.yesNo).toBe("No");
66
100
  let isValid = validator(data);
67
101
  expect(isValid).toBe(true);
@@ -73,51 +107,48 @@ test("correctly gets a working subschema validator", () => {
73
107
  test("correctly gets titles across schemas, arrays and non-existient title properties", () => {
74
108
  expect(
75
109
  getTitleAtPath(
76
- propertyPackSchema,
110
+ transactionSchema,
77
111
  "/propertyPack/materialFacts/ownership/ownershipType"
78
112
  )
79
113
  ).toBe("What type of ownership is the property?");
80
114
  expect(
81
115
  getTitleAtPath(
82
- propertyPackSchema,
116
+ transactionSchema,
83
117
  "/propertyPack/materialFacts/ownership/leaseholdDetails/lengthOfLeaseInYears"
84
118
  )
85
119
  ).toBe("Length of lease (years)");
86
120
  expect(
87
121
  getTitleAtPath(
88
- propertyPackSchema,
122
+ transactionSchema,
89
123
  "/propertyPack/materialFacts/ownership/managedFreeholdOrCommonhold/annualServiceCharge"
90
124
  )
91
125
  ).toBe(
92
126
  "Amount of current annual service charge/estate rentcharge/maintenance contribution (£)"
93
127
  );
94
128
  expect(
95
- getTitleAtPath(
96
- propertyPackSchema,
97
- "/propertyPack/materialFacts/invalidPath"
98
- )
129
+ getTitleAtPath(transactionSchema, "/propertyPack/materialFacts/invalidPath")
99
130
  ).toBe(undefined);
100
131
  expect(
101
132
  getTitleAtPath(
102
- propertyPackSchema,
133
+ transactionSchema,
103
134
  "/propertyPack/titlesToBeSold/0/registerExtract"
104
135
  )
105
- ).toBe("Property Data Trust Framework HMLR Register Extract representation");
136
+ ).toBe("HMLR Official Copy Register Extract");
106
137
  expect(
107
138
  getTitleAtPath(
108
- propertyPackSchema,
139
+ transactionSchema,
109
140
  "/propertyPack/titlesToBeSold/0/registerExtract/OCSummaryData/PropertyAddress"
110
141
  )
111
142
  ).toBe("Property address");
112
143
  expect(
113
144
  getTitleAtPath(
114
- propertyPackSchema,
145
+ transactionSchema,
115
146
  "/propertyPack/titlesToBeSold/0/registerExtract/OCSummaryData/InvalidProp"
116
147
  )
117
148
  ).toBe(undefined);
118
149
  expect(
119
150
  getTitleAtPath(
120
- propertyPackSchema,
151
+ transactionSchema,
121
152
  "/propertyPack/energyPerformanceCertificate/certificate/currentEnergyRating"
122
153
  )
123
154
  ).toBe("Current energy rating");