Fixed failed tests
parent
de7c737ba2
commit
d0ec2bc110
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<li v-if="visible()" :class="containerClass()" v-bind="ptm('menuitem')">
|
<li v-if="visible()" :class="containerClass()" v-bind="ptm('menuitem')">
|
||||||
<template v-if="!templates.item">
|
<template v-if="!templates || !templates.item">
|
||||||
<router-link v-if="item.to" v-slot="{ navigate, href, isActive, isExactActive }" :to="item.to" custom>
|
<router-link v-if="item.to" v-slot="{ navigate, href, isActive, isExactActive }" :to="item.to" custom>
|
||||||
<a :href="href" :class="linkClass({ isActive, isExactActive })" :aria-current="isCurrentUrl()" @click="onClick($event, navigate)" v-bind="ptm('action')">
|
<a :href="href" :class="linkClass({ isActive, isExactActive })" :aria-current="isCurrentUrl()" @click="onClick($event, navigate)" v-bind="ptm('action')">
|
||||||
<component v-if="templates.itemicon" :is="templates.itemicon" :item="item" class="p-menuitem-icon" />
|
<component v-if="templates.itemicon" :is="templates.itemicon" :item="item" class="p-menuitem-icon" />
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
</a>
|
</a>
|
||||||
</router-link>
|
</router-link>
|
||||||
<a v-else :href="item.url || '#'" :class="linkClass()" :target="item.target" :aria-current="isCurrentUrl()" @click="onClick" v-bind="ptm('action')">
|
<a v-else :href="item.url || '#'" :class="linkClass()" :target="item.target" :aria-current="isCurrentUrl()" @click="onClick" v-bind="ptm('action')">
|
||||||
<component v-if="templates.itemicon" :is="templates.itemicon" :item="item" class="p-menuitem-icon" />
|
<component v-if="templates && templates.itemicon" :is="templates.itemicon" :item="item" class="p-menuitem-icon" />
|
||||||
<span v-else-if="item.icon" :class="['p-menuitem-icon', item.icon]" v-bind="ptm('icon')" />
|
<span v-else-if="item.icon" :class="['p-menuitem-icon', item.icon]" v-bind="ptm('icon')" />
|
||||||
<span v-if="item.label" class="p-menuitem-text" v-bind="ptm('label')">{{ label() }}</span>
|
<span v-if="item.label" class="p-menuitem-text" v-bind="ptm('label')">{{ label() }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -79,8 +79,6 @@ describe('Button.vue', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(wrapper.html()).toBe(`<button class="p-button p-component" type="button"><span class="ml-2 font-bold">Default PrimeVue Button</span>
|
expect(wrapper.html()).toBe(`<button class="p-button p-component" type="button"><span class="ml-2 font-bold">Default PrimeVue Button</span></button>`);
|
||||||
<!--v-if-->
|
|
||||||
</button>`);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -32,11 +32,11 @@ describe('Password.vue', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should meter update', async () => {
|
it('should meter update', async () => {
|
||||||
expect(wrapper.find('.p-password-info').text()).toBe('');
|
expect(wrapper.find('.p-password-info').text()).toBe('Enter a password');
|
||||||
|
|
||||||
await wrapper.vm.onKeyUp(event);
|
await wrapper.vm.onKeyUp(event);
|
||||||
|
|
||||||
expect(wrapper.find('.p-password-info').text()).toBe('');
|
expect(wrapper.find('.p-password-info').text()).toBe('Weak');
|
||||||
|
|
||||||
expect(wrapper.find('.p-password-strength').classes()).toContain('weak');
|
expect(wrapper.find('.p-password-strength').classes()).toContain('weak');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue