forked from trent_larson/crowd-funder-for-time-pwa
run the tests on a different port (so there's no conflict when running the development server)
This commit is contained in:
@@ -200,7 +200,7 @@ test('Add contact, copy details, delete, and import from paste & from file', asy
|
||||
|
||||
});
|
||||
|
||||
test('Copy contact to clipboard, then import ', async ({ page, context }) => {
|
||||
test('Copy contact to clipboard, then import ', async ({ page, context }, testInfo) => {
|
||||
await importUser(page, '00');
|
||||
|
||||
await page.goto('./account');
|
||||
@@ -244,7 +244,12 @@ test('Copy contact to clipboard, then import ', async ({ page, context }) => {
|
||||
const clipboardText = await page.evaluate(async () => {
|
||||
return navigator.clipboard.readText();
|
||||
});
|
||||
const PATH_PART = "http://localhost:8080/contact-import/";
|
||||
|
||||
// look into the playwright.config file for the server URL
|
||||
const webServer = testInfo.config.webServer;
|
||||
const clientServerUrl = webServer?.url;
|
||||
|
||||
const PATH_PART = clientServerUrl + "/contact-import/";
|
||||
expect(clipboardText).toContain(PATH_PART);
|
||||
|
||||
await page.locator('div[role="alert"] button > svg.fa-xmark').click(); // dismiss alert
|
||||
|
||||
Reference in New Issue
Block a user