mirror of
https://github.com/langgenius/dify.git
synced 2026-05-12 07:37:09 +08:00
test(e2e): add app detail navigation and redirect scenarios (#35502)
This commit is contained in:
parent
a6905b25cf
commit
da9d9cb28f
26
e2e/features/apps/app-detail-navigation.feature
Normal file
26
e2e/features/apps/app-detail-navigation.feature
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
@apps @authenticated @core
|
||||||
|
Feature: App detail navigation
|
||||||
|
|
||||||
|
Scenario: Opening a workflow app navigates to the workflow editor
|
||||||
|
Given I am signed in as the default E2E admin
|
||||||
|
And a "workflow" app has been created via API
|
||||||
|
When I open the app from the app list
|
||||||
|
Then I should land on the workflow editor
|
||||||
|
|
||||||
|
Scenario: Opening a chatbot app navigates to the configuration page
|
||||||
|
Given I am signed in as the default E2E admin
|
||||||
|
And a "chat" app has been created via API
|
||||||
|
When I open the app from the app list
|
||||||
|
Then I should land on the app configuration page
|
||||||
|
|
||||||
|
Scenario: The develop tab is accessible from a workflow app
|
||||||
|
Given I am signed in as the default E2E admin
|
||||||
|
And a "workflow" app has been created via API
|
||||||
|
When I navigate to the app develop page
|
||||||
|
Then I should be on the app develop page
|
||||||
|
|
||||||
|
Scenario: The overview tab is accessible from a workflow app
|
||||||
|
Given I am signed in as the default E2E admin
|
||||||
|
And a "workflow" app has been created via API
|
||||||
|
When I navigate to the app overview page
|
||||||
|
Then I should be on the app overview page
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
import type { DifyWorld } from '../../support/world'
|
||||||
|
import { Then, When } from '@cucumber/cucumber'
|
||||||
|
import { expect } from '@playwright/test'
|
||||||
|
|
||||||
|
When('I navigate to the app develop page', async function (this: DifyWorld) {
|
||||||
|
const appId = this.createdAppIds.at(-1)
|
||||||
|
await this.getPage().goto(`/app/${appId}/develop`)
|
||||||
|
})
|
||||||
|
|
||||||
|
When('I navigate to the app overview page', async function (this: DifyWorld) {
|
||||||
|
const appId = this.createdAppIds.at(-1)
|
||||||
|
await this.getPage().goto(`/app/${appId}/overview`)
|
||||||
|
})
|
||||||
|
|
||||||
|
Then('I should be on the app develop page', async function (this: DifyWorld) {
|
||||||
|
await expect(this.getPage()).toHaveURL(/\/app\/[^/]+\/develop(?:\?.*)?$/, { timeout: 30_000 })
|
||||||
|
})
|
||||||
|
|
||||||
|
Then('I should be on the app overview page', async function (this: DifyWorld) {
|
||||||
|
await expect(this.getPage()).toHaveURL(/\/app\/[^/]+\/overview(?:\?.*)?$/, { timeout: 30_000 })
|
||||||
|
})
|
||||||
Loading…
Reference in New Issue
Block a user