Skip to content

Commit

Permalink
fix mobile plan trip button
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhep committed Feb 11, 2025
1 parent b1844c8 commit 992ff2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions percy/percy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ beforeAll(async () => {
// Web security is disabled to allow requests to the mock OTP server
browser = await puppeteer.launch({
args: ['--disable-web-security', '--no-sandbox']
//, headless: false
// , headless: false
})
} catch (error) {
console.log(error)
Expand All @@ -103,6 +103,7 @@ afterAll(async () => {
// Puppeteer can take a long time to load, especially in some ci environments
jest.setTimeout(600000)

// eslint-disable-next-line complexity
async function executeTest(page, isMobile, isCallTaker) {
// Make sure that the main UI (incl. map controls) has loaded.
await page.waitForSelector('.maplibregl-ctrl-zoom-in')
Expand All @@ -122,9 +123,8 @@ async function executeTest(page, isMobile, isCallTaker) {
await page.goto(
`http://localhost:${MOCK_SERVER_PORT}/#/?ui_activeSearch=fg33svlbf&ui_activeItinerary=-1&fromPlace=South%20Prado%20Northeast%2C%20Atlanta%2C%20GA%2C%20USA%3A%3A33.78946214120528%2C-84.37663414886111&toPlace=1%20Copenhill%20Avenue%20NE%2C%20Atlanta%2C%20GA%2C%20USA%3A%3A33.767060728439574%2C-84.35749390533111&date=2023-08-09&time=17%3A56&arriveBy=false&mode=BICYCLE&walkSpeed=1.34&numItineraries=3&modeButtons=walk_bike`
)
if (!isMobile) {
await page.click('#plan-trip')
}
await openEditIfNeeded(page, isMobile)
await page.click('#plan-trip')
// FIXME: Network idle condition seems never met after navigating to above link.
// await page.waitForNavigation({ waitUntil: 'networkidle2' })
await page.waitForTimeout(4000)
Expand Down

0 comments on commit 992ff2d

Please sign in to comment.