forked from trent_larson/crowd-funder-for-time-pwa
fix alert when looking at one's own activity
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { generateEthrUser, importUser } from './testUtils';
|
||||
import { deleteContact, generateEthrUser, importUser } from './testUtils';
|
||||
|
||||
test('Check activity feed', async ({ page }) => {
|
||||
// Load app homepage
|
||||
@@ -123,4 +123,20 @@ test('Check User 0 can register a random person', async ({ page }) => {
|
||||
// now ensure that alert goes away
|
||||
await page.locator('div[role="alert"] button > svg.fa-xmark').click(); // dismiss alert
|
||||
await expect(page.getByText('That gift was recorded.')).toBeHidden();
|
||||
|
||||
// now delete the contact to test that pages still do reasonable things
|
||||
await deleteContact(page, newDid);
|
||||
// go the activity page for this new person
|
||||
await page.goto('./did/' + encodeURIComponent(newDid));
|
||||
let error;
|
||||
try {
|
||||
await page.waitForSelector('div[role="alert"]', { timeout: 2000 });
|
||||
error = new Error('Error alert should not show.');
|
||||
} catch (error) {
|
||||
// success
|
||||
} finally {
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user