test(e2e): wait for apps console readiness (#41357)

This commit is contained in:
yyh authored and GitHub committed 2026-08-27 07:40:23 +00:00
1 parent 1be72af661
commit 5aac67f570
1 file changed
+2
@@ -3,6 +3,7 @@ import { Given, When } from '@cucumber/cucumber'
import { zPostAppsByAppIdCopyResponse } from '@dify/contracts/api/console/apps/zod.gen'
import { expect } from '@playwright/test'
import { createTestApp } from '../../../support/api/apps'
import { waitForAppsConsole } from '../../../support/apps'
import { createE2EResourceName } from '../../../support/naming'
Given('there is an existing E2E app available for testing', async function (this: DifyWorld) {
@@ -17,6 +18,7 @@ When('I open the options menu for the last created E2E app', async function (thi
if (!appName) throw new Error('No app name stored. Run "I enter a unique E2E app name" first.')
const page = this.getPage()
await waitForAppsConsole(page, 30_000)
const studio = page.getByRole('region', { name: 'Studio' })
const appLink = studio.getByRole('link', { name: appName, exact: true })
await expect(appLink).toBeVisible()