Skip to content

Commit

Permalink
fix: linting test file for Status
Browse files Browse the repository at this point in the history
  • Loading branch information
suwarnoong authored and ChristianKienle committed Mar 7, 2019
1 parent 41e73a1 commit a40e746
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions ui/src/components/Status/__tests__/Status.test.ts
@@ -1,47 +1,47 @@
import { shallowMount } from "@vue/test-utils";
import Status from '../Status.vue';
import Status from "../Status.vue";
import { assert } from "chai";

describe("Status test scripts", () => {
test("Renders correctly", () => {
const statusIcon = "available";
const type = "success";
const status = shallowMount(Status,{
propsData : {
statusIcon, type
}
});
expect(status.element).toMatchSnapshot();
test("Renders correctly", () => {
const statusIcon = "available";
const type = "success";
const status = shallowMount(Status, {
propsData: {
statusIcon,
type
}
});
expect(status.element).toMatchSnapshot();
});

test("Default slot rendering test", () => {
const slotText = "Status Slot Text";
const status = shallowMount(Status, {
slots: {
default : slotText
}
});
expect(status.text()).toBe(slotText);
test("Default slot rendering test", () => {
const slotText = "Status Slot Text";
const status = shallowMount(Status, {
slots: {
default: slotText
}
});
expect(status.text()).toBe(slotText);
});

test("Status indicator with built in status icon test", () => {
const statusIcon = "offline";
const status = shallowMount(Status, {
propsData : {
statusIcon
}
});
assert(status.classes(`fd-status-label--${statusIcon}`));
test("Status indicator with built in status icon test", () => {
const statusIcon = "offline";
const status = shallowMount(Status, {
propsData: {
statusIcon
}
});
assert(status.classes(`fd-status-label--${statusIcon}`));
});

test("Status indicator with semantic colors", () => {
const type = "warning";
const status = shallowMount(Status, {
propsData : {
type
}
});
assert(status.classes(`fd-status-label--${type}`));

test("Status indicator with semantic colors", () => {
const type = "warning";
const status = shallowMount(Status, {
propsData: {
type
}
});
});
assert(status.classes(`fd-status-label--${type}`));
});
});

0 comments on commit a40e746

Please sign in to comment.