Skip to content

Commit

Permalink
Merge pull request #4600 from FlipWarthog/test-fix
Browse files Browse the repository at this point in the history
Fix #4599 - PR Checker build failing
  • Loading branch information
tugcekucukoglu authored Oct 13, 2023
2 parents 730c615 + bc4d879 commit eda7998
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/lib/button/Button.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ describe('Button.vue', () => {
}
});

expect(wrapper.html()).toBe(`<button class="p-button p-component" type="button" data-pc-name="button" data-pc-section="root" data-pd-ripple="true"><span class="ml-2 font-bold">Default PrimeVue Button</span></button>`);
expect(wrapper.html()).toBe(`<button class="p-button p-component" type="button" data-pc-name="button" data-pc-section="root"><span class="ml-2 font-bold">Default PrimeVue Button</span></button>`);
});
});
2 changes: 1 addition & 1 deletion components/lib/rating/Rating.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Rating.vue', () => {
it('When star is clicked, onOptionClick method should triggered', async () => {
await wrapper.find('.p-rating-item').trigger('click');

expect(wrapper.find('.p-focus').exists()).toBe(true);
expect(wrapper.find('[data-p-focused="true"]').exists()).toBe(true);
});

it('When input focused, focusedOptionIndex value should changed', async () => {
Expand Down
5 changes: 4 additions & 1 deletion components/lib/splitbutton/SplitButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ export default {
},
methods: {
onDropdownButtonClick(event) {
event.preventDefault();
if (event) {
event.preventDefault();
}
this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });
this.isExpanded = this.$refs.menu.visible;
},
Expand Down
3 changes: 3 additions & 0 deletions vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default mergeConfig(
test: {
globals: true,
environment: 'jsdom',
onConsoleLog: (log, type) => {
if (type === 'stderr' && log.includes('Could not parse CSS stylesheet')) return false;
},
coverage: {
provider: 'istanbul',
reporter: ['text', 'json', 'html']
Expand Down

0 comments on commit eda7998

Please sign in to comment.