tests: add missing card set title test (#3190)

This commit is contained in:
Alexandr Garbuzov
2023-09-04 11:11:28 +03:00
committed by GitHub
parent 13af3ba4df
commit 7a6ed4d8a8
+10
View File
@@ -41,6 +41,16 @@ describe("Card", () => {
);
});
it("should set custom title", () => {
const card = new Card({});
card.setTitle("custom title");
document.body.innerHTML = card.render(``);
expect(queryByTestId(document.body, "card-title")).toHaveTextContent(
"custom title",
);
});
it("should hide title", () => {
const card = new Card({});
card.setHideTitle(true);