CFE-17 Fixed bug test
This commit is contained in:
@@ -7,7 +7,7 @@ describe("PreviousOperatorData Component From call history", () => {
|
||||
describe("Rendering", () => {
|
||||
const historyItem = {
|
||||
operator_full_name: "test name",
|
||||
created_at: "2023-11-19T10:32:48.000000Z"
|
||||
created_at: "2023-11-19T10:32:48"
|
||||
}
|
||||
it("operator name rendered", () => {
|
||||
render(<MockAppWithProviders><PreviousOperatorData historyItem={historyItem}/></MockAppWithProviders>);
|
||||
@@ -15,9 +15,9 @@ describe("PreviousOperatorData Component From call history", () => {
|
||||
expect(operatorName).toBeInTheDocument();
|
||||
});
|
||||
it("operator answer date rendered", () => {
|
||||
console.log(moment(historyItem.created_at).locale('fa').format("HH:mm:ss | YYYY/MM/DD"))
|
||||
const dateTime = moment(historyItem.created_at).locale('fa').format("HH:mm:ss | YYYY/MM/DD")
|
||||
render(<MockAppWithProviders><PreviousOperatorData historyItem={historyItem}/></MockAppWithProviders>);
|
||||
const operatorAnswerDate = screen.queryByText("14:02:48 | 1402/08/28");
|
||||
const operatorAnswerDate = screen.queryByText(dateTime);
|
||||
expect(operatorAnswerDate).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user