From 977d3ae83f29480649f3bc4c649e67fcad355a76 Mon Sep 17 00:00:00 2001 From: "Md. Ashikul Alam" Date: Mon, 25 Nov 2024 18:30:30 +0600 Subject: [PATCH] fix: update client tests for after merging scopes --- .../src/views/RecordAudit/ActionMenu.test.tsx | 9 ++------- .../src/views/SearchResult/SearchResult.test.tsx | 14 +++++++------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/packages/client/src/views/RecordAudit/ActionMenu.test.tsx b/packages/client/src/views/RecordAudit/ActionMenu.test.tsx index cb727519a97..aa40c4385c6 100644 --- a/packages/client/src/views/RecordAudit/ActionMenu.test.tsx +++ b/packages/client/src/views/RecordAudit/ActionMenu.test.tsx @@ -133,14 +133,9 @@ describe('View action', () => { { store, history } ) - const { status, node } = actionStatus(component, [ACTION.VIEW_DECLARATION]) - expect(status).toBe(ACTION_STATUS.ENABLED) - - node?.simulate('click') + const { status } = actionStatus(component, [ACTION.VIEW_DECLARATION]) - expect(window.location.href).toContain( - defaultDeclaration.id + '/viewRecord' - ) + expect(status).toBe(ACTION_STATUS.HIDDEN) }) it('In progress', async () => { diff --git a/packages/client/src/views/SearchResult/SearchResult.test.tsx b/packages/client/src/views/SearchResult/SearchResult.test.tsx index ce675af46a1..76844c93541 100644 --- a/packages/client/src/views/SearchResult/SearchResult.test.tsx +++ b/packages/client/src/views/SearchResult/SearchResult.test.tsx @@ -90,7 +90,7 @@ describe('SearchResult tests', () => { query: SEARCH_EVENTS, variables: { advancedSearchParameters: { - declarationLocationId: '2a83cf14-b959-47f4-8097-f75a75d1867f', + declarationLocationId: '', trackingId: '', nationalId: '', registrationNumber: '', @@ -334,7 +334,7 @@ describe('SearchResult tests', () => { nationalId: '', registrationNumber: '', contactNumber: '+8801622688232', - declarationLocationId: '1234567s2323289', + declarationLocationId: '', contactEmail: '' }, sort: 'DESC' @@ -404,7 +404,7 @@ describe('SearchResult tests', () => { query: SEARCH_EVENTS, variables: { advancedSearchParameters: { - declarationLocationId: '2a83cf14-b959-47f4-8097-f75a75d1867f', + declarationLocationId: '', trackingId: 'DW0UTHR', nationalId: '', registrationNumber: '', @@ -498,7 +498,7 @@ describe('SearchResult tests', () => { query: SEARCH_EVENTS, variables: { advancedSearchParameters: { - declarationLocationId: '2a83cf14-b959-47f4-8097-f75a75d1867f', + declarationLocationId: '', trackingId: 'DW0UTHR', nationalId: '', registrationNumber: '', @@ -600,7 +600,7 @@ describe('SearchResult tests', () => { query: SEARCH_EVENTS, variables: { advancedSearchParameters: { - declarationLocationId: '2a83cf14-b959-47f4-8097-f75a75d1867f', + declarationLocationId: '', trackingId: 'DW0UTHR', nationalId: '', registrationNumber: '', @@ -706,7 +706,7 @@ describe('SearchResult downloadButton tests', () => { query: SEARCH_EVENTS, variables: { advancedSearchParameters: { - declarationLocationId: '2a83cf14-b959-47f4-8097-f75a75d1867f', + declarationLocationId: '', trackingId: 'DW0UTHR', nationalId: '', registrationNumber: '', @@ -803,7 +803,7 @@ describe('SearchResult downloadButton tests', () => { query: SEARCH_EVENTS, variables: { advancedSearchParameters: { - declarationLocationId: '2a83cf14-b959-47f4-8097-f75a75d1867f', + declarationLocationId: '', trackingId: 'DW0UTHR', nationalId: '', registrationNumber: '',