Skip to content

Commit

Permalink
Add FE test
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Sep 27, 2024
1 parent 669a1f3 commit c505938
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,25 @@ describe('WorkflowExecutionsCard', () => {
}
},
);

test('displays correct text for new execution', () => {
const createdAt = new Date('2024-09-27T12:00:00Z');
const props = {
execution: {
id: '1',
mode: 'manual',
status: 'new',
createdAt: createdAt.toISOString(),
},
workflowPermissions: {
execute: true,
},
};

const { getByTestId } = renderComponent({ props });

const executionTimeElement = getByTestId('execution-time');
expect(executionTimeElement).toBeVisible();
expect(executionTimeElement.textContent).toBe('27 Sep - Starting soon');
});
});

0 comments on commit c505938

Please sign in to comment.