BlueprintCard: Make hand cursor appear on hover

This commit fixes an issue where if both isClickable and isSelectable
are passed to a card in Patternfly 6, the hand cursor no longer appears
on hover and it is not obvious the card is clickable.

Co-Author: Gianluca Zuccarelli <gzuccare@redhat.com>
This commit is contained in:
Lucas Garfield 2025-06-19 10:44:21 -05:00 committed by Klara Simickova
parent bf952c5c7a
commit 5d6c6dc58b
5 changed files with 32 additions and 32 deletions

View file

@ -16,7 +16,9 @@ export const createBlueprint = async (
await page.getByRole('button', { name: 'Close' }).first().click();
await page.getByRole('button', { name: 'Create blueprint' }).click();
await page.getByRole('textbox', { name: 'Search input' }).fill(blueprintName);
await page.getByTestId('blueprint-card').getByText(blueprintName).click();
// the clickable blueprint cards are a bit awkward, so use the
// button's id instead
await page.locator(`button[id="${blueprintName}"]`).click();
};
/**
@ -91,10 +93,10 @@ export const deleteBlueprint = async (page: Page, blueprintName: string) => {
} catch (error) {
// If the No BP heading was not found, it means the blueprint (possibly) was created -> continue with deletion
}
await frame
.getByTestId('blueprint-card')
.getByText(blueprintName)
.click();
// the clickable blueprint cards are a bit awkward, so use the
// button's id instead
await frame.locator(`button[id="${blueprintName}"]`).click();
await frame.getByRole('button', { name: 'Menu toggle' }).click();
await frame.getByRole('menuitem', { name: 'Delete blueprint' }).click();
await frame.getByRole('button', { name: 'Delete' }).click();

View file

@ -100,7 +100,9 @@ test.describe.serial('test', () => {
await frame
.getByRole('textbox', { name: 'Search input' })
.fill(blueprintName);
await frame.getByText(blueprintName, { exact: true }).first().click();
// the clickable blueprint cards are a bit awkward, so use the
// button's id instead
await frame.locator(`button[id="${blueprintName}"]`).click();
await frame.getByRole('button', { name: 'Edit blueprint' }).click();
await frame.getByRole('button', { name: 'Additional packages' }).click();
@ -134,7 +136,9 @@ test.describe.serial('test', () => {
await frame
.getByRole('textbox', { name: 'Search input' })
.fill(blueprintName);
await frame.getByText(blueprintName, { exact: true }).first().click();
// the clickable blueprint cards are a bit awkward, so use the
// button's id instead
await frame.locator(`button[id="${blueprintName}"]`).click();
await frame.getByTestId('blueprint-build-image-menu-option').click();
// make sure the image is present
@ -154,7 +158,9 @@ test.describe.serial('test', () => {
await frame
.getByRole('textbox', { name: 'Search input' })
.fill(blueprintName);
await frame.getByText(blueprintName, { exact: true }).first().click();
// the clickable blueprint cards are a bit awkward, so use the
// button's id instead
await frame.locator(`button[id="${blueprintName}"]`).click();
await frame.getByTestId('blueprint-action-menu-toggle').click();
await frame.getByRole('menuitem', { name: 'Delete blueprint' }).click();
await frame.getByRole('button', { name: 'Delete' }).click();