Abgabe Max Kupper
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
const { test, expect, _electron: electron } = require("@playwright/test");
|
||||
const path = require("path");
|
||||
|
||||
test("Dropdown Auswahl", async () => {
|
||||
const app = await electron.launch({
|
||||
args: [path.join(__dirname, "../main.js")]
|
||||
});
|
||||
|
||||
const win = await app.firstWindow();
|
||||
const page = win.page();
|
||||
|
||||
// Dropdown öffnen
|
||||
// await win.click('id=dialog-example');
|
||||
await page.getByTestId('dropdown-example').click();
|
||||
|
||||
// Option 2 wählen
|
||||
await win.click('div[role="option"]:has-text("Option 2")');
|
||||
|
||||
// Prüfen ob ausgewählt
|
||||
const text = await win.innerText(".ms-Dropdown-title");
|
||||
expect(text).toBe("Option 2");
|
||||
|
||||
await app.close();
|
||||
});
|
||||
Reference in New Issue
Block a user