Skip to content

Commit

Permalink
Merge pull request #25 from Stassi/feature/test-wait-for-selector-rem…
Browse files Browse the repository at this point in the history
…oval

feature/test-wait-for-selector-removal
  • Loading branch information
Stassi authored Sep 23, 2024
2 parents 29e33f1 + 0b39007 commit cd8fffa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stassi/leaf",
"version": "0.0.24",
"version": "0.0.25",
"description": "Leaflet adapter.",
"keywords": [
"cartography",
Expand Down
10 changes: 2 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,12 +24,9 @@ describe('quick-start tutorial', () => {

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

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

0 comments on commit cd8fffa

Please sign in to comment.