From 63d8e514f724c292168727cb12a055fc2895eb6a Mon Sep 17 00:00:00 2001 From: Andres Becerra Date: Fri, 10 Jan 2025 15:37:19 +0000 Subject: [PATCH] SCRUM-4657: add UI test for a reference --- .../__tests__/VariantsTable.test.js | 2 ++ .../variantsPage/mockData/mockData.js | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/main/cliapp/src/containers/variantsPage/__tests__/VariantsTable.test.js b/src/main/cliapp/src/containers/variantsPage/__tests__/VariantsTable.test.js index 988866a5a..41b034619 100644 --- a/src/main/cliapp/src/containers/variantsPage/__tests__/VariantsTable.test.js +++ b/src/main/cliapp/src/containers/variantsPage/__tests__/VariantsTable.test.js @@ -60,6 +60,7 @@ describe('', () => { const variantTypeTd = await result.findByText(/SNP/i); const variantStatusTd = await result.findByText(/dead/i); const sourceGeneralConsequenceTd = await result.findByText(/point_mutation/i); + const referenceTd = await result.findByText(/AGRKB:000000002/i); await waitFor(() => { expect(curieTd).toBeInTheDocument(); @@ -71,6 +72,7 @@ describe('', () => { expect(variantTypeTd).toBeInTheDocument(); expect(variantStatusTd).toBeInTheDocument(); expect(sourceGeneralConsequenceTd).toBeInTheDocument(); + expect(referenceTd).toBeInTheDocument(); }); }); }); diff --git a/src/main/cliapp/src/containers/variantsPage/mockData/mockData.js b/src/main/cliapp/src/containers/variantsPage/mockData/mockData.js index 9fcf27951..3fcf0ab51 100644 --- a/src/main/cliapp/src/containers/variantsPage/mockData/mockData.js +++ b/src/main/cliapp/src/containers/variantsPage/mockData/mockData.js @@ -220,6 +220,27 @@ export const data = { ], }, ], + references: [ + { + id: 3, + internal: false, + obsolete: false, + dbDateCreated: '2025-01-09T16:19:58.85196Z', + dbDateUpdated: '2025-01-09T16:19:58.851965Z', + curie: 'AGRKB:000000002', + crossReferences: [ + { + id: 200000160, + internal: false, + obsolete: false, + dbDateCreated: '2025-01-09T16:19:58.841396Z', + dbDateUpdated: '2025-01-09T16:19:58.841404Z', + referencedCurie: 'PMID:25920554', + displayName: 'PMID:25920554', + }, + ], + }, + ], }, ], totalResults: 1,