Skip to content

Commit

Permalink
fix percy tests (todo: HAR update)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-heppner-ibigroup committed Oct 19, 2023
1 parent 2a0ca75 commit 80ac3d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/components/viewers/nearby/nearby-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function NearbyView(props: Props): JSX.Element {

return (
<Scrollable>
<div ref={firstItemRef} />
<div className="nearby-view" ref={firstItemRef} />
<NearbySidebarContainer className="base-color-bg">
{nearby &&
(nearby.error
Expand Down
12 changes: 6 additions & 6 deletions percy/percy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ beforeAll(async () => {
// Web security is disabled to allow requests to the mock OTP server
browser = await puppeteer.launch({
args: ['--disable-web-security']
// ,headless: false
//, headless: false
})
} catch (error) {
console.log(error)
Expand Down Expand Up @@ -257,14 +257,14 @@ async function executeTest(page, isMobile, isCallTaker) {
await page.waitForTimeout(1000)
await percySnapshotWithWait(page, 'Trip Viewer')

// Open stop viewer from trip viewer
// Open nearby viewer from trip viewer
// Triggers mock.har graphql query #6, #7, and #8 (stop details, nearest places, nearest stops).
await page.click(
'div.trip-viewer-body > ol > li:nth-child(3) > div.stop-button-container > button'
)
await page.waitForSelector('.stop-viewer')
await page.waitForSelector('.nearby-view')

await percySnapshotWithWait(page, 'Stop Viewer')
await percySnapshotWithWait(page, 'Nearby View')

// Open schedule view
await page.waitForSelector('button.link-button.pull-right')
Expand Down Expand Up @@ -334,10 +334,10 @@ async function executeTest(page, isMobile, isCallTaker) {

await percySnapshotWithWait(page, 'Pattern Viewer Showing Route 1')

// Stop viewer from pattern viewer
// Nearby viewer from pattern viewer
// Triggers mock.har graphql query #15 (stop info), #16 (nearest amenities), #17 (stops by radius).
await page.click('ol > li:nth-of-type(1) > button')
await page.waitForSelector('.stop-viewer')
await page.waitForSelector('.nearby-view')
await page.waitForTimeout(1000)

// Activate all layers
Expand Down

0 comments on commit 80ac3d4

Please sign in to comment.