fix(tours): format the dropdown changes and lower the hook ref baseline

The editor dropdown change drops the options ref useAnchoredPosition kept
for its measure callback, so the react-hooks/refs count falls by one and
the baseline follows it. The new and touched files are formatted, and the
new rail test gets its id like the rest of the file.
This commit is contained in:
Maurice
2026-11-27 20:03:41 +01:00
parent 20c8457f18
commit 3dd63331bc
6 changed files with 219 additions and 163 deletions
@@ -825,7 +825,7 @@ describe('TourPlannerRail', () => {
expect(screen.getAllByRole('status').some(el => /T3 routes may include exposed/.test(el.textContent ?? ''))).toBe(true)
})
it('dismisses an open tour type list when saving locks the editor', () => {
it('TOUR-PLANNER-RAIL-024: an open tour type list closes when saving locks the editor', () => {
const controller = planner({ mode: { type: 'new-draft' } })
const { rerender } = render(<TourPlannerRail planner={controller} />)
const trigger = screen.getByTestId('tour-type-select')
@@ -121,7 +121,12 @@ function SkiFields({ planner, locked }: TourTypeFieldsProps) {
{t('tours.ski.plannedHint')}
</span>
{choice.discipline !== null && (
<SkiRouteOptions discipline={choice.discipline} options={choice.options} onChange={planner.ski.setOption} locked={locked} />
<SkiRouteOptions
discipline={choice.discipline}
options={choice.options}
onChange={planner.ski.setOption}
locked={locked}
/>
)}
</div>
);