From 23e30fcb1a0d8492fb93b53716b4a4c48ad00903 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:14:56 +0530 Subject: [PATCH] feat: Delete `bulkActionsMixin` (#9800) # Pull Request Template ## Description This PR will remove the `bulkActionsMixin` usage. Seems like it is not used anywhere. Fixes https://linear.app/chatwoot/issue/CW-3453/delete-bulkactionsmixin ## Type of change - [x] New feature (non-breaking change which adds functionality) ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules Co-authored-by: Sojan Jose --- .../dashboard/mixins/bulkActionsMixin.js | 15 --------------- .../mixins/specs/bulkActions.spec.js | 19 ------------------- 2 files changed, 34 deletions(-) delete mode 100644 app/javascript/dashboard/mixins/bulkActionsMixin.js delete mode 100644 app/javascript/dashboard/mixins/specs/bulkActions.spec.js diff --git a/app/javascript/dashboard/mixins/bulkActionsMixin.js b/app/javascript/dashboard/mixins/bulkActionsMixin.js deleted file mode 100644 index 129fc7913..000000000 --- a/app/javascript/dashboard/mixins/bulkActionsMixin.js +++ /dev/null @@ -1,15 +0,0 @@ -export default { - props: { - trianglePosition: { - type: String, - default: '0', - }, - }, - computed: { - cssVars() { - return { - '--triangle-position': this.trianglePosition + 'rem', - }; - }, - }, -}; diff --git a/app/javascript/dashboard/mixins/specs/bulkActions.spec.js b/app/javascript/dashboard/mixins/specs/bulkActions.spec.js deleted file mode 100644 index c6f096dae..000000000 --- a/app/javascript/dashboard/mixins/specs/bulkActions.spec.js +++ /dev/null @@ -1,19 +0,0 @@ -import { mount } from '@vue/test-utils'; -import bulkActionsMixin from '../bulkActionsMixin'; -describe('bulkActionsMixin', () => { - it('returns the prop and computed values for triangle position:', async () => { - const Component = { - render() {}, - title: 'MyComponent', - mixins: [bulkActionsMixin], - }; - const wrapper = mount(Component); - await wrapper.setProps({ - trianglePosition: '10', - }); - expect(wrapper.props().trianglePosition).toEqual('10'); - expect(wrapper.vm.cssVars).toEqual({ - '--triangle-position': '10rem', - }); - }); -});