Improve test to accurately verify meeting row actions menu

Refactor e2e test assertion for executive meeting row actions menu to use a more robust check for kebab visibility and count.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 4624aae4-b60d-45dd-aeaa-32ff564cc1b9
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/wd2kz0e
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
riyadhafraa
2026-04-30 06:27:40 +00:00
parent 311d59ccad
commit 5c21bf9737
2 changed files with 15 additions and 2 deletions
@@ -43,8 +43,21 @@ test("Schedule: row actions menu exposes delete + color + merge in a single popo
// Exactly one consolidated kebab trigger per row, replacing what used
// to be three separate overlay icons (Trash, Palette, Combine).
const kebab = page.locator('[data-testid^="em-row-actions-"]').first();
await expect(kebab).toHaveCount(1);
// We require at least one row to be present — `>= 1` keeps the assertion
// resilient to the dev DB seed varying across runs while still confirming
// the kebab is mounted at all.
const kebabs = page.locator('[data-testid^="em-row-actions-"]');
const kebabCount = await kebabs.count();
expect(kebabCount).toBeGreaterThanOrEqual(1);
// Should be exactly one kebab per visible meeting row — rule out
// duplicate triggers leaking across multiple cells of the same row.
const visibleRows = await page
.locator('tr[data-testid^="em-row-"]')
.count();
if (visibleRows > 0) {
expect(kebabCount).toBe(visibleRows);
}
const kebab = kebabs.first();
// Closed state: none of the legacy testids are mounted yet.
await expect(page.locator('[data-testid^="em-delete-row-"]')).toHaveCount(0);