|  |  |  | @@ -82,4 +82,85 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => { | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("body")).toContainText( | 
		
	
		
			
				|  |  |  |  |     "Ausfahrt korrekt eingetragen", | 
		
	
		
			
				|  |  |  |  |   ); | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  |   await page.goto('http://localhost:8000/log/show'); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator('body')).toContainText('Joe'); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator('body')).toContainText('(cox2 )'); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator('body')).toContainText('Ottensheim (25 km)'); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator('body')).toContainText('Ruderer: rower2'); | 
		
	
		
			
				|  |  |  |  | }); | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | test("Kiosk can start and cancel trip", async ({ page }, testInfo) => { | 
		
	
		
			
				|  |  |  |  |   await page.goto("http://localhost:8000/log/kiosk/ekrv2019/Linz"); | 
		
	
		
			
				|  |  |  |  |   if (testInfo.project.name.includes("Mobile")) { | 
		
	
		
			
				|  |  |  |  |     // No left boat selector on mobile views | 
		
	
		
			
				|  |  |  |  |     await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click(); | 
		
	
		
			
				|  |  |  |  |     await page.getByRole("option", { name: "Joe" }).click(); | 
		
	
		
			
				|  |  |  |  |   } else { | 
		
	
		
			
				|  |  |  |  |     await page.getByText("Joe", { exact: true }).click(); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  |   await page.getByPlaceholder("Ruderer auswählen").click(); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("option", { name: "rower2" }).click(); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("option", { name: "cox2" }).click(); | 
		
	
		
			
				|  |  |  |  |   await expect(page.getByRole("listbox")).toContainText( | 
		
	
		
			
				|  |  |  |  |     "Nur 2 Ruderer können hinzugefügt werden", | 
		
	
		
			
				|  |  |  |  |   ); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("#shipmaster-newrowerjs")).toContainText("cox"); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("#steering_person-newrowerjs")).toContainText( | 
		
	
		
			
				|  |  |  |  |     "rower2 cox", | 
		
	
		
			
				|  |  |  |  |   ); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("button", { name: "Ausfahrt eintragen" }).click(); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("body")).toContainText( | 
		
	
		
			
				|  |  |  |  |     "Ausfahrt erfolgreich hinzugefügt", | 
		
	
		
			
				|  |  |  |  |   ); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("body")).toContainText("Joe"); | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("link", { name: "Joe" }).click(); | 
		
	
		
			
				|  |  |  |  |   page.once("dialog", (dialog) => { | 
		
	
		
			
				|  |  |  |  |     dialog.accept().catch(() => {}); | 
		
	
		
			
				|  |  |  |  |   }); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("link", { name: "Löschen" }).click(); | 
		
	
		
			
				|  |  |  |  | }); | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | test("Kiosk can start and finish trip", async ({ page }, testInfo) => { | 
		
	
		
			
				|  |  |  |  |   await page.goto("http://localhost:8000/log/kiosk/ekrv2019/Linz"); | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  |   if (testInfo.project.name.includes("Mobile")) { | 
		
	
		
			
				|  |  |  |  |     // No left boat selector on mobile views | 
		
	
		
			
				|  |  |  |  |     await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click(); | 
		
	
		
			
				|  |  |  |  |     await page.getByRole("option", { name: "Joe" }).click(); | 
		
	
		
			
				|  |  |  |  |   } else { | 
		
	
		
			
				|  |  |  |  |     await page.getByText("Joe", { exact: true }).click(); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  |   await page.getByPlaceholder("Ruderer auswählen").click(); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("option", { name: "rower2" }).click(); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("option", { name: "cox2" }).click(); | 
		
	
		
			
				|  |  |  |  |   await expect(page.getByRole("listbox")).toContainText( | 
		
	
		
			
				|  |  |  |  |     "Nur 2 Ruderer können hinzugefügt werden", | 
		
	
		
			
				|  |  |  |  |   ); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("#shipmaster-newrowerjs")).toContainText("cox"); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("#steering_person-newrowerjs")).toContainText( | 
		
	
		
			
				|  |  |  |  |     "rower2 cox", | 
		
	
		
			
				|  |  |  |  |   ); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("button", { name: "Ausfahrt eintragen" }).click(); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("body")).toContainText( | 
		
	
		
			
				|  |  |  |  |     "Ausfahrt erfolgreich hinzugefügt", | 
		
	
		
			
				|  |  |  |  |   ); | 
		
	
		
			
				|  |  |  |  |   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(); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("combobox", { name: "Destination" }).click(); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("combobox", { name: "Destination" }).fill("Ottensheim"); | 
		
	
		
			
				|  |  |  |  |   await page.getByRole("button", { name: "Ausfahrt beenden" }).click(); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator("body")).toContainText( | 
		
	
		
			
				|  |  |  |  |     "Ausfahrt korrekt eingetragen", | 
		
	
		
			
				|  |  |  |  |   ); | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  |   await page.getByRole('link', { name: 'Logbuch' }).click(); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator('body')).toContainText('Joe'); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator('body')).toContainText('(cox2 )'); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator('body')).toContainText('Ottensheim (25 km)'); | 
		
	
		
			
				|  |  |  |  |   await expect(page.locator('body')).toContainText('Ruderer: rower2'); | 
		
	
		
			
				|  |  |  |  | }); | 
		
	
	
		
			
				
					
					| 
							
							
							
						 |  |  |   |