Skip to content

Commit

Permalink
describe the Borough marker test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stassi committed Sep 22, 2024
1 parent fa7d9f6 commit fbaeeef
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/tutorial/quick-start/quick-start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,25 @@ describe('quick-start tutorial', () => {
})
})

describe('ui layer displays popup text on click', () => {
describe('marker in the Borough of Southwark, London', () => {
it('should display popup text "I am a popup."', async () => {
const element: ElementHandle | null = await page.$(
'.leaflet-marker-icon',
)
if (!element) throw new Error('Element not found.')

await element.click()

await page.waitForSelector('.leaflet-popup-content')

expect(
await page.$eval('.leaflet-popup-content', (el) => el.textContent),
).toBe('I am a standalone popup.')
})
})
})

describe('vector layers display popup text on click', () => {
describe('red circle over South Bank district, Lambeth, London', () => {
it('should display popup text "I am a circle."', async () => {
Expand Down

0 comments on commit fbaeeef

Please sign in to comment.