Skip to content

Commit

Permalink
null checks grouped with element selectors (formatting)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stassi committed Sep 22, 2024
1 parent 3e75976 commit 737efbe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tutorial/quick-start/quick-start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ describe('quick-start tutorial', () => {
const element: ElementHandle | null = await page.$(
'.leaflet-marker-icon',
)
if (!element) throw new Error('Element not found.')

if (!element) throw new Error('Element not found.')
await element.click()

await page.waitForSelector('.leaflet-popup-content')
Expand All @@ -57,6 +57,7 @@ describe('quick-start tutorial', () => {
const element: ElementHandle<SVGPathElement> | null = await page.$(
'path.leaflet-interactive[stroke="red"]',
)

if (!element) throw new Error('Element not found.')
await element.click()

Expand All @@ -80,6 +81,7 @@ describe('quick-start tutorial', () => {
const element: ElementHandle<SVGPathElement> | null = await page.$(
'path.leaflet-interactive[stroke="#3388ff"]',
)

if (!element) throw new Error('Element not found.')
await element.click()

Expand Down

0 comments on commit 737efbe

Please sign in to comment.