Skip to content

Commit

Permalink
Added an extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
nkylstad committed Nov 5, 2023
1 parent 4a6cf77 commit 9f21869
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,37 @@ describe('AppDeploymentComponent', () => {
).toBeInTheDocument();
});

it('should handle build.finished as null when latest deploy has status failed but app is reachable', () => {
const deployHistory: IDeployment[] = [
{
app: 'test-app',
created: new Date().toDateString(),
createdBy: 'test-user',
envName: 'testEnv',
id: 'test-id',
org: 'test-org',
tagName: 'testTag',
build: {
id: 'test-id',
finished: null,
result: 'failed',
status: 'Completed',
started: new Date().toDateString(),
},
deployedInEnv: true,
},
];
render({ deployHistory });
expect(
screen.getByText(
textMock('app_publish.deployment_in_env.status_missing', {
envName: 'testEnv',
tagName: 'testTag',
}),
),
).toBeInTheDocument();
});

it('should render deploy dropdown with image options', async () => {
const imageOptions: ImageOption[] = [
{
Expand Down

0 comments on commit 9f21869

Please sign in to comment.