mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Components update v.3.21.0
This commit is contained in:
parent
18497d55b1
commit
defd6ff6e2
242 changed files with 28022 additions and 17523 deletions
|
@ -1,4 +1,4 @@
|
|||
import PrimeVue from '../config/PrimeVue';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import ConfirmDialog from './ConfirmDialog.vue';
|
||||
|
||||
|
@ -18,12 +18,13 @@ describe('ConfirmDialog', () => {
|
|||
message: 'Are you sure you want to proceed?',
|
||||
header: 'Confirmation',
|
||||
icon: 'pi pi-exclamation-triangle'
|
||||
}
|
||||
},
|
||||
visible: true
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
await wrapper.setData({ visible: true });
|
||||
await wrapper.vm.$nextTick();
|
||||
|
||||
expect(wrapper.find('.p-dialog-mask .p-dialog.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-dialog-title').text()).toBe('Confirmation');
|
||||
|
@ -57,15 +58,15 @@ describe('ConfirmDialog', () => {
|
|||
// eslint-disable-next-line no-console
|
||||
console.log('reject');
|
||||
}
|
||||
}
|
||||
},
|
||||
visible: true
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
const acceptTriggered = vi.spyOn(wrapper.componentVM.confirmation, 'accept');
|
||||
|
||||
await wrapper.setData({ visible: true });
|
||||
await wrapper.vm.$nextTick();
|
||||
|
||||
const acceptTriggered = jest.spyOn(wrapper.componentVM.confirmation, 'accept');
|
||||
const CDAcceptBtn = wrapper.find('.p-confirm-dialog-accept');
|
||||
|
||||
await CDAcceptBtn.trigger('click');
|
||||
|
@ -96,15 +97,15 @@ describe('ConfirmDialog', () => {
|
|||
// eslint-disable-next-line no-console
|
||||
console.log('reject');
|
||||
}
|
||||
}
|
||||
},
|
||||
visible: true
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
const rejectTriggered = vi.spyOn(wrapper.componentVM.confirmation, 'reject');
|
||||
|
||||
await wrapper.setData({ visible: true });
|
||||
await wrapper.vm.$nextTick();
|
||||
|
||||
const rejectTriggered = jest.spyOn(wrapper.componentVM.confirmation, 'reject');
|
||||
const CDRejectBtn = wrapper.find('.p-confirm-dialog-reject');
|
||||
|
||||
await CDRejectBtn.trigger('click');
|
||||
|
@ -127,12 +128,13 @@ describe('ConfirmDialog', () => {
|
|||
message: 'Are you sure you want to proceed?',
|
||||
header: 'Confirmation',
|
||||
icon: 'pi pi-exclamation-triangle'
|
||||
}
|
||||
},
|
||||
visible: true
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
await wrapper.setData({ visible: true });
|
||||
await wrapper.vm.$nextTick();
|
||||
|
||||
const dialogCloseBtn = wrapper.find('.p-dialog-header-close');
|
||||
|
||||
|
@ -158,12 +160,13 @@ describe('ConfirmDialog', () => {
|
|||
header: 'Delete Confirmation',
|
||||
icon: 'pi pi-info-circle',
|
||||
position: 'bottom'
|
||||
}
|
||||
},
|
||||
visible: true
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
await wrapper.setData({ visible: true });
|
||||
await wrapper.vm.$nextTick();
|
||||
|
||||
expect(wrapper.find('.p-dialog-mask.p-dialog-bottom').exists()).toBe(true);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue