Skip to content

Commit

Permalink
page.waitForSelector removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Stassi committed Sep 23, 2024
1 parent 1b41a92 commit 2b52790
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/tutorial/quick-start/quick-start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ describe('quick-start tutorial', () => {
// eslint-disable-next-line jest/prefer-lowercase-title -- official case
describe('OpenStreetMap tiles', () => {
it('should render', async () => {
const selector = '.leaflet-tile-loaded'
await page.waitForSelector(selector)

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

Expand All @@ -27,11 +24,11 @@ describe('quick-start tutorial', () => {

describe('standalone popup', () => {
it('should display text "I am a standalone popup."', async () => {
const selector = '.leaflet-popup-content'
await page.waitForSelector(selector)

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

0 comments on commit 2b52790

Please sign in to comment.