mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 10:44:23 +00:00
feat(planner): edit the trip from its settings in the planner (#2811)
The trip form was mounted in the planner but nothing opened it, so title, dates, cover and currency could only be changed from My Trips. Trip settings now lists Edit Trip at the foot of its areas for anyone with trip_edit; it swaps the dialog for the trip form. The phone already has Edit Trip in the More sheet.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// FE-TP-DIALOGS-001 to FE-TP-DIALOGS-012
|
||||
// FE-TP-DIALOGS-001 to FE-TP-DIALOGS-013
|
||||
//
|
||||
// The planner's dialogs and the URL intents that open them, driven straight through
|
||||
// usePlannerDialogs. The search params come in as options, so each test owns the URL
|
||||
@@ -248,4 +248,14 @@ describe('usePlannerDialogs', () => {
|
||||
act(() => { result.current.changeTransitRoute(buildReservation({ id: 15, type: 'transit' })) })
|
||||
expect(result.current.transitPrefill).toEqual({ from: null, to: null })
|
||||
})
|
||||
|
||||
it('FE-TP-DIALOGS-013: editing the trip from its settings swaps the settings for the trip form (#2811)', () => {
|
||||
const { result } = renderDialogs()
|
||||
act(() => { result.current.setShowMembersModal(true) })
|
||||
|
||||
act(() => { result.current.editTripFromSettings() })
|
||||
|
||||
expect(result.current.showMembersModal).toBe(false)
|
||||
expect(result.current.showTripForm).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user