mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-02 01:20:23 +08:00
fix(e2e): resolve iframe toolbar strict mode violation (#837)
* fix(e2e): resolve strict mode violation in iframe test Use .first() with [title*="Diagram"] selector to avoid matching multiple elements. Fixes CI failure in E2E Tests job. * fix(e2e): use .first() to resolve strict mode violation * style: fix biome formatting in iframe test * style: fix biome formatting in iframe test * fix(e2e): use .or().first() to handle both text and title selectors * fix(e2e): increase timeout for draw.io toolbar visibility check * fix(e2e): filter visible elements to avoid selecting hidden toolbar
This commit is contained in:
@@ -35,8 +35,10 @@ test.describe("Iframe Interaction", () => {
|
||||
await expect(
|
||||
frame
|
||||
.locator('text="Diagram"')
|
||||
.or(frame.locator('[title*="Diagram"]')),
|
||||
).toBeVisible({ timeout: 10000 })
|
||||
.or(frame.locator('[title*="Diagram"]'))
|
||||
.filter({ visible: true })
|
||||
.first(),
|
||||
).toBeVisible({ timeout: 30000 })
|
||||
})
|
||||
|
||||
test("diagram XML is rendered in iframe after generation", async ({
|
||||
|
||||
Reference in New Issue
Block a user