Merge pull request #4600 from FlipWarthog/test-fix

Fix #4599 - PR Checker build failing
pull/4572/head
Tuğçe Küçükoğlu 2023-10-13 15:15:49 +03:00 committed by GitHub
commit eda7998d92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 3 deletions

View File

@ -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>`);
}); });
}); });

View File

@ -37,7 +37,7 @@ describe('Rating.vue', () => {
it('When star is clicked, onOptionClick method should triggered', async () => { it('When star is clicked, onOptionClick method should triggered', async () => {
await wrapper.find('.p-rating-item').trigger('click'); 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 () => { it('When input focused, focusedOptionIndex value should changed', async () => {

View File

@ -80,7 +80,10 @@ export default {
}, },
methods: { methods: {
onDropdownButtonClick(event) { onDropdownButtonClick(event) {
event.preventDefault(); if (event) {
event.preventDefault();
}
this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el }); this.$refs.menu.toggle({ currentTarget: this.$el, relatedTarget: this.$refs.button.$el });
this.isExpanded = this.$refs.menu.visible; this.isExpanded = this.$refs.menu.visible;
}, },

View File

@ -11,6 +11,9 @@ export default mergeConfig(
test: { test: {
globals: true, globals: true,
environment: 'jsdom', environment: 'jsdom',
onConsoleLog: (log, type) => {
if (type === 'stderr' && log.includes('Could not parse CSS stylesheet')) return false;
},
coverage: { coverage: {
provider: 'istanbul', provider: 'istanbul',
reporter: ['text', 'json', 'html'] reporter: ['text', 'json', 'html']