Skip to content

Commit

Permalink
OpenStreetMap tiles test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stassi committed Sep 23, 2024
1 parent 23606f8 commit 39da26c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/tutorial/quick-start/quick-start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ describe('quick-start tutorial', () => {
})
})

describe('tiles', () => {
it('should render from OpenStreetMap', async () => {
const selector = '.leaflet-tile-loaded'
await page.waitForSelector(selector)

const sources: (string | null)[] = await page.$$eval(
selector,
(tiles) => tiles.map((tile) => tile.getAttribute('src')),
)

sources.forEach((source: string | null) => {
expect(source).toMatch(/^https:\/\/tile\.openstreetmap\.org\//)
})
})
})

describe('element displays popup text on click', () => {
describe('map (element)', () => {
it('should display clicked coordinates', async () => {
Expand Down

0 comments on commit 39da26c

Please sign in to comment.