fix tests (proper timezone), proper spacing
This commit is contained in:
parent
d070c7731a
commit
8315a27ea8
@ -81,7 +81,7 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => {
|
|||||||
const currentValue = await page.$eval(datetimeSelector, el => el.value);
|
const currentValue = await page.$eval(datetimeSelector, el => el.value);
|
||||||
const currentDate = new Date(currentValue);
|
const currentDate = new Date(currentValue);
|
||||||
currentDate.setMinutes(currentDate.getMinutes() + 1);
|
currentDate.setMinutes(currentDate.getMinutes() + 1);
|
||||||
currentDate.setHours(currentDate.getHours() + 1);
|
currentDate.setHours(currentDate.getHours() - new Date().getTimezoneOffset()/60);
|
||||||
const newDatetime = currentDate.toISOString().slice(0, 16);
|
const newDatetime = currentDate.toISOString().slice(0, 16);
|
||||||
await page.$eval(datetimeSelector, (el, value) => el.value = value, newDatetime);
|
await page.$eval(datetimeSelector, (el, value) => el.value = value, newDatetime);
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ test("Kiosk can start and finish trip", async ({ page }, testInfo) => {
|
|||||||
const currentValue = await page.$eval(datetimeSelector, el => el.value);
|
const currentValue = await page.$eval(datetimeSelector, el => el.value);
|
||||||
const currentDate = new Date(currentValue);
|
const currentDate = new Date(currentValue);
|
||||||
currentDate.setMinutes(currentDate.getMinutes() + 1);
|
currentDate.setMinutes(currentDate.getMinutes() + 1);
|
||||||
currentDate.setHours(currentDate.getHours() + 1);
|
currentDate.setHours(currentDate.getHours() - new Date().getTimezoneOffset()/60);
|
||||||
const newDatetime = currentDate.toISOString().slice(0, 16);
|
const newDatetime = currentDate.toISOString().slice(0, 16);
|
||||||
await page.$eval(datetimeSelector, (el, value) => el.value = value, newDatetime);
|
await page.$eval(datetimeSelector, (el, value) => el.value = value, newDatetime);
|
||||||
|
|
||||||
|
@ -505,7 +505,7 @@ ORDER BY departure DESC
|
|||||||
|
|
||||||
let dep = NaiveDateTime::parse_from_str(&log.departure, "%Y-%m-%dT%H:%M").unwrap();
|
let dep = NaiveDateTime::parse_from_str(&log.departure, "%Y-%m-%dT%H:%M").unwrap();
|
||||||
let arr = NaiveDateTime::parse_from_str(&log.arrival, "%Y-%m-%dT%H:%M").unwrap();
|
let arr = NaiveDateTime::parse_from_str(&log.arrival, "%Y-%m-%dT%H:%M").unwrap();
|
||||||
if arr.timestamp() <= dep.timestamp() {
|
if arr.timestamp() < dep.timestamp() {
|
||||||
return Err(LogbookUpdateError::ArrivalNotAfterDeparture);
|
return Err(LogbookUpdateError::ArrivalNotAfterDeparture);
|
||||||
}
|
}
|
||||||
let today = Local::now().date_naive();
|
let today = Local::now().date_naive();
|
||||||
|
@ -223,10 +223,10 @@
|
|||||||
Ruderer:
|
Ruderer:
|
||||||
{% for rower in log.rowers -%}
|
{% for rower in log.rowers -%}
|
||||||
{{ rower.name }}
|
{{ rower.name }}
|
||||||
{% if rower.id == log.steering_user.id and rower.id != log.shipmaster_user.id %}
|
{%- if rower.id == log.steering_user.id and rower.id != log.shipmaster_user.id %}
|
||||||
(Steuerperson){%- endif -%}
|
(Steuerperson){%- endif -%}
|
||||||
{%- if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %},{% endif %}
|
{%- if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %},{% endif %}
|
||||||
{% endfor %}
|
{% endfor -%}
|
||||||
{% if amount_guests > 0 and log.boat.name != 'Externes Boot' %}
|
{% if amount_guests > 0 and log.boat.name != 'Externes Boot' %}
|
||||||
Gäste
|
Gäste
|
||||||
<small class="text-gray-600 dark:text-gray-100">(ohne Account)</small>:
|
<small class="text-gray-600 dark:text-gray-100">(ohne Account)</small>:
|
||||||
|
Loading…
Reference in New Issue
Block a user