mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-03-31 03:55:43 +00:00
- Introduced a new test suite for App propagation sync metrics, validating toast notifications for sync status. - Enhanced ConfirmDialog tests to verify heading display and button attributes. - Added additional tests for FormLabel, FormSubLabel, LanguageSelector, and other components to improve test coverage and ensure proper functionality.
30 lines
937 B
JavaScript
30 lines
937 B
JavaScript
import { mount } from "@vue/test-utils";
|
|
import { describe, it, expect } from "vitest";
|
|
import FormSubLabel from "@/components/forms/FormSubLabel.vue";
|
|
|
|
describe("FormSubLabel.vue", () => {
|
|
it("renders slot content", () => {
|
|
const wrapper = mount(FormSubLabel, {
|
|
slots: {
|
|
default: "Sub Label Text",
|
|
},
|
|
});
|
|
expect(wrapper.text()).toBe("Sub Label Text");
|
|
});
|
|
|
|
it("has correct classes", () => {
|
|
const wrapper = mount(FormSubLabel);
|
|
expect(wrapper.classes()).toContain("text-xs");
|
|
});
|
|
|
|
it("uses div as root element", () => {
|
|
const wrapper = mount(FormSubLabel, { slots: { default: "Help" } });
|
|
expect(wrapper.element.tagName).toBe("DIV");
|
|
});
|
|
|
|
it("renders empty when slot is empty", () => {
|
|
const wrapper = mount(FormSubLabel, { slots: { default: "" } });
|
|
expect(wrapper.text()).toBe("");
|
|
});
|
|
});
|