mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(roadtrip): seat rides and the drive into tomorrow by one rule, and say why a way was not taken
The slot the desktop stores for a ride within one day was worked out over the rows the day list shows, so a hotel it hides on the far shore was left out, the ferry was filed behind it and the road trip drove there overland before the crossing. It is now worked out over every stop the drive reads, timed the way the drive times it. An overnight ride no longer seats its arrival by the slot seeded on the day it left, and opens the day it lands on unless somebody placed it there. A via behind a day's last stop goes once that stop is no longer last, for the rail's drags and removals, the list's reorder and the server's sorts and seated nights alike; some of them used to bend a leg of the day through it instead. A leg OSRM drew while the avoidance router did not answer is now known as such: the picker no longer reads it as that router's road, has the leg routed again when its own road is chosen and says so, and a join that fell back is asked for again and flagged on its card. A refused way that leaves a class out names the setting that drives it, the ferry hint covers a crossing that lands the next day, a road another engine timed names that engine, and the desk bar keeps the keyboard on the chip while a choice is checked and announces the outcome. A ride on none of the trip's days is no longer said to have no date.
This commit is contained in:
@@ -8,7 +8,7 @@ import type { LegAlternatives, OfferedRoute } from '../../../../src/components/R
|
||||
import type { TripPlanner } from '../../../../src/mobile/screens/trip/MTripShell'
|
||||
import { openLeg } from '../../../helpers/legAlternatives'
|
||||
|
||||
// FE-MOB-RTALT-001 to FE-MOB-RTALT-012
|
||||
// FE-MOB-RTALT-001 to FE-MOB-RTALT-013
|
||||
//
|
||||
// Rendered through the real controller hook, so a tap is checked all the way to what the
|
||||
// planner is asked to do, and the pending state is the transition's own.
|
||||
@@ -181,6 +181,23 @@ describe('MRtAlternativesBar', () => {
|
||||
expect(confirmButton().className).toContain('flex-1')
|
||||
})
|
||||
|
||||
it('FE-MOB-RTALT-013: on a leg a route provider drives, a road OSRM timed is said to be OSRM’s', () => {
|
||||
// It used to be called the avoidance router's, an engine that timed none of these.
|
||||
const routes: OfferedRoute[] = [{ ...ROUTES[0], engine: 'plugin' }, ROUTES[1]]
|
||||
const base = buildPlanner()
|
||||
renderBar(buildPlanner({
|
||||
selectedDayId: 2,
|
||||
routeAlternatives: { ...base.routeAlternatives, open: openLeg({ dayId: 2, drive: { kind: 'leg', index: 0 }, routes, engine: 'plugin' }) },
|
||||
alternativeOverlays: buildAlternativeOverlays(routes, {
|
||||
fastest: 'Fastest', current: 'Current', noMotorway: 'No motorway', noToll: 'No tolls', noFerry: 'No ferry',
|
||||
}, 'plugin'),
|
||||
highlightedAlternative: 1,
|
||||
} as Partial<TripPlanner>))
|
||||
|
||||
expect(screen.getByText('roadtrip.alt.otherEngineStandard')).toBeInTheDocument()
|
||||
expect(screen.queryByText('roadtrip.alt.otherEngine')).toBeNull()
|
||||
})
|
||||
|
||||
it('FE-MOB-RTALT-010: offline a valid pick still cannot be confirmed', () => {
|
||||
const base = buildPlanner()
|
||||
renderBar(planner({}, { highlightedAlternative: 1, roadtripVias: { ...base.roadtripVias, editable: false } }))
|
||||
|
||||
Reference in New Issue
Block a user