Skip to content

Commit

Permalink
update constants (#225)
Browse files Browse the repository at this point in the history
* update constants

* Adjust tests to new constants

---------

Co-authored-by: nils <[email protected]>
  • Loading branch information
felixguendling and nilspenzel authored Feb 24, 2025
1 parent 417e004 commit f5e2aae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions e2e/availability.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ test('Request ride', async ({ page }) => {
await requestRide(page);
await page.goto('/taxi/availability?offset=-120&date=2026-09-30');
await page.waitForTimeout(500);
await expect(page.getByTestId('GR-TU-11-2026-09-30T07:45:00.000Z').locator('div')).toHaveCSS(
'background-color',
'rgb(251, 146, 60)'
);
await expect(page.getByTestId('GR-TU-11-2026-09-30T08:00:00.000Z').locator('div')).toHaveCSS(
'background-color',
'rgb(251, 146, 60)'
Expand Down
6 changes: 3 additions & 3 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { HOUR, MINUTE } from '$lib/util/time';

export const TZ = 'Europe/Berlin';
export const MIN_PREP = 30 * MINUTE;
export const MIN_PREP = 1 * HOUR;
export const MAX_TRAVEL = 1 * HOUR;
export const MAX_PASSENGER_WAITING_TIME_PICKUP = 10 * MINUTE;
export const MAX_PASSENGER_WAITING_TIME_DROPOFF = 10 * MINUTE;
export const WGS84 = 4326;
export const MAX_MATCHING_DISTANCE = 200;
export const COORDINATE_ROUNDING_ERROR_THRESHOLD = 0.00001;
export const PASSENGER_CHANGE_DURATION = 2 * MINUTE;
export const PASSENGER_CHANGE_DURATION = 1 * MINUTE;
export const TAXI_DRIVING_TIME_COST_FACTOR = 1;
export const TAXI_WAITING_TIME_COST_FACTOR = 0.5;
export const PASSENGER_TIME_COST_FACTOR = 0;
export const BUFFER_TIME = 4 * MINUTE;
export const BUFFER_TIME = 0;
export const EARLIEST_SHIFT_START = 6 * HOUR;
export const LATEST_SHIFT_END = 21 * HOUR;
2 changes: 1 addition & 1 deletion src/lib/server/booking/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ describe('Whitelist and Booking API Tests', () => {
target: inNiesky2,
startBusStops: [],
targetBusStops: [],
directTimes: [inXMinutes(113)],
directTimes: [inXMinutes(117)],
startFixed: true,
capacities
});
Expand Down

0 comments on commit f5e2aae

Please sign in to comment.