Skip to content

Commit

Permalink
Merge pull request #351 from DanaOrr/fixing-vm-conditions-column
Browse files Browse the repository at this point in the history
Fixing the conditions column in vm
  • Loading branch information
openshift-merge-robot committed May 1, 2022
2 parents 44c1c5b + 26bf972 commit 9a11cd9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const VMStatusConditionLabel: React.FC<V1VirtualMachineCondition> = React
<Popover
position={PopoverPosition.top}
aria-label="Condition Popover"
bodyContent={() => <div>{condition?.message}</div>}
bodyContent={() => <div>{condition?.message ?? condition?.reason}</div>}
>
<Label
color="grey"
Expand All @@ -19,7 +19,7 @@ export const VMStatusConditionLabel: React.FC<V1VirtualMachineCondition> = React
e.preventDefault();
}}
>
{condition?.reason}={condition?.status}
{condition?.type}={condition?.status}
</Label>
</Popover>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test('VMStatusConditionLabel', async () => {
expect(firstRender).toMatchSnapshot();

// click on condition to open popover
fireEvent.click(getByText(`${reason}=${status}`));
fireEvent.click(getByText(`${type}=${status}`));
const popoverMessage = await screen.findByText(message);

expect(popoverMessage).toHaveTextContent(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`VMStatusConditionLabel 1`] = `
<span
class="pf-c-label__text"
>
no_vmi=true
Failure=true
</span>
</a>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports[`Render VMStatusConditionLabelList 1`] = `
<span
class="pf-c-label__text"
>
no_vmi=true
Failure=true
</span>
</a>
</span>
Expand All @@ -44,7 +44,7 @@ exports[`Render VMStatusConditionLabelList 1`] = `
<span
class="pf-c-label__text"
>
ready=true
Ready=true
</span>
</a>
</span>
Expand Down

0 comments on commit 9a11cd9

Please sign in to comment.