forked from trent_larson/crowd-funder-for-time-pwa
ID-specific locators
This commit is contained in:
@@ -5,8 +5,8 @@ test('Check activity feed', async ({ page }) => {
|
||||
await page.goto('./');
|
||||
|
||||
// Check that initial 10 activities have been loaded
|
||||
await page.locator('li:nth-child(10)');
|
||||
await page.locator('ul#listLatestActivity li:nth-child(10)');
|
||||
|
||||
// Scroll down a bit to trigger loading additional activities
|
||||
await page.locator('li:nth-child(50)').scrollIntoViewIfNeeded();
|
||||
await page.locator('ul#listLatestActivity li:nth-child(50)').scrollIntoViewIfNeeded();
|
||||
});
|
||||
@@ -5,8 +5,8 @@ test('Check discover results', async ({ page }) => {
|
||||
await page.goto('./discover');
|
||||
|
||||
// Check that initial 10 projects have been loaded
|
||||
await page.locator('section#Content li.border-b:nth-child(10)');
|
||||
await page.locator('ul#listDiscoverResults li.border-b:nth-child(10)');
|
||||
|
||||
// Scroll down a bit to trigger loading additional projects
|
||||
await page.locator('section#Content li.border-b:nth-child(20)').scrollIntoViewIfNeeded();
|
||||
await page.locator('ul#listDiscoverResults li.border-b:nth-child(20)').scrollIntoViewIfNeeded();
|
||||
});
|
||||
@@ -13,8 +13,8 @@ test('Check no-ID messaging in account', async ({ page }) => {
|
||||
await page.goto('./account');
|
||||
|
||||
// Check 'someone must register you' notice
|
||||
await expect(page.getByText('Note: Before you can share with others or take any action, you need an identifier.')).toBeVisible();
|
||||
await expect(page.locator('#noticeBeforeShare')).toBeVisible();
|
||||
|
||||
// Check 'a friend needs to register you' notice
|
||||
await expect(page.getByText('Note: Before you can publicly announce a new project or time commitment, a friend needs to register you.')).toBeVisible();
|
||||
await expect(page.locator('#noticeBeforeAnnounce')).toBeVisible();
|
||||
});
|
||||
@@ -20,7 +20,7 @@ test('Check usage limits', async ({ page }) => {
|
||||
await expect(page.getByRole('code')).toContainText('did:ethr:0x111d15564f824D56C7a07b913aA7aDd03382aA39');
|
||||
|
||||
// Verify that "Usage Limits" section is visible
|
||||
await expect(page.locator('div.bg-slate-100.rounded-md').filter({ hasText: 'Usage Limits' })).toBeVisible();
|
||||
await expect(page.locator('#sectionUsageLimits')).toBeVisible();
|
||||
await expect(page.getByText('Your claims counter resets')).toBeVisible();
|
||||
await expect(page.getByText('Your registration counter resets')).toBeVisible();
|
||||
await expect(page.getByText('Your image counter resets')).toBeVisible();
|
||||
|
||||
@@ -52,5 +52,5 @@ test('Create new project, then search for it', async ({ page }) => {
|
||||
await page.waitForTimeout(5000); // Wait for a bit
|
||||
await page.getByPlaceholder('Search…').fill(finalRandomString);
|
||||
await page.locator('#QuickSearch button').click();
|
||||
await expect(page.locator('section#Content li.border-b:nth-child(1)')).toContainText(finalRandomString);
|
||||
await expect(page.locator('ul#listDiscoverResults li.border-b:nth-child(1)')).toContainText(finalRandomString);
|
||||
});
|
||||
@@ -32,6 +32,6 @@ test('Add contact', async ({ page }) => {
|
||||
|
||||
// Confirm that home feed shows contact
|
||||
await page.goto('./');
|
||||
await expect(page.locator('li').filter({ hasText: 'Contact 00 gave to' }).nth(0)).toBeVisible();
|
||||
await expect(page.locator('li').filter({ hasText: 'Contact 00 received' }).nth(0)).toBeVisible();
|
||||
await expect(page.locator('ul#listLatestActivity li').filter({ hasText: 'Contact 00 gave to' }).nth(0)).toBeVisible();
|
||||
await expect(page.locator('ul#listLatestActivity li').filter({ hasText: 'Contact 00 received' }).nth(0)).toBeVisible();
|
||||
});
|
||||
Reference in New Issue
Block a user