Fix Playwright onboarding dialog and UI flow issues
- Fix gift recording flow to use correct Person button and Unnamed selection - Add robust overlay closing loop to handle onboarding/help dialogs - Fix multiple circle-info-link selector with .first() method - Use correct aria-label for Copy to Clipboard button - Improve user registration test to handle missing registration prompts - 18/20 tests now passing (only API config test remaining)
This commit is contained in:
@@ -100,7 +100,15 @@ test('Record something given', async ({ page }) => {
|
||||
// Record something given
|
||||
await page.goto('./');
|
||||
await page.getByTestId('closeOnboardingAndFinish').click();
|
||||
await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click();
|
||||
|
||||
// Click the "Person" button to open the gift recording dialog
|
||||
await page.getByRole('button', { name: 'Person' }).click();
|
||||
|
||||
// In the dialog, click on "Unnamed" to select it as the giver
|
||||
// Use the first "Unnamed" element which should be in the entity grid
|
||||
await page.getByRole('heading', { name: 'Unnamed' }).first().click();
|
||||
|
||||
// Fill in the gift details
|
||||
await page.getByPlaceholder('What was given').fill(finalTitle);
|
||||
await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString());
|
||||
await page.getByRole('button', { name: 'Sign & Send' }).click();
|
||||
@@ -110,7 +118,7 @@ test('Record something given', async ({ page }) => {
|
||||
// Refresh home view and check gift
|
||||
await page.goto('./');
|
||||
const item = await page.locator('li').filter({ hasText: finalTitle });
|
||||
await item.locator('[data-testid="circle-info-link"]').click();
|
||||
await item.locator('[data-testid="circle-info-link"]').first().click();
|
||||
await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible();
|
||||
await expect(page.getByText(finalTitle, { exact: true })).toBeVisible();
|
||||
const page1Promise = page.waitForEvent('popup');
|
||||
|
||||
Reference in New Issue
Block a user