mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 14:06:27 +00:00
test(tours): give the tests the merged tracks added side by side ids of their own
Runs, winter hikes and ski tracks numbered their ToursRepository tests 016 to 018, as multi-day tours did; the multi-day list_tours tests took TOURS-MCP-015 and 016 next to get_tour_plan's. They now read TOURREPO-022 to 024 and TOURS-MCP-024 and 025, so every id names one test.
This commit is contained in:
@@ -427,7 +427,7 @@ describe('ToursRepository writes', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('TOURREPO-016: a hike keeps its winter label through an edit that leaves it out, and loses it only when told (HIK-01)', async () => {
|
||||
it('TOURREPO-022: a hike keeps its winter label through an edit that leaves it out, and loses it only when told (HIK-01)', async () => {
|
||||
const { trip } = fixture();
|
||||
const place = createPlace(testDb, trip.id, { name: 'Snowy ridge' });
|
||||
await repo.insertTour({ place_id: place.id, ...METRICS, winter_activity: 'snowshoe' });
|
||||
@@ -443,7 +443,7 @@ describe('ToursRepository writes', () => {
|
||||
expect((await repo.findInTrip(trip.id, place.id))?.winter_activity).toBeNull();
|
||||
});
|
||||
|
||||
it('TOURREPO-017: a run keeps its profile and pace, an edit replaces them, and another type takes them off (RUN-01)', async () => {
|
||||
it('TOURREPO-023: a run keeps its profile and pace, an edit replaces them, and another type takes them off (RUN-01)', async () => {
|
||||
const { trip } = fixture();
|
||||
const place = createPlace(testDb, trip.id, { name: 'River loop' });
|
||||
const run = { ...METRICS, tour_type: 'run', max_hiking_difficulty: null };
|
||||
@@ -458,7 +458,7 @@ describe('ToursRepository writes', () => {
|
||||
expect(await repo.findInTrip(trip.id, place.id)).toMatchObject({ run_profile: null, run_pace_seconds_per_km: null });
|
||||
});
|
||||
|
||||
it('TOURREPO-018: a ski track keeps its classification, is classified again only in its own trip, and a route edit takes it off (SKI-02)', async () => {
|
||||
it('TOURREPO-024: a ski track keeps its classification, is classified again only in its own trip, and a route edit takes it off (SKI-02)', async () => {
|
||||
const { trip, other } = fixture();
|
||||
const place = createPlace(testDb, trip.id, { name: 'Valley loop' });
|
||||
const ski = { ...METRICS, tour_type: 'ski', max_hiking_difficulty: null, duration: null };
|
||||
|
||||
@@ -337,7 +337,7 @@ describe('ToursMcp', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('TOURS-MCP-015: list_tours counts the stages of a multi-day tour and get_tour_plan marks where each ends (MDT-01)', async () => {
|
||||
it('TOURS-MCP-024: list_tours counts the stages of a multi-day tour and get_tour_plan marks where each ends (MDT-01)', async () => {
|
||||
const { user, trip, ridge, gorge } = fixture();
|
||||
const orm = await createTestOrm(db);
|
||||
await addTourWaypoints(orm, ridge.id, [
|
||||
@@ -363,7 +363,7 @@ describe('ToursMcp', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('TOURS-MCP-016: list_tours names the stops between the stages and the stage each day holds (MDT-02)', async () => {
|
||||
it('TOURS-MCP-025: list_tours names the stops between the stages and the stage each day holds (MDT-02)', async () => {
|
||||
const { user, trip, ridge, day1, day2 } = fixture();
|
||||
const orm = await createTestOrm(db);
|
||||
await addTourWaypoints(orm, ridge.id, [
|
||||
|
||||
Reference in New Issue
Block a user