mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:06:51 +08:00
test: cover shared workflow app run (#35634)
This commit is contained in:
parent
28a26f2d59
commit
e2becd6746
2
.github/workflows/web-e2e.yml
vendored
2
.github/workflows/web-e2e.yml
vendored
@ -13,7 +13,7 @@ concurrency:
|
||||
jobs:
|
||||
test:
|
||||
name: Web Full-Stack E2E
|
||||
runs-on: depot-ubuntu-24.04
|
||||
runs-on: depot-ubuntu-24.04-4
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
@ -17,3 +17,10 @@ Feature: Share app publicly
|
||||
Given a workflow app has been published and shared via API
|
||||
When I open the shared app URL
|
||||
Then the shared app page should be accessible
|
||||
|
||||
@unauthenticated
|
||||
Scenario: Run a shared workflow app without authentication
|
||||
Given a workflow app has been published and shared via API
|
||||
When I open the shared app URL
|
||||
And I run the shared workflow app
|
||||
Then the shared workflow run should succeed
|
||||
|
||||
@ -37,3 +37,15 @@ Then('the shared app page should be accessible', async function (this: DifyWorld
|
||||
await expect(this.getPage()).toHaveURL(/\/(workflow|chat)\/[a-zA-Z0-9]+/, { timeout: 15_000 })
|
||||
await expect(this.getPage().locator('body')).toBeVisible({ timeout: 10_000 })
|
||||
})
|
||||
|
||||
When('I run the shared workflow app', async function (this: DifyWorld) {
|
||||
const page = this.getPage()
|
||||
const runButton = page.getByTestId('run-button')
|
||||
|
||||
await expect(runButton).toBeEnabled({ timeout: 15_000 })
|
||||
await runButton.click()
|
||||
})
|
||||
|
||||
Then('the shared workflow run should succeed', async function (this: DifyWorld) {
|
||||
await expect(this.getPage().getByTestId('status-icon-success')).toBeVisible({ timeout: 55_000 })
|
||||
})
|
||||
|
||||
@ -12,8 +12,10 @@ Given('a minimal runnable workflow draft has been synced', async function (this:
|
||||
|
||||
When('I run the workflow', async function (this: DifyWorld) {
|
||||
const page = this.getPage()
|
||||
await page.getByText('Test Run').click()
|
||||
await expect(page.getByText('Running').first()).toBeVisible({ timeout: 15_000 })
|
||||
const testRunButton = page.getByText('Test Run')
|
||||
|
||||
await expect(testRunButton).toBeVisible({ timeout: 15_000 })
|
||||
await testRunButton.click()
|
||||
})
|
||||
|
||||
Then('the workflow run should succeed', async function (this: DifyWorld) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user