Browse Source

test: update popover snap

pull/2682/head
tanjinzhou 4 years ago
parent
commit
2975bcfac1
  1. 2
      antdv-demo
  2. 12
      components/popover/__tests__/__snapshots__/index.test.js.snap
  3. 10
      components/popover/__tests__/index.test.js
  4. 2
      examples/App.vue

2
antdv-demo

@ -1 +1 @@
Subproject commit ea1f79e54d2bcd38bfd8fb60cc9d2954c2c3d467
Subproject commit d06ed922918a388241c8709c66cdbd6543eaf54e

12
components/popover/__tests__/__snapshots__/index.test.js.snap

@ -2,8 +2,10 @@
exports[`Popover should show overlay when trigger is clicked 1`] = `
<div class="ant-popover-content">
<div class="ant-popover-arrow"></div>
<div role="tooltip" class="ant-popover-inner">
<div class="ant-popover-arrow">
<!---->
</div>
<div class="ant-popover-inner" role="tooltip">
<div>
<div class="ant-popover-title">code</div>
<div class="ant-popover-inner-content">console.log('hello world')</div>
@ -14,8 +16,10 @@ exports[`Popover should show overlay when trigger is clicked 1`] = `
exports[`Popover should show overlay when trigger is clicked 2`] = `
<div class="ant-popover-content">
<div class="ant-popover-arrow"></div>
<div role="tooltip" class="ant-popover-inner">
<div class="ant-popover-arrow">
<!---->
</div>
<div class="ant-popover-inner" role="tooltip">
<div>
<div class="ant-popover-title">code</div>
<div class="ant-popover-inner-content">console.log('hello world')</div>

10
components/popover/__tests__/index.test.js

@ -4,7 +4,15 @@ import Popover from '..';
import mountTest from '../../../tests/shared/mountTest';
describe('Popover', () => {
mountTest(Popover);
mountTest({
render() {
return (
<div>
<Popover />
</div>
);
},
});
it('should show overlay when trigger is clicked', async () => {
const popover = mount(
{

2
examples/App.vue

@ -4,7 +4,7 @@
</div>
</template>
<script>
import demo from '../antdv-demo/docs/popconfirm/demo/index';
import demo from '../antdv-demo/docs/popover/demo/index';
export default {
components: {

Loading…
Cancel
Save