fix error is OfferDialog where assignment to a project was missed, plus some refactors

This commit is contained in:
2024-09-16 15:12:32 -06:00
parent 008ae9e906
commit 4fd2319d53
6 changed files with 27 additions and 22 deletions

View File

@@ -17,6 +17,7 @@ test('Record an offer', async ({ page }) => {
await page.locator('ul#listDiscoverResults li:nth-child(1)').click();
// Record an offer
await page.locator('button', { hasText: 'Edit' }).isVisible(); // since the 'edit' takes longer to show, wait for that (lest the click miss)
await page.getByTestId('offerButton').click();
await page.getByTestId('inputDescription').fill(description);
await page.getByTestId('inputOfferAmount').fill(randomNonZeroNumber.toString());
@@ -28,6 +29,8 @@ test('Record an offer', async ({ page }) => {
await page.locator('li').filter({ hasText: description }).locator('a').first().click();
await expect(page.getByRole('heading', { name: 'Verifiable Claim Details' })).toBeVisible();
await expect(page.getByText(description, { exact: true })).toBeVisible();
await expect(page.getByText('Offered to a bigger plan')).toBeVisible();
const serverPagePromise = page.waitForEvent('popup');
await page.getByRole('link', { name: 'View on the Public Server' }).click();
const serverPage = await serverPagePromise;
@@ -49,6 +52,7 @@ test('Record an offer', async ({ page }) => {
await itemDesc.fill(updatedDescription);
await amount.fill(String(randomNonZeroNumber + 1));
await page.getByRole('button', { name: 'Sign & Send' }).click();
await expect(page.getByText('That offer was recorded.')).toBeVisible();
// go to the offer claim again and check the updated values
await page.goto('./projects');