allow bulk-imported contacts to have visibility set

This commit is contained in:
2024-09-17 18:30:50 -06:00
parent 61a488a25d
commit 534f3d8a8b
10 changed files with 166 additions and 86 deletions

View File

@@ -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.
});