diff --git a/cypress/integration/common/report.js b/cypress/integration/common/report.js index 5b0f96cb4..9f62a2818 100644 --- a/cypress/integration/common/report.js +++ b/cypress/integration/common/report.js @@ -130,7 +130,7 @@ Given('somebody reported the following posts:', table => { .authenticateAs(submitter) .mutate(`mutation($resourceId: ID!, $reasonCategory: ReasonCategory!, $reasonDescription: String!) { fileReport(resourceId: $resourceId, reasonCategory: $reasonCategory, reasonDescription: $reasonDescription) { - type + id } }`, { resourceId, diff --git a/webapp/components/ContentMenu/ContentMenu.spec.js b/webapp/components/ContentMenu/ContentMenu.spec.js index 485c43145..8f93aa4a4 100644 --- a/webapp/components/ContentMenu/ContentMenu.spec.js +++ b/webapp/components/ContentMenu/ContentMenu.spec.js @@ -85,7 +85,7 @@ describe('ContentMenu.vue', () => { .filter(item => item.text() === 'post.menu.delete') .at(0) .trigger('click') - expect(openModalSpy).toHaveBeenCalledWith('delete') + expect(openModalSpy).toHaveBeenCalledWith('confirm', 'delete') }) }) @@ -166,7 +166,7 @@ describe('ContentMenu.vue', () => { .filter(item => item.text() === 'comment.menu.delete') .at(0) .trigger('click') - expect(openModalSpy).toHaveBeenCalledWith('delete') + expect(openModalSpy).toHaveBeenCalledWith('confirm', 'delete') }) }) @@ -332,7 +332,7 @@ describe('ContentMenu.vue', () => { .filter(item => item.text() === 'release.contribution.title') .at(0) .trigger('click') - expect(openModalSpy).toHaveBeenCalledWith('release', 'd23a4265-f5f7-4e17-9f86-85f714b4b9f8') + expect(openModalSpy).toHaveBeenCalledWith('release') }) it('can release comments', () => { @@ -350,7 +350,7 @@ describe('ContentMenu.vue', () => { .filter(item => item.text() === 'release.comment.title') .at(0) .trigger('click') - expect(openModalSpy).toHaveBeenCalledWith('release', 'd23a4265-f5f7-4e17-9f86-85f714b4b9f8') + expect(openModalSpy).toHaveBeenCalledWith('release') }) it('can release users', () => { @@ -368,7 +368,7 @@ describe('ContentMenu.vue', () => { .filter(item => item.text() === 'release.user.title') .at(0) .trigger('click') - expect(openModalSpy).toHaveBeenCalledWith('release', 'd23a4265-f5f7-4e17-9f86-85f714b4b9f8') + expect(openModalSpy).toHaveBeenCalledWith('release') }) it('can release organizations', () => { @@ -386,7 +386,7 @@ describe('ContentMenu.vue', () => { .filter(item => item.text() === 'release.organization.title') .at(0) .trigger('click') - expect(openModalSpy).toHaveBeenCalledWith('release', 'd23a4265-f5f7-4e17-9f86-85f714b4b9f8') + expect(openModalSpy).toHaveBeenCalledWith('release') }) }) diff --git a/webapp/components/DropdownFilter/DropdownFilter.spec.js b/webapp/components/DropdownFilter/DropdownFilter.spec.js index 8020a487f..8fb1b408f 100644 --- a/webapp/components/DropdownFilter/DropdownFilter.spec.js +++ b/webapp/components/DropdownFilter/DropdownFilter.spec.js @@ -64,9 +64,9 @@ describe('DropdownFilter.vue', () => { expect(unreadLink.text()).toEqual('Unread') }) - it('clicking on menu item emits filterNotifications', () => { + it('clicking on menu item emits filter', () => { allLink.trigger('click') - expect(wrapper.emitted().filterNotifications[0]).toEqual( + expect(wrapper.emitted().filter[0]).toEqual( propsData.filterOptions.filter(option => option.label === 'All'), ) }) diff --git a/webapp/components/DropdownFilter/DropdownFilter.story.js b/webapp/components/DropdownFilter/DropdownFilter.story.js index 0703c5c47..9bd750ac1 100644 --- a/webapp/components/DropdownFilter/DropdownFilter.story.js +++ b/webapp/components/DropdownFilter/DropdownFilter.story.js @@ -20,10 +20,10 @@ storiesOf('DropdownFilter', module) selected: filterOptions[0].label, }), methods: { - filterNotifications: action('filterNotifications'), + filter: action('filter'), }, template: ``, diff --git a/webapp/components/_new/generic/ReportsTable/ReportsTable.vue b/webapp/components/_new/generic/ReportsTable/ReportsTable.vue index 337e6097d..fcafe131a 100644 --- a/webapp/components/_new/generic/ReportsTable/ReportsTable.vue +++ b/webapp/components/_new/generic/ReportsTable/ReportsTable.vue @@ -64,7 +64,6 @@ params: params(report.resource), hash: hashParam(report.resource), }" - @click.native="markNotificationAsRead(report.resource.id)" > {{ report.resource.title || report.resource.contentExcerpt | truncate(50) }} diff --git a/webapp/pages/notifications/index.spec.js b/webapp/pages/notifications/index.spec.js index 61af56f63..66f68aac7 100644 --- a/webapp/pages/notifications/index.spec.js +++ b/webapp/pages/notifications/index.spec.js @@ -71,7 +71,7 @@ describe('PostIndex', () => { } }) - describe('filterNotifications', () => { + describe('filter', () => { beforeEach(() => { propsData.filterOptions = [ { label: 'All', value: null }, @@ -79,7 +79,7 @@ describe('PostIndex', () => { { label: 'Unread', value: false }, ] wrapper = Wrapper() - wrapper.find(DropdownFilter).vm.$emit('filterNotifications', propsData.filterOptions[1]) + wrapper.find(DropdownFilter).vm.$emit('filter', propsData.filterOptions[1]) }) it('sets `notificationRead` to value of received option', () => {