Add test ID to group header for E2E test reliability

Update group header component to include data-testid for improved test targeting
and update Page Object Model to use the more reliable test ID selector.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Sebastien Castiel
2025-08-04 21:05:27 -04:00
parent 1a4c5ee3e1
commit 5e81dd9deb
2 changed files with 4 additions and 2 deletions

View File

@@ -16,7 +16,9 @@ export const GroupHeader = () => {
{isLoading ? (
<Skeleton className="mt-1.5 mb-1.5 h-5 w-32" />
) : (
<div className="flex">{group.name}</div>
<div className="flex" data-testid="group-name">
{group.name}
</div>
)}
</Link>
</h1>

View File

@@ -6,7 +6,7 @@ export class GroupPage {
constructor(page: Page) {
this.page = page
this.title = page.getByRole('main').getByRole('heading', { level: 1 })
this.title = page.getByTestId('group-name')
}
async createExpense() {