Newer
Older
smart-home-server / webclient-vue / src / components / feedback / __tests__ / AppLoadingState.spec.js
@Eugene Sukhodolskiy Eugene Sukhodolskiy 1 day ago 524 bytes Add script detail pages with scope grouping
import { describe, it, expect } from "vitest";
import { mount } from "@vue/test-utils";
import AppLoadingState from "../AppLoadingState.vue";

describe("AppLoadingState", () => {
  it("renders default label", () => {
    const wrapper = mount(AppLoadingState);

    expect(wrapper.text()).toContain("Loading");
  });

  it("renders custom label from prop", () => {
    const wrapper = mount(AppLoadingState, {
      props: { text: "Fetching data" },
    });

    expect(wrapper.text()).toContain("Fetching data");
  });
});