@@ -108,39 +108,41 @@ describe("[ EllipseProgressContainer.vue ]", () => {
108
108
expect ( spanWrapper . classes ( ) ) . to . include ( "applied-class" ) ;
109
109
} ) ;
110
110
} ) ;
111
+ // FIXME: blocked by vue-test-utils v2 beta
111
112
/* describe("#slots", () => {
112
113
describe("#legend-value", () => {
113
114
it("renders provided slot content", () => {
114
115
const wrapper = mount(VueEllipseProgress, {
115
116
props: { progress: 50 },
116
117
slots: {
117
- "legend-value" : '<span id="my-slot">Hello Circle</span>',
118
+ legendValue : '<span id="my-slot">Hello Circle</span>',
118
119
},
119
120
});
120
- expect(wrapper.get("#my-slot"));
121
+ const c = wrapper.vm.$slots;
122
+ expect(wrapper.find("#my-slot").exists()).to.be.true;
121
123
});
122
124
});
123
125
describe("#legend-caption", () => {
124
126
it("renders provided slot content", () => {
125
127
const wrapper = mount(VueEllipseProgress, {
126
128
props: { progress: 50 },
127
129
slots: {
128
- "legend-caption": '<span id="my-slot">Hello Circle</span>',
130
+ "legend-caption": '<span id="my-caption- slot">Hello Circle</span>',
129
131
},
130
132
});
131
- expect(wrapper.get("#my-slot"));
133
+ expect(wrapper.get("#my-caption- slot"));
132
134
});
133
135
});
134
136
describe("#default", () => {
135
- const wrapper = factory(
136
- { progress: 35, animation: "default 0 0" },
137
- {
138
- default : `
137
+ const wrapper = mount(VueEllipseProgress, {
138
+ props: { progress: 35, animation: "default 0 0" },
139
+ slots: {
140
+ scoped : `
139
141
<template #default="counterParams" >
140
142
<span class="my-formatter-slot">Formatted {{ counterParams.counterTick.currentValue }}</span>
141
143
</template>`,
142
- }
143
- );
144
+ },
145
+ } );
144
146
145
147
it("renders provided slot", () => {
146
148
expect(wrapper.find(".my-formatter-slot").exists()).to.be.true;
0 commit comments