From bfa75484f32e6a9c0c80b1b65d1648e3ceebab8c Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Mon, 7 Jul 2025 11:16:18 -0600 Subject: [PATCH] Fix issue showing the actions on contact screen. (Test still fails later.) --- test-playwright/60-new-activity.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test-playwright/60-new-activity.spec.ts b/test-playwright/60-new-activity.spec.ts index 0856e575..24c21885 100644 --- a/test-playwright/60-new-activity.spec.ts +++ b/test-playwright/60-new-activity.spec.ts @@ -2,14 +2,14 @@ import { test, expect } from '@playwright/test'; import { importUser, generateNewEthrUser, switchToUser } from './testUtils'; test('New offers for another user', async ({ page }) => { - const user01Did = await generateNewEthrUser(page); + const newUserDid = await generateNewEthrUser(page); await page.goto('./'); await page.getByTestId('closeOnboardingAndFinish').click(); await expect(page.getByTestId('newDirectOffersActivityNumber')).toBeHidden(); await importUser(page, '00'); await page.goto('./contacts'); - await page.getByPlaceholder('URL or DID, Name, Public Key').fill(user01Did + ', A Friend'); + await page.getByPlaceholder('URL or DID, Name, Public Key').fill(newUserDid + ', A Friend'); await expect(page.locator('button > svg.fa-plus')).toBeVisible(); await page.locator('button > svg.fa-plus').click(); await expect(page.locator('div[role="alert"] span:has-text("Contact Added")')).toBeVisible(); @@ -18,7 +18,7 @@ test('New offers for another user', async ({ page }) => { await expect(page.locator('div[role="alert"] button > svg.fa-xmark')).toBeHidden(); // ensure alert is gone // show buttons to make offers directly to people - await page.getByRole('button').filter({ hasText: /See Hours/i }).click(); + await page.getByRole('button').filter({ hasText: /See Actions/i }).click(); // make an offer directly to user 1 // Generate a random string of 3 characters, skipping the "0." at the beginning @@ -42,7 +42,7 @@ test('New offers for another user', async ({ page }) => { await expect(page.locator('div[role="alert"] button > svg.fa-xmark')).toBeHidden(); // ensure alert is gone // as user 1, go to the home page and check that two offers are shown as new - await switchToUser(page, user01Did); + await switchToUser(page, newUserDid); await page.goto('./'); let offerNumElem = page.getByTestId('newDirectOffersActivityNumber'); await expect(offerNumElem).toHaveText('2');