Abgabe Max Kupper
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
const { test, expect, _electron: electron } = require("@playwright/test");
|
||||
const path = require("path");
|
||||
|
||||
test("Dialog öffnen & schließen", async () => {
|
||||
const app = await electron.launch({
|
||||
args: [path.join(__dirname, "../main.js")]
|
||||
});
|
||||
|
||||
const win = await app.firstWindow();
|
||||
|
||||
// Home-Button sicherheitshalber klicken
|
||||
await win.click('button:has-text("Home")');
|
||||
|
||||
// Dialog öffnen
|
||||
await win.click('button:has-text("Dialog öffnen")');
|
||||
|
||||
// Dialog sichtbar
|
||||
await expect(win.locator('text=Beispiel-Dialog')).toBeVisible();
|
||||
|
||||
// OK Button
|
||||
await win.click('button:has-text("OK")');
|
||||
|
||||
// Dialog sollte verschwinden
|
||||
await expect(win.locator('text=Beispiel-Dialog')).toHaveCount(0);
|
||||
|
||||
await app.close();
|
||||
});
|
||||
Reference in New Issue
Block a user