diff --git a/src/app/components/media/MediaOrigin.test.js b/src/app/components/media/MediaOrigin.test.js index 060aa9078..1fe0a5d78 100644 --- a/src/app/components/media/MediaOrigin.test.js +++ b/src/app/components/media/MediaOrigin.test.js @@ -10,29 +10,29 @@ import CheckMediaOrigin from '../../CheckMediaOrigin'; describe('', () => { it('should render a button with the correct icon and message for each type', () => { - const tiplineSubmitted = mountWithIntl(); + const tiplineSubmitted = mountWithIntl(); expect(tiplineSubmitted.find(Tipline).length).toEqual(1); expect(tiplineSubmitted.html()).toMatch('Tipline Submitted'); - const userAdded = mountWithIntl(); + const userAdded = mountWithIntl(); expect(userAdded.find(PersonAdd).length).toEqual(1); expect(userAdded.html()).toMatch('User Added'); - const userMerged = mountWithIntl(); + const userMerged = mountWithIntl(); expect(userMerged.find(Person).length).toEqual(1); expect(userMerged.html()).toMatch('User Merged'); - const userMatched = mountWithIntl(); + const userMatched = mountWithIntl(); expect(userMatched.find(PersonCheck).length).toEqual(1); expect(userMatched.html()).toMatch('User Matched'); - const autoMatched = mountWithIntl(); + const autoMatched = mountWithIntl(); expect(autoMatched.find(Bolt).length).toEqual(1); expect(autoMatched.html()).toMatch('Auto Matched'); }); it('should return null for invalid type', () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); expect(wrapper.find('FormattedMessage').length).toEqual(0); }); }); diff --git a/src/app/components/media/MediaOriginBanner.test.js b/src/app/components/media/MediaOriginBanner.test.js index da3fd20cd..0e5907244 100644 --- a/src/app/components/media/MediaOriginBanner.test.js +++ b/src/app/components/media/MediaOriginBanner.test.js @@ -9,33 +9,33 @@ import Tipline from '../../icons/question_answer.svg'; import CheckMediaOrigin from '../../CheckMediaOrigin'; describe('', () => { - const timestamp = 1736876257; - const cluster = 'Cluster A'; - const user = 'Bruce'; + const media_cluster_origin_timestamp = 1736876257; + const media_cluster_relationship ={ confirmed_by: {name: 'Cluster A'}, target: { title: 'Cluster B' }}; + const media_cluster_origin_user = 'Bruce'; it('should render a banner with the correct icon and message for each type', () => { - const tiplineSubmitted = mountWithIntl(); + const tiplineSubmitted = mountWithIntl(); expect(tiplineSubmitted.find(Tipline).length).toEqual(1); expect(tiplineSubmitted.html()).toContain('This media was submitted via Tipline'); - const userAdded = mountWithIntl(); + const userAdded = mountWithIntl(); expect(userAdded.find(PersonAdd).length).toEqual(1); expect(userAdded.html()).toContain('This media was added to the cluster by'); - const userMerged = mountWithIntl(); + const userMerged = mountWithIntl(); expect(userMerged.find(Person).length).toEqual(1); - expect(userMerged.html()).toContain('This media was added to the cluster by'); + expect(userMerged.html()).toContain('This media was merged to the cluster by'); - const userMatched = mountWithIntl(); + const userMatched = mountWithIntl(); expect(userMatched.find(PersonCheck).length).toEqual(1); expect(userMatched.html()).toContain('This media was added to the cluster by'); - const autoMatched = mountWithIntl(); + const autoMatched = mountWithIntl(); expect(autoMatched.find(Bolt).length).toEqual(1); expect(autoMatched.html()).toContain('This media was automatically matched to the cluster'); }); it('should return null for invalid type', () => { - const wrapper = mountWithIntl(); + const wrapper = mountWithIntl(); expect(wrapper.find('FormattedMessage').length).toEqual(0); }); });