forked from trent_larson/crowd-funder-for-time-pwa
change tests assuming result will be at top
This commit is contained in:
@@ -64,13 +64,13 @@ test('Create new project, then search for it', async ({ page }) => {
|
||||
// Search for newly-created project in /projects
|
||||
await page.goto('./projects');
|
||||
await page.getByRole('link', { name: 'Projects', exact: true }).click();
|
||||
await expect(page.locator('ul#listProjects li.border-b:nth-child(1)')).toContainText(finalRandomString); // Assumes newest project always appears first in the Projects tab list
|
||||
await expect(page.locator('ul#listProjects li').filter({ hasText: finalTitle })).toBeVisible();
|
||||
|
||||
// Search for newly-created project in /discover
|
||||
await page.goto('./discover');
|
||||
await page.getByPlaceholder('Search…').fill(finalRandomString);
|
||||
await page.locator('#QuickSearch button').click();
|
||||
await expect(page.locator('ul#listDiscoverResults li.border-b:nth-child(1)')).toContainText(finalRandomString);
|
||||
await expect(page.locator('ul#listDiscoverResults li').filter({ hasText: finalTitle })).toBeVisible();
|
||||
|
||||
// Edit the project
|
||||
await page.locator('a').filter({ hasText: finalTitle }).first().click();
|
||||
|
||||
Reference in New Issue
Block a user