Skip to content

Commit

Permalink
Prettier formatting in test file
Browse files Browse the repository at this point in the history
  • Loading branch information
prushforth committed Aug 14, 2024
1 parent 4577f57 commit 62a2721
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions test/e2e/elements/map-a/map-a-inline-or-remote-templated.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,23 @@ test.describe('map-a loaded inline or remote, directly or via templated map-link
});
}
test('Long map-a href is actionable, does not cause client to hang', async () => {
const longUrl = "http://localhost:8080/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger%3Atiger_roads&bbox=-74.02722%2C40.684221%2C-73.907005%2C40.878178&width=476&height=768&srs=EPSG%3A4326&styles=&format=text%2Fmapml";
const longUrl =
'http://localhost:8080/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger%3Atiger_roads&bbox=-74.02722%2C40.684221%2C-73.907005%2C40.878178&width=476&height=768&srs=EPSG%3A4326&styles=&format=text%2Fmapml';
// remove the top three layers (the bottom layer has a long href)
await page.getByTestId('remote-templated').evaluate(layer => layer.remove());
await page.getByTestId('inline-templated').evaluate(layer => layer.remove());
await page.getByTestId('remote-features').evaluate(layer => layer.remove());
await page
.getByTestId('remote-templated')
.evaluate((layer) => layer.remove());
await page
.getByTestId('inline-templated')
.evaluate((layer) => layer.remove());
await page
.getByTestId('remote-features')
.evaluate((layer) => layer.remove());
const aWithLongHref = page.getByRole('link', { name: 'Long href' });
await aWithLongHref.hover();
const toast = await page.locator('.mapml-link-preview > p').evaluate((p) => p.innerText );
const toast = await page
.locator('.mapml-link-preview > p')
.evaluate((p) => p.innerText);
expect(toast).toEqual(longUrl);

});
});

0 comments on commit 62a2721

Please sign in to comment.