diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index e5adfb0..520a154 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -72,5 +72,6 @@ export default defineConfig({ webServer: { timeout: 15 * 60 * 1000, command: 'cd .. && ./test_db.sh && cargo r', + url: 'http://127.0.0.1:8000' }, }); diff --git a/frontend/scss/app.scss b/frontend/scss/app.scss index 770dc11..02e94d7 100644 --- a/frontend/scss/app.scss +++ b/frontend/scss/app.scss @@ -13,3 +13,4 @@ @import 'components/search'; @import 'components/important'; @import 'components/searchable-table'; +@import 'components/notification'; diff --git a/frontend/scss/components/_notification.scss b/frontend/scss/components/_notification.scss new file mode 100644 index 0000000..0532299 --- /dev/null +++ b/frontend/scss/components/_notification.scss @@ -0,0 +1,5 @@ +.notification { + right: -.2rem; + top: -.1rem; + font-size: .5rem; +} diff --git a/frontend/tests/cox.spec.ts b/frontend/tests/cox.spec.ts index c19ae45..d38dc96 100644 --- a/frontend/tests/cox.spec.ts +++ b/frontend/tests/cox.spec.ts @@ -8,7 +8,7 @@ test("cox can create and delete trip", async ({ page }) => { await page.getByPlaceholder("Passwort").fill("cox"); await page.getByPlaceholder("Passwort").press("Enter"); await page.locator('li').filter({ hasText: 'Geplante Ausfahrten' }).getByRole('link').click(); - await page.locator(".relative").first().click(); + await page.locator('a[href="#"]:has-text("Ausfahrt")').first().click(); await page.locator("#sidebar #planned_starting_time").click(); await page.locator("#sidebar #planned_starting_time").fill("18:00"); await page.locator("#sidebar #planned_starting_time").press("Tab"); @@ -38,8 +38,8 @@ test.describe("cox can edit trips", () => { await page.getByPlaceholder("Name").press("Tab"); await page.getByPlaceholder("Passwort").fill("cox"); await page.getByPlaceholder("Passwort").press("Enter"); - await page.locator('li').filter({ hasText: 'Geplante Ausfahrten' }).getByRole('link').click(); - await page.locator(".relative").first().click(); + await page.locator('li').filter({ hasText: 'Geplante Ausfahrten' }).getByRole('link').click(); + await page.locator('a[href="#"]:has-text("Ausfahrt")').first().click(); await page.locator("#sidebar #planned_starting_time").click(); await page.locator("#sidebar #planned_starting_time").fill("18:00"); await page.locator("#sidebar #planned_starting_time").press("Tab"); diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index ba3c29c..404ecf5 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -31,21 +31,26 @@ Hü {{ loggedin_user.name }} - {% if loggedin_user.amount_unread_notifications > 0 %} - - - {{ loggedin_user.amount_unread_notifications }} - {% endif %} -
+
+ {% if loggedin_user.amount_unread_notifications > 0 %} + + + + {{ loggedin_user.amount_unread_notifications }} + + + {% endif %} {% if participants | length > 0 %} {% for rower in participants %} - {{ rower.name }} - {% if rower.is_guest %}(Scheckbuch){% endif %} - {% if rower.is_real_guest %} - (Gast) - {% if allow_removing %} - Abmelden +
+ {{ rower.name }} + {% if rower.is_guest %}(Scheckbuch){% endif %} + {% if rower.is_real_guest %} + (Gast) + {% if allow_removing %} + + + + + Abmelden + + {% endif %} {% endif %} - {% endif %} - -
+ +
{% endfor %} {% else %} {{ text }} diff --git a/templates/index.html.tera b/templates/index.html.tera index 6392869..b200554 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -2,7 +2,11 @@ {% extends "base" %} {% block content %}
-

Ruderassistent

+

+ Ruder + + assistent +

-