Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

πŸ§ͺ Fix test for item link

Alicia Sykesf9b80f783723
diff --git a/tests/components/item.test.js b/tests/components/item.test.js
index 0c68e364..64e14322 100644
--- a/tests/components/item.test.js
+++ b/tests/components/item.test.js
@@ -427,21 +427,18 @@ describe('Methods: getTooltipOptions', () => {
});
describe('Methods: openItemSettings / closeEditMenu', () => {
- it('openItemSettings sets editMenuOpen, shows modal, commits SET_MODAL_OPEN', () => {
+ it('openItemSettings sets editMenuOpen and commits SET_MODAL_OPEN(true)', () => {
const { wrapper, mutations } = mountItem();
wrapper.vm.openItemSettings();
expect(wrapper.vm.editMenuOpen).toBe(true);
- expect(wrapper.vm.$modal.show).toHaveBeenCalledWith('EDIT_ITEM');
expect(mutations.SET_MODAL_OPEN).toHaveBeenCalledWith(expect.anything(), true);
});
- it('closeEditMenu clears editMenuOpen, hides modal, commits SET_MODAL_OPEN(false)', () => {
- const { wrapper, mutations } = mountItem();
+ it('closeEditMenu clears editMenuOpen', () => {
+ const { wrapper } = mountItem();
wrapper.vm.editMenuOpen = true;
wrapper.vm.closeEditMenu();
expect(wrapper.vm.editMenuOpen).toBe(false);
- expect(wrapper.vm.$modal.hide).toHaveBeenCalledWith('EDIT_ITEM');
- expect(mutations.SET_MODAL_OPEN).toHaveBeenCalledWith(expect.anything(), false);
});
});