Browse Source

add test for user-project offers on front page

Trent Larson 3 weeks ago
parent
commit
f01ddce1f6
  1. 12
      test-playwright/50-record-offer.spec.ts
  2. 2
      test-playwright/60-new-activity.spec.ts

12
test-playwright/50-record-offer.spec.ts

@ -68,4 +68,16 @@ test('Record an offer', async ({ page }) => {
await page.getByTestId('editClaimButton').click();
const newAmount = await page.getByTestId('inputOfferAmount');
await expect(newAmount).toHaveValue((randomNonZeroNumber + 1).toString());
// go to the home page and check that the offer is shown as new
await page.goto('./');
const offerNumElem = page.getByTestId('newOffersToUserProjectsActivityNumber');
await expect(offerNumElem).toHaveText('50');
// click on the number of new offers to go to the list page
await offerNumElem.click();
await expect(page.getByText('New Offers To Your Projects', { exact: true })).toBeVisible();
await page.getByTestId('showOffersToUserProjects').click();
await expect(page.getByText(description)).toBeVisible();
});

2
test-playwright/60-new-activity.spec.ts

@ -45,6 +45,8 @@ test('New offers for another user', async ({ page }) => {
await page.getByTestId('closeOnboardingAndFinish').click();
let offerNumElem = page.getByTestId('newDirectOffersActivityNumber');
await expect(offerNumElem).toHaveText('2');
// click on the number of new offers to go to the list page
await offerNumElem.click();
await expect(page.getByText('New Offers To You', { exact: true })).toBeVisible();

Loading…
Cancel
Save