Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4599 - PR Checker build failing #4600

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still investigating this. I think it's just a ripple config change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Investigated, ripple is disabled in the default configs which the tests are using so this is a correct assert.

});
});
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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p-focus is not added on click, just keyboard nav, so looking for the data attribute instead.

});

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();
}
Comment on lines +83 to +85
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test was failing with event undefined due to the call on line 92.


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
Loading