use local timezone where appropriate and fix tests between 0 and 1 o'clock

This commit is contained in:
2024-03-05 00:17:02 +01:00
parent 007b87e8ad
commit 5078c5f341
4 changed files with 25 additions and 9 deletions

View File

@ -74,8 +74,16 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => {
await expect(page.locator("body")).toContainText("Joe");
await page.goto("http://localhost:8000/log");
await page.waitForTimeout(60000);
await page.locator("div:nth-child(2) > .border-0").click();
// Add a minute
await page.locator('#arrivaljs').click();
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('ArrowUp');
await page.getByRole("combobox", { name: "Destination" }).click();
await page.getByRole("combobox", { name: "Destination" }).fill("Ottensheim");
await page.getByRole("button", { name: "Ausfahrt beenden" }).click();
@ -149,8 +157,16 @@ test("Kiosk can start and finish trip", async ({ page }, testInfo) => {
await expect(page.locator("body")).toContainText("Joe");
await page.goto("http://localhost:8000/log");
await page.waitForTimeout(60000);
await page.locator('div:nth-child(2) > .pt-2 > div > div > div:nth-child(2) > .border-0').click(); // 2 trips currently running, try to close second one
// Add a minute
await page.locator('#arrivaljs').click();
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('Tab');
await page.locator('#arrivaljs').press('ArrowUp');
await page.getByRole("combobox", { name: "Destination" }).click();
await page.getByRole("combobox", { name: "Destination" }).fill("Ottensheim");
await page.getByRole("button", { name: "Ausfahrt beenden" }).click();