Skip to content

Commit

Permalink
Update datamodel context and test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
sharadsw committed Oct 23, 2024
1 parent 8a03d4b commit 4ca3bd3
Show file tree
Hide file tree
Showing 12 changed files with 1,586 additions and 418 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ exports[`allTablesWithAttachments 1`] = `
"[table Storage]",
"[table Taxon]",
"[table TreatmentEvent]",
"[table AbsoluteAge]",
"[table RelativeAge]",
]
`;

Expand Down Expand Up @@ -62,5 +64,7 @@ exports[`attachmentRelatedTables 1`] = `
"StorageAttachment",
"TaxonAttachment",
"TreatmentEventAttachment",
"AbsoluteAgeAttachment",
"RelativeAgeAttachment",
]
`;
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ exports[`fields are loaded 1`] = `
"[literalField CollectionObject.yesNo4]",
"[literalField CollectionObject.yesNo5]",
"[literalField CollectionObject.yesNo6]",
"[relationship CollectionObject.absoluteAges]",
"[relationship CollectionObject.accession]",
"[relationship CollectionObject.agent1]",
"[relationship CollectionObject.appraisal]",
Expand Down Expand Up @@ -95,6 +96,7 @@ exports[`fields are loaded 1`] = `
"[relationship CollectionObject.paleoContext]",
"[relationship CollectionObject.preparations]",
"[relationship CollectionObject.projects]",
"[relationship CollectionObject.relativeAges]",
"[relationship CollectionObject.rightSideRels]",
"[relationship CollectionObject.treatmentEvents]",
"[relationship CollectionObject.visibilitySetBy]",
Expand Down Expand Up @@ -1214,6 +1216,7 @@ exports[`localization is loaded 1`] = `

exports[`relationships are loaded 1`] = `
[
"[relationship CollectionObject.absoluteAges]",
"[relationship CollectionObject.accession]",
"[relationship CollectionObject.agent1]",
"[relationship CollectionObject.appraisal]",
Expand Down Expand Up @@ -1244,6 +1247,7 @@ exports[`relationships are loaded 1`] = `
"[relationship CollectionObject.paleoContext]",
"[relationship CollectionObject.preparations]",
"[relationship CollectionObject.projects]",
"[relationship CollectionObject.relativeAges]",
"[relationship CollectionObject.rightSideRels]",
"[relationship CollectionObject.treatmentEvents]",
"[relationship CollectionObject.visibilitySetBy]",
Expand All @@ -1253,6 +1257,9 @@ exports[`relationships are loaded 1`] = `

exports[`tableScoping 1`] = `
{
"AbsoluteAge": "collectionObject",
"AbsoluteAgeAttachment": "absoluteAge > collectionObject",
"AbsoluteAgeCitation": "absoluteAge > collectionObject",
"Accession": "division",
"AccessionAgent": "accession > division",
"AccessionAttachment": "accession > division",
Expand Down Expand Up @@ -1295,7 +1302,7 @@ exports[`tableScoping 1`] = `
"CollectionObjectAttribute": undefined,
"CollectionObjectCitation": "collectionObject",
"CollectionObjectGroup": "collection",
"CollectionObjectGroupJoin": "parentcog > collection",
"CollectionObjectGroupJoin": "parentCog > collection",
"CollectionObjectGroupType": "collection",
"CollectionObjectProperty": "collectionObject",
"CollectionObjectType": "collection",
Expand Down Expand Up @@ -1400,6 +1407,9 @@ exports[`tableScoping 1`] = `
"RecordSetItem": undefined,
"ReferenceWork": undefined,
"ReferenceWorkAttachment": undefined,
"RelativeAge": "collectionObject",
"RelativeAgeAttachment": "relativeAge > collectionObject",
"RelativeAgeCitation": "relativeAge > collectionObject",
"RepositoryAgreement": "division",
"RepositoryAgreementAttachment": "repositoryAgreement > division",
"Role": "collection",
Expand Down Expand Up @@ -1443,6 +1453,9 @@ exports[`tableScoping 1`] = `
"TaxonCitation": "taxon > definition > discipline",
"TaxonTreeDef": "discipline",
"TaxonTreeDefItem": "treeDef > discipline",
"TectonicUnit": "definition > discipline",
"TectonicUnitTreeDef": "discipline",
"TectonicUnitTreeDefItem": "treeDef > discipline",
"TreatmentEvent": "collectionObject",
"TreatmentEventAttachment": "treatmentEvent > collectionObject",
"UniquenessRule": "discipline",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ test('tableScoping', () =>
test('indexed fields are loaded', () =>
expect(tables.CollectionObject.field).toMatchInlineSnapshot(`
{
"absoluteAges": "[relationship CollectionObject.absoluteAges]",
"accession": "[relationship CollectionObject.accession]",
"actualTotalCountAmt": "[literalField CollectionObject.actualTotalCountAmt]",
"age": "[literalField CollectionObject.age]",
Expand Down Expand Up @@ -430,6 +431,7 @@ test('indexed fields are loaded', () =>
"preparations": "[relationship CollectionObject.preparations]",
"projectNumber": "[literalField CollectionObject.projectNumber]",
"projects": "[relationship CollectionObject.projects]",
"relativeAges": "[relationship CollectionObject.relativeAges]",
"remarks": "[literalField CollectionObject.remarks]",
"reservedInteger3": "[literalField CollectionObject.reservedInteger3]",
"reservedInteger4": "[literalField CollectionObject.reservedInteger4]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ exports[`Tables with form tables computed correctly 1`] = `
"[table RepositoryAgreement]",
"[table RepositoryAgreementAttachment]",
"[table Shipment]",
"[table SpAuditLog]",
"[table Storage]",
"[table StorageAttachment]",
"[table StorageTreeDef]",
Expand All @@ -144,5 +145,14 @@ exports[`Tables with form tables computed correctly 1`] = `
"[table CollectionObjectGroup]",
"[table CollectionObjectGroupJoin]",
"[table CollectionObjectGroupType]",
"[table AbsoluteAge]",
"[table RelativeAge]",
"[table AbsoluteAgeAttachment]",
"[table RelativeAgeAttachment]",
"[table AbsoluteAgeCitation]",
"[table RelativeAgeCitation]",
"[table TectonicUnitTreeDef]",
"[table TectonicUnitTreeDefItem]",
"[table TectonicUnit]",
]
`;
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,16 @@ exports[`Formatters are fetched and parsed correctly 1`] = `

exports[`getMainTableFields 1`] = `
{
"AbsoluteAge": [
"ageType",
"datingMethod",
],
"AbsoluteAgeAttachment": [],
"AbsoluteAgeCitation": [
"figureNumber",
"pageNumber",
"plateNumber",
],
"Accession": [
"accessionNumber",
"status",
Expand Down Expand Up @@ -2604,6 +2614,16 @@ exports[`getMainTableFields 1`] = `
"volume",
],
"ReferenceWorkAttachment": [],
"RelativeAge": [
"ageType",
"datingMethod",
],
"RelativeAgeAttachment": [],
"RelativeAgeCitation": [
"figureNumber",
"pageNumber",
"plateNumber",
],
"RepositoryAgreement": [
"repositoryAgreementNumber",
"status",
Expand Down Expand Up @@ -2743,6 +2763,23 @@ exports[`getMainTableFields 1`] = `
"textBefore",
"title",
],
"TectonicUnit": [
"name",
"fullName",
"guid",
"text1",
"text2",
],
"TectonicUnitTreeDef": [
"name",
],
"TectonicUnitTreeDefItem": [
"name",
"fullNameSeparator",
"textAfter",
"textBefore",
"title",
],
"TreatmentEvent": [
"treatmentNumber",
"type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ requireContext();
test('Parent table relationships are calculated properly', () =>
expect(parentTableRelationship()).toMatchInlineSnapshot(`
{
"AbsoluteAgeAttachment": "[relationship AbsoluteAgeAttachment.absoluteAge]",
"AbsoluteAgeCitation": "[relationship AbsoluteAgeCitation.absoluteAge]",
"AccessionAgent": "[relationship AccessionAgent.accession]",
"AccessionAttachment": "[relationship AccessionAttachment.accession]",
"AccessionAuthorization": "[relationship AccessionAuthorization.accession]",
Expand All @@ -31,7 +33,7 @@ test('Parent table relationships are calculated properly', () =>
"CollectionObjectAttachment": "[relationship CollectionObjectAttachment.collectionObject]",
"CollectionObjectAttr": "[relationship CollectionObjectAttr.collectionObject]",
"CollectionObjectCitation": "[relationship CollectionObjectCitation.collectionObject]",
"CollectionObjectGroupJoin": "[relationship CollectionObjectGroupJoin.parentcog]",
"CollectionObjectGroupJoin": "[relationship CollectionObjectGroupJoin.parentCog]",
"CollectionObjectProperty": "[relationship CollectionObjectProperty.collectionObject]",
"Collector": "[relationship Collector.collectingEvent]",
"CommonNameTx": "[relationship CommonNameTx.taxon]",
Expand Down Expand Up @@ -86,6 +88,8 @@ test('Parent table relationships are calculated properly', () =>
"PreparationProperty": "[relationship PreparationProperty.preparation]",
"RecordSetItem": "[relationship RecordSetItem.recordSet]",
"ReferenceWorkAttachment": "[relationship ReferenceWorkAttachment.referenceWork]",
"RelativeAgeAttachment": "[relationship RelativeAgeAttachment.relativeAge]",
"RelativeAgeCitation": "[relationship RelativeAgeCitation.relativeAge]",
"RepositoryAgreementAttachment": "[relationship RepositoryAgreementAttachment.repositoryAgreement]",
"RolePolicy": "[relationship RolePolicy.role]",
"SpAppResourceData": "[relationship SpAppResourceData.spAppResource]",
Expand All @@ -99,6 +103,7 @@ test('Parent table relationships are calculated properly', () =>
"TaxonAttachment": "[relationship TaxonAttachment.taxon]",
"TaxonCitation": "[relationship TaxonCitation.taxon]",
"TaxonTreeDefItem": "[relationship TaxonTreeDefItem.treeDef]",
"TectonicUnitTreeDefItem": "[relationship TectonicUnitTreeDefItem.treeDef]",
"TreatmentEventAttachment": "[relationship TreatmentEventAttachment.treatmentEvent]",
"UniquenessRuleField": "[relationship UniquenessRuleField.uniquenessrule]",
"WorkbenchRow": "[relationship WorkbenchRow.workbench]",
Expand Down
Loading

0 comments on commit 4ca3bd3

Please sign in to comment.