Browse Source

Update: locators to match changes to homeview

pull/142/head
Jose Olarte III 1 week ago
parent
commit
c2f030678e
  1. 5
      test-playwright/30-record-gift.spec.ts

5
test-playwright/30-record-gift.spec.ts

@ -100,7 +100,8 @@ test('Record something given', async ({ page }) => {
// Record something given // Record something given
await page.goto('./'); await page.goto('./');
await page.getByTestId('closeOnboardingAndFinish').click(); await page.getByTestId('closeOnboardingAndFinish').click();
await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click(); await page.getByRole('button', { name: 'Person' }).click();
await page.getByRole('listitem').filter({ hasText: 'Unnamed' }).locator('svg').click();
await page.getByPlaceholder('What was given').fill(finalTitle); await page.getByPlaceholder('What was given').fill(finalTitle);
await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString()); await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString());
await page.getByRole('button', { name: 'Sign & Send' }).click(); await page.getByRole('button', { name: 'Sign & Send' }).click();
@ -109,7 +110,7 @@ test('Record something given', async ({ page }) => {
// Refresh home view and check gift // Refresh home view and check gift
await page.goto('./'); await page.goto('./');
const item = await page.locator('li').filter({ hasText: finalTitle }); const item = await page.locator('li:first-child').filter({ hasText: finalTitle });
await item.locator('[data-testid="circle-info-link"]').click(); await item.locator('[data-testid="circle-info-link"]').click();
await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible(); await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible();
await expect(page.getByText(finalTitle, { exact: true })).toBeVisible(); await expect(page.getByText(finalTitle, { exact: true })).toBeVisible();

Loading…
Cancel
Save