diff --git a/control/frontend/e2e/basic.test.ts b/control/frontend/e2e/basic.test.ts index 751b624..b4751ab 100644 --- a/control/frontend/e2e/basic.test.ts +++ b/control/frontend/e2e/basic.test.ts @@ -2,5 +2,38 @@ import { expect, test } from '@playwright/test'; test('page loads', async ({ page }) => { await page.goto('/'); - await expect(page.locator('main')).toBeVisible(); + await expect(page.getByText('PLG MuDiCS')).toBeVisible(); +}); + +test('page loads without problems', async ({ page }) => { + await page.goto('/'); + await expect(page.getByText('PLG MuDiCS')).toBeVisible(); + await expect(page.getByTestId('notification')).not.toBeVisible(); +}); + +test('diplay click shows files', async ({ page }) => { + await page.goto('/'); + await page.getByTestId('display').click(); + await expect(page.getByTestId('inode').first()).toBeVisible(); +}); + +test('show text', async ({ page }) => { + await page.goto('/'); + await page.getByTestId('display').click(); + + const controlButton = page.getByText('Text anzeigen'); + await expect(controlButton).toBeVisible(); + await controlButton.click(); + + const textPopup = page.getByTestId('text-popup'); + await expect(textPopup).toBeVisible(); + const textArea = textPopup.getByRole('textbox'); + await expect(textArea).toBeVisible(); + await textArea.fill('Hello, world!'); + + const submitButton = textPopup.locator('button').filter({ hasText: 'Text anzeigen' }); + await submitButton.click(); + await expect( + page.locator('[data-testid="notification"]:not(:has-text("Fehler 500"))') + ).not.toBeVisible(); }); diff --git a/control/frontend/playwright.config.ts b/control/frontend/playwright.config.ts index aa4ea48..9189563 100644 --- a/control/frontend/playwright.config.ts +++ b/control/frontend/playwright.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from '@playwright/test'; export default defineConfig({ + fullyParallel: true, webServer: { command: 'deno task build && deno task preview', port: 4173 diff --git a/control/frontend/src/components/DisplayObject.svelte b/control/frontend/src/components/DisplayObject.svelte index e097f8a..4af293a 100755 --- a/control/frontend/src/components/DisplayObject.svelte +++ b/control/frontend/src/components/DisplayObject.svelte @@ -45,6 +45,7 @@
{ diff --git a/control/frontend/src/components/InodeElement.svelte b/control/frontend/src/components/InodeElement.svelte index 4bdf1ad..91c4ff8 100755 --- a/control/frontend/src/components/InodeElement.svelte +++ b/control/frontend/src/components/InodeElement.svelte @@ -92,7 +92,7 @@ } -
+
{#if !not_interactable}
-
+
+ {#each $notifications as n (n.id)} +
+
+ {n.title} + +
- {n.message} + {n.message} -
-
-
-
- {/each} +
+
+
+
+ {/each}
diff --git a/control/frontend/src/components/TipTapInput.svelte b/control/frontend/src/components/TipTapInput.svelte index 2862943..6c0260b 100644 --- a/control/frontend/src/components/TipTapInput.svelte +++ b/control/frontend/src/components/TipTapInput.svelte @@ -152,7 +152,7 @@ {/each} -
+