From f280f83609b21fc54684fca80cfe02db120b1e2a Mon Sep 17 00:00:00 2001 From: DoraCretu594118 <103416234+doracretu3pillar@users.noreply.github.com> Date: Wed, 2 Oct 2024 19:21:44 +0300 Subject: [PATCH] Changed the unique key for lists --- .../PerconaUpdateVersion.test.tsx | 37 ++----------------- .../PerconaUpdateVersion.tsx | 2 +- 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/public/app/percona/shared/components/PerconaBootstrapper/PerconaUpdateVersion/PerconaUpdateVersion.test.tsx b/public/app/percona/shared/components/PerconaBootstrapper/PerconaUpdateVersion/PerconaUpdateVersion.test.tsx index b36b7d61897d5..23aad45ce1ac4 100644 --- a/public/app/percona/shared/components/PerconaBootstrapper/PerconaUpdateVersion/PerconaUpdateVersion.test.tsx +++ b/public/app/percona/shared/components/PerconaBootstrapper/PerconaUpdateVersion/PerconaUpdateVersion.test.tsx @@ -32,7 +32,7 @@ describe('PerconaUpdateVersion', () => { { version: 'PMM 3.0.1', tag: 'string', - timestamp: '2024-09-24T09:12:31.488Z', + timestamp: '2024-09-23T09:12:31.488Z', release_notes_url: 'http://localhost:3000', release_notes_text: 'text1', }, @@ -44,18 +44,6 @@ describe('PerconaUpdateVersion', () => { updateAvailable: true, latest: { version: '3.0.1' }, lastChecked: '', - changeLogs: { - lastCheck: '', - updates: [ - { - version: 'PMM 3.0.1', - tag: 'string', - timestamp: '2024-09-24T09:12:31.488Z', - releaseNotesUrl: 'http://localhost:3000', - releaseNotesText: 'text1', - }, - ], - }, }, }; jest.spyOn(UpdatesService, 'getUpdatesChangelogs').mockReturnValue(Promise.resolve({ ...changeLogsAPIResponse })); @@ -84,14 +72,14 @@ describe('PerconaUpdateVersion', () => { { version: 'PMM 3.0.1', tag: 'string', - timestamp: '2024-09-24T09:12:31.488Z', + timestamp: '2024-09-27T09:12:31.488Z', release_notes_url: 'http://localhost:3000', release_notes_text: 'text1', }, { version: 'PMM 3.0.2', tag: 'string', - timestamp: '2024-09-24T09:12:31.488Z', + timestamp: '2024-09-23T09:12:31.488Z', release_notes_url: 'http://localhost:3000', release_notes_text: 'text2', }, @@ -103,25 +91,6 @@ describe('PerconaUpdateVersion', () => { updateAvailable: true, latest: { version: '3.0.1' }, lastChecked: '', - changeLogs: { - lastCheck: '', - updates: [ - { - version: 'PMM 3.0.1', - tag: 'string', - timestamp: '2024-09-24T09:12:31.488Z', - releaseNotesUrl: 'http://localhost:3000', - releaseNotesText: 'text1', - }, - { - version: 'PMM 3.0.2', - tag: 'string', - timestamp: '2024-09-24T09:12:31.488Z', - releaseNotesUrl: 'http://localhost:3000', - releaseNotesText: 'text2', - }, - ], - }, }, }; jest.spyOn(UpdatesService, 'getUpdatesChangelogs').mockReturnValue(Promise.resolve({ ...changeLogsAPIResponse })); diff --git a/public/app/percona/shared/components/PerconaBootstrapper/PerconaUpdateVersion/PerconaUpdateVersion.tsx b/public/app/percona/shared/components/PerconaBootstrapper/PerconaUpdateVersion/PerconaUpdateVersion.tsx index 060d1d7ab64e2..c010c66b9cc36 100644 --- a/public/app/percona/shared/components/PerconaBootstrapper/PerconaUpdateVersion/PerconaUpdateVersion.tsx +++ b/public/app/percona/shared/components/PerconaBootstrapper/PerconaUpdateVersion/PerconaUpdateVersion.tsx @@ -85,7 +85,7 @@ const PerconaUpdateVersion: FC = () => {