CFE-18 fix test and add desc testing

This commit is contained in:
2023-11-20 12:17:13 +03:30
parent 1c5ec9d2a8
commit 98e240ae49

View File

@@ -6,7 +6,8 @@ describe("Topics Component From call history", () => {
describe("Rendering", () => {
const historyItem = {
category_name: "test category",
subcategory_name: "test sub category"
subcategory_name: "test sub category",
description: "test desc"
}
it("operator name rendered", () => {
render(<MockAppWithProviders><Topics historyItem={historyItem}/></MockAppWithProviders>);
@@ -18,5 +19,10 @@ describe("Topics Component From call history", () => {
const operatorAnswerDate = screen.queryByText("test sub category");
expect(operatorAnswerDate).toBeInTheDocument();
});
it("operator description rendered", () => {
render(<MockAppWithProviders><Topics historyItem={historyItem}/></MockAppWithProviders>);
const operatorAnswerDate = screen.queryByText("test desc");
expect(operatorAnswerDate).toBeInTheDocument();
});
});
});