mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-22 23:16:46 +00:00
9494521ac7
- Paddle as a plannable tour type: one boat (kayak, canoe, SUP, other), river or lake, a pace that a boat change never overwrites; time is distance over pace - Hand-drawn legs beside routed ones, drawn dotted and labelled as not routed, kept through save, reopen and edits elsewhere - Reverse a tour and close it back to its start, each one undo step - GPX import shows a preview first (line, measures, duplicates, type) and only the confirmation stores the tour - Base maps and overlays per tour type in the planner: hike keeps topo and the via ferrata layer, paddle gets the OpenSeaMap seamark overlay
21 lines
911 B
TypeScript
21 lines
911 B
TypeScript
import { ToursBoatType, ToursWaterContext } from '../../../src/db/entities/Tours.entity';
|
|
import { paddleBoatTypeSchema, paddleWaterContextSchema } from '@trek/shared';
|
|
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
/**
|
|
* The boat and water columns hold a CHECK list (migration 043900) that the
|
|
* entity carries as its enum, and the contract holds its own list. A value
|
|
* one side knows and the other refuses would be a tour the planner can save
|
|
* and the database cannot store, or the other way round.
|
|
*/
|
|
describe('paddle columns match the contract', () => {
|
|
it('knows the same boats as the paddle contract', () => {
|
|
expect(Object.values(ToursBoatType).sort()).toEqual([...paddleBoatTypeSchema.options].sort());
|
|
});
|
|
|
|
it('knows the same waters as the paddle contract', () => {
|
|
expect(Object.values(ToursWaterContext).sort()).toEqual([...paddleWaterContextSchema.options].sort());
|
|
});
|
|
});
|