Skip to content

Commit 6c526c8

Browse files
committed
test: fix #determinate tests
1 parent da051d1 commit 6c526c8

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

tests/unit/circle/circle.spec.js

+12-20
Original file line numberDiff line numberDiff line change
@@ -195,32 +195,24 @@ describe("[ CircleProgress.vue | HalfCircleProgress.vue ]", () => {
195195
it("renders the loading circle", () => {
196196
expect(wrapper.find(".ep-circle--loader").exists()).to.be.true;
197197
});
198-
});
199-
/* describe("#determinate", () => {
200-
const progress = 60;
201-
const color = "gray";
202-
const thickness = 15;
203-
const wrapper = localFactory({
204-
progress,
205-
color,
206-
thickness,
207-
determinate: true,
198+
it("loader circle has the loading animation class", () => {
199+
expect(wrapper.find(".animation__loading").exists()).to.be.true;
208200
});
201+
});
202+
describe("#determinate", () => {
203+
const wrapper = localFactory({ determinate: true });
209204

210-
it("shows the loading circle", () => {
205+
it("loader circle has the loading animation class", () => {
211206
expect(wrapper.find(".animation__loading").exists()).to.be.true;
212207
});
213-
it("applies same styles to loading circle as to progress circle", () => {
214-
const determinateCircleWrapper = wrapper.find(".animation__loading");
215-
expect(determinateCircleWrapper.element.getAttribute("stroke")).to.equal(`${color}`);
216-
expect(determinateCircleWrapper.element.getAttribute("stroke-width")).to.equal(`${thickness}`);
217-
expect(determinateCircleWrapper.element.getAttribute("fill")).to.equal("transparent");
208+
it("renders the loading circle", () => {
209+
expect(wrapper.find(".ep-circle--loader").exists()).to.be.true;
218210
});
219-
it("applies 0.45 opacity to loading circle container", () => {
220-
const determinateCircleWrapper = wrapper.find(".ep-circle--loading__container");
221-
expect(determinateCircleWrapper.element.style.opacity).to.equal("0.45");
211+
it("applies default 0.55 opacity to loading circle container", () => {
212+
const determinateCircleWrapper = wrapper.find(".ep-circle--loader__container");
213+
expect(determinateCircleWrapper.element.style.opacity).to.equal("0.55");
222214
});
223-
}); */
215+
});
224216
describe("#angle", () => {
225217
const circleWrapper = localFactory({ progress: 50 });
226218
it("sets the rotation of the svg container to default, if not defined", () => {

0 commit comments

Comments
 (0)