adjust test lines to await/expect appropriately

This commit is contained in:
2024-11-07 19:07:45 -07:00
parent a73f0239c9
commit a3b10d9a78
5 changed files with 15 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ test('Check activity feed - check that server is running', async ({ page }) => {
await page.getByTestId('closeOnboardingAndFinish').click();
// Check that initial 10 activities have been loaded
await page.locator('ul#listLatestActivity li:nth-child(10)');
await expect(page.locator('ul#listLatestActivity li:nth-child(10)')).toBeVisible();
// Scroll down a bit to trigger loading additional activities
await page.locator('ul#listLatestActivity li:nth-child(50)').scrollIntoViewIfNeeded();
@@ -18,7 +18,7 @@ test('Check discover results', async ({ page }) => {
await page.goto('./discover');
// Check that initial 10 projects have been loaded
await page.locator('ul#listDiscoverResults li.border-b:nth-child(10)');
await expect(page.locator('ul#listDiscoverResults li.border-b:nth-child(10)')).toBeVisible();
// Scroll down a bit to trigger loading additional projects
await page.locator('ul#listDiscoverResults li.border-b:nth-child(20)').scrollIntoViewIfNeeded();
@@ -43,7 +43,7 @@ test('Check ability to share contact', async ({ page }) => {
await page.goto('./discover');
// Check that initial 10 projects have been loaded
await page.locator('ul#listDiscoverResults li.border-b:nth-child(10)');
await expect(page.locator('ul#listDiscoverResults li.border-b:nth-child(10)')).toBeVisible();
// Scroll down a bit to trigger loading additional projects
await page.locator('ul#listDiscoverResults li.border-b:nth-child(20)').scrollIntoViewIfNeeded();