Interactive interface for browsing global, full-resolution satellite imagery
// @ts-check
const { test, expect } = require('@playwright/test')
const createSelectors = require('../../test-utils/global-variables/selectors')
const { skipTour } = require('../../test-utils/global-variables/querystrings')
const { closeModal } = require('../../test-utils/hooks/wvHooks')
/** @type {import('@playwright/test').Page} */
let page
/** @type {Record<string, import('@playwright/test').Locator>} */
let selectors
test.describe.configure({ mode: 'serial' })
test.beforeAll(async ({ browser }) => {
const context = await browser.newContext({
viewport: { width: 375, height: 667 }
})
page = await context.newPage()
selectors = createSelectors(page)
})
test.afterAll(async () => {
await page.close()
})
test('Location Search component is visible by default', async () => {
const { locationSearchMobileDialog } = selectors
await page.goto(skipTour)
await closeModal(page)
await expect(locationSearchMobileDialog).not.toBeVisible()
})
test('Clicking Location Search toolbar button opens the Location Search mobile dialog', async () => {
const { locationSearchMobileDialog, locationSearchToolbarButton } = selectors
await locationSearchToolbarButton.click()
await expect(locationSearchMobileDialog).toBeVisible()
})