mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Popconfirm: Add popconfirm component (#17548)
* init * init * init docs * init docs2 * init type * update test * update naming
This commit is contained in:
29
test/unit/specs/popconfirm.spec.js
Normal file
29
test/unit/specs/popconfirm.spec.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import { createVue, destroyVM } from '../util';
|
||||
|
||||
describe('Popconfirm', () => {
|
||||
let vm;
|
||||
afterEach(() => {
|
||||
destroyVM(vm);
|
||||
});
|
||||
|
||||
describe('trigger', () => {
|
||||
const createVM = () => {
|
||||
return createVue(`
|
||||
<div>
|
||||
<el-popconfirm
|
||||
ref="popover"
|
||||
title="content">
|
||||
<button slot="reference">trigger</button>
|
||||
</el-popconfirm>
|
||||
</div>
|
||||
`, true);
|
||||
};
|
||||
it('click', () => {
|
||||
vm = createVM();
|
||||
vm.$el.querySelector('button').click();
|
||||
document.body.click();
|
||||
expect(document.body.querySelector('.el-popconfirm__action').style.display).to.equal('');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user