forked from jsnbuchanan/crowd-funder-for-time-pwa
allow bulk-imported contacts to have visibility set
This commit is contained in:
@@ -176,4 +176,22 @@ test('Add contact, copy details, delete, and import various ways', async ({ page
|
||||
await page.locator('button', { hasText: 'Import' }).click();
|
||||
// check that there are more contacts
|
||||
await expect(page.getByTestId('contactListItem')).toHaveCount(2);
|
||||
|
||||
// Import via the file backup-import
|
||||
await page.goto('./account');
|
||||
await page.getByRole('heading', { name: 'Advanced' }).click();
|
||||
const fileSelect = await page.locator('input[type="file"]')
|
||||
//fileSelect.click();
|
||||
fileSelect.setInputFiles('./test-playwright/exported-data.json');
|
||||
await page.locator('button', { hasText: 'Import Only Contacts' }).click();
|
||||
// we're on the contact-import page
|
||||
await expect(page.locator('li', { hasText: '- New' })).toHaveCount(3);
|
||||
await expect(page.locator('li', { hasText: '- Existing' })).toHaveCount(1);
|
||||
await expect(page.locator('span').filter({ hasText: 'the same as' })).toBeHidden();
|
||||
await page.locator('button', { hasText: 'Import' }).click();
|
||||
// check that there are more contacts
|
||||
await expect(page.getByTestId('contactListItem')).toHaveCount(5);
|
||||
// The visibility error is because currently the server returns an error for the same person.
|
||||
// But it should only show that one, for User #000.
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user