diff --git a/playwright.config-local.ts b/playwright.config-local.ts index e2d634659b..d9c6afc4ed 100644 --- a/playwright.config-local.ts +++ b/playwright.config-local.ts @@ -21,7 +21,7 @@ export default defineConfig({ /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ - workers: 4, + workers: 3, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: [ ['list'], diff --git a/test-playwright/00-noid-tests.spec.ts b/test-playwright/00-noid-tests.spec.ts index 072baf9a5e..61b52eaecf 100644 --- a/test-playwright/00-noid-tests.spec.ts +++ b/test-playwright/00-noid-tests.spec.ts @@ -282,9 +282,9 @@ test('Check User 0 can register a random person', async ({ page }) => { } catch (error) { console.log('Could not force close dialog, continuing...'); } - // Wait for Person button to be ready - simplified approach - await page.waitForSelector('button:has-text("Person")', { timeout: 10000 }); - await page.getByRole('button', { name: 'Person' }).click(); + // Wait for Thank button to be ready - simplified approach + await page.waitForSelector('button:has-text("Thank")', { timeout: 10000 }); + await page.getByRole('button', { name: 'Thank' }).click(); await page.getByRole('listitem').filter({ hasText: UNNAMED_ENTITY_NAME }).locator('svg').click(); await page.getByPlaceholder('What was given').fill('Gave me access!'); await page.getByRole('button', { name: 'Sign & Send' }).click(); diff --git a/test-playwright/30-record-gift.spec.ts b/test-playwright/30-record-gift.spec.ts index 8b560e7a7c..90af649c12 100644 --- a/test-playwright/30-record-gift.spec.ts +++ b/test-playwright/30-record-gift.spec.ts @@ -107,7 +107,7 @@ test('Record something given', async ({ page }) => { return !document.querySelector('.dialog-overlay'); }, { timeout: 5000 }); - await page.getByRole('button', { name: 'Person' }).click(); + await page.getByRole('button', { name: 'Thank' }).click(); await page.getByRole('listitem').filter({ hasText: UNNAMED_ENTITY_NAME }).locator('svg').click(); await page.getByPlaceholder('What was given').fill(finalTitle); await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString()); diff --git a/test-playwright/33-record-gift-x10.spec.ts b/test-playwright/33-record-gift-x10.spec.ts index 37c5eb024c..d6452da545 100644 --- a/test-playwright/33-record-gift-x10.spec.ts +++ b/test-playwright/33-record-gift-x10.spec.ts @@ -116,7 +116,7 @@ test('Record 9 new gifts', async ({ page }) => { if (i === 0) { await page.getByTestId('closeOnboardingAndFinish').click(); } - await page.getByRole('button', { name: 'Person' }).click(); + await page.getByRole('button', { name: 'Thank' }).click(); await page.getByRole('listitem').filter({ hasText: UNNAMED_ENTITY_NAME }).locator('svg').click(); await page.getByPlaceholder('What was given').fill(finalTitles[i]); await page.getByRole('spinbutton').fill(finalNumbers[i].toString()); diff --git a/test-playwright/37-record-gift-on-project.spec.ts b/test-playwright/37-record-gift-on-project.spec.ts index e2a8629b8b..4b4ecd9967 100644 --- a/test-playwright/37-record-gift-on-project.spec.ts +++ b/test-playwright/37-record-gift-on-project.spec.ts @@ -1,7 +1,8 @@ import { test, expect, Page } from '@playwright/test'; import { importUser } from './testUtils'; -async function testProjectGive(page: Page, selector: string) { +async function testProjectGive(page: Page, isToProject: boolean) { + const selector = isToProject ? 'gives-to' : 'gives-from'; // Generate a random string of a few characters const randomString = Math.random().toString(36).substring(2, 6); @@ -42,9 +43,9 @@ async function testProjectGive(page: Page, selector: string) { } test('Record a give to a project', async ({ page }) => { - await testProjectGive(page, 'gives-to'); + await testProjectGive(page, true); }); test('Record a give from a project', async ({ page }) => { - await testProjectGive(page, 'gives-from'); + await testProjectGive(page, false); }); diff --git a/test-playwright/40-add-contact.spec.ts b/test-playwright/40-add-contact.spec.ts index 02d01f7a04..34780af29e 100644 --- a/test-playwright/40-add-contact.spec.ts +++ b/test-playwright/40-add-contact.spec.ts @@ -117,7 +117,7 @@ test('Add contact, record gift, confirm gift', async ({ page }) => { // Confirm that home shows contact in "Record Something…" await page.goto('./'); await page.getByTestId('closeOnboardingAndFinish').click(); - await page.getByRole('button', { name: 'Person' }).click(); + await page.getByRole('button', { name: 'Thank' }).click(); await expect(page.locator('#sectionGiftedGiver').getByRole('listitem').filter({ hasText: contactName })).toBeVisible(); // Record something given by new contact