|
@ -68,4 +68,16 @@ test('Record an offer', async ({ page }) => { |
|
|
await page.getByTestId('editClaimButton').click(); |
|
|
await page.getByTestId('editClaimButton').click(); |
|
|
const newAmount = await page.getByTestId('inputOfferAmount'); |
|
|
const newAmount = await page.getByTestId('inputOfferAmount'); |
|
|
await expect(newAmount).toHaveValue((randomNonZeroNumber + 1).toString()); |
|
|
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(); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|