fix: DigitalOutputsVies.tsx
This commit is contained in:
@@ -97,34 +97,28 @@ export async function runMeldungenTest(page: Page) {
|
||||
await page.waitForTimeout(30);
|
||||
}
|
||||
|
||||
// Dynamische Zeilen und Zellen (Beispiel für mehrere Zeitstempel)
|
||||
const zeiten = [
|
||||
"11.08.2025, 11:52:44",
|
||||
"11.08.2025, 11:51:14",
|
||||
"11.08.2025, 11:44:19",
|
||||
"11.08.2025, 11:43:44",
|
||||
"11.08.2025, 11:36:42",
|
||||
"11.08.2025, 11:35:45",
|
||||
"11.08.2025, 11:21:16",
|
||||
"11.08.2025, 11:21:05",
|
||||
"11.08.2025, 11:14:01",
|
||||
];
|
||||
for (const zeit of zeiten) {
|
||||
const row = page.getByRole("row", { name: zeit });
|
||||
await highlightAndExpectVisible(page, row.getByRole("cell").first());
|
||||
await row.getByRole("cell").first().click();
|
||||
await page.waitForTimeout(20);
|
||||
|
||||
const timeCell = page.getByRole("cell", { name: zeit.split(", ")[1] });
|
||||
await highlightAndExpectVisible(page, timeCell);
|
||||
await timeCell.click();
|
||||
await page.waitForTimeout(20);
|
||||
|
||||
for (let i = 2; i <= 4; i++) {
|
||||
const cell = row.getByRole("cell").nth(i);
|
||||
await highlightAndExpectVisible(page, cell);
|
||||
await cell.click();
|
||||
await page.waitForTimeout(20);
|
||||
// Interact with the first few data rows generically instead of hardcoded timestamps
|
||||
const table = page.locator("table");
|
||||
await table.first().waitFor({ state: "visible", timeout: 15000 });
|
||||
const rows = table.locator("tbody tr");
|
||||
const rowCount = await rows.count();
|
||||
const maxRows = Math.min(5, rowCount);
|
||||
for (let i = 0; i < maxRows; i++) {
|
||||
const row = rows.nth(i);
|
||||
const firstCell = row.locator("td").first();
|
||||
await highlightAndExpectVisible(page, firstCell);
|
||||
await firstCell.click();
|
||||
// click a couple of other cells if present
|
||||
const secondCell = row.locator("td").nth(1);
|
||||
if (await secondCell.count()) {
|
||||
await highlightAndExpectVisible(page, secondCell);
|
||||
await secondCell.click();
|
||||
}
|
||||
const thirdCell = row.locator("td").nth(2);
|
||||
if (await thirdCell.count()) {
|
||||
await highlightAndExpectVisible(page, thirdCell);
|
||||
await thirdCell.click();
|
||||
}
|
||||
await page.waitForTimeout(20);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user