Test: rename create-image-action data-testid

The data-testid for the Create image button in the empty state has been
renamed from create-image-action has been renamed to create-image-action-empty-state.

The test `renders EmptyState child component` started failing after changing
isBeta() from false to true in the useChrome() mocking function.

It was failing because the findBy query selector was able to find two
components with this data-testid, which was truly the case - the Create
Image button in the table header, and the Create Image button in the
empty state.

I have no explanation for why this test wasn't failing before.
This commit is contained in:
lucasgarfield 2024-03-05 15:40:07 +01:00 committed by Lucas Garfield
parent d6016519e5
commit baddf66273
2 changed files with 2 additions and 2 deletions

View file

@ -89,7 +89,7 @@ const EmptyImagesTable = () => {
<Link
to={resolveRelPath('imagewizard')}
className="pf-c-button pf-m-primary"
data-testid="create-image-action"
data-testid="create-image-action-empty-state"
>
Create image
</Link>