Skip to content

Commit

Permalink
replace @update event with @click in AddOnFilters.vue and updated tes…
Browse files Browse the repository at this point in the history
…t case
  • Loading branch information
prakhyatox committed Dec 9, 2024
1 parent f77db0f commit 5f10280
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Others/AddOnFilters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
:value="field.value"
color="primary"
:label="field.label"
@update:model-value="checkCheckbox()"
data-testid="checkCheckbox"
@click="checkCheckbox($event)"
>
<template #prepend>
<Tooltip
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/components/Others/AddOnFilters.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ describe("AddOnFilters.vue", function(){
});

it("can check checkCheckbox method", async() => {
const checkCheckbox = wrapper.get("[data-testid='checkCheckbox']");
checkCheckbox.trigger('click');
await wrapper.vm.checkCheckbox()
expect(wrapper.vm.loading).toBe(false);
});
Expand Down

0 comments on commit 5f10280

Please sign in to comment.