[new feature] Cell: add label slot (#2956)

This commit is contained in:
neverland
2019-03-12 20:34:17 +08:00
committed by GitHub
parent d4a5644e88
commit a4eedac8b1
5 changed files with 55 additions and 4 deletions

View File

@@ -14,3 +14,31 @@ test('click event', () => {
wrapper.trigger('click');
expect(click.mock.calls.length).toBeTruthy();
});
test('arrow direction', () => {
const wrapper = mount(Cell, {
propsData: {
isLink: true,
arrowDirection: 'down'
}
});
expect(wrapper).toMatchSnapshot();
});
test('render slot', () => {
const wrapper = mount({
template: `
<cell>
<template v-slot:title>Custom Title</template>
<template v-slot:label>Custom Label</template>
<template v-slot:extra>Custom Extra</template>
</cell>
`,
components: {
Cell
}
});
expect(wrapper).toMatchSnapshot();
});