Skip to content

Commit 180a639

Browse files
committed
fix: use completion app seed for duplicate, export, and switch tests
1 parent cd8b989 commit 180a639

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

e2e/features/apps/export-app.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Feature: Export app DSL
33
Scenario: Export the DSL file for an existing app
44
Given I am signed in as the default E2E admin
5-
And there is an existing E2E chat app available for testing
5+
And there is an existing E2E completion app available for testing
66
When I open the apps console
77
And I open the options menu for the last created E2E app
88
And I click "Export DSL" in the app options menu

e2e/features/apps/switch-app-mode.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@apps @authenticated @core
22
Feature: Switch app mode
3-
Scenario: Switch a Chatbot app to Chatflow (Workflow Orchestrate)
3+
Scenario: Switch a Completion app to Workflow Orchestrate
44
Given I am signed in as the default E2E admin
5-
And there is an existing E2E chat app available for testing
5+
And there is an existing E2E completion app available for testing
66
When I open the apps console
77
And I open the options menu for the last created E2E app
88
And I click "Switch to Workflow Orchestrate" in the app options menu

e2e/features/step-definitions/apps/duplicate-app.steps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createTestApp } from '../../../support/api'
44

55
Given('there is an existing E2E app available for testing', async function (this: DifyWorld) {
66
const name = `E2E Test App ${Date.now()}`
7-
const app = await createTestApp(name)
7+
const app = await createTestApp(name, 'completion')
88
this.lastCreatedAppName = app.name
99
this.createdAppIds.push(app.id)
1010
})

e2e/features/step-definitions/apps/switch-app-mode.steps.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ import { Given, Then, When } from '@cucumber/cucumber'
33
import { expect } from '@playwright/test'
44
import { createTestApp } from '../../../support/api'
55

6-
Given('there is an existing E2E chat app available for testing', async function (this: DifyWorld) {
7-
const name = `E2E Test App ${Date.now()}`
8-
const app = await createTestApp(name, 'chat')
9-
this.lastCreatedAppName = app.name
10-
this.createdAppIds.push(app.id)
11-
})
6+
Given(
7+
'there is an existing E2E completion app available for testing',
8+
async function (this: DifyWorld) {
9+
const name = `E2E Test App ${Date.now()}`
10+
const app = await createTestApp(name, 'completion')
11+
this.lastCreatedAppName = app.name
12+
this.createdAppIds.push(app.id)
13+
},
14+
)
1215

1316
When('I confirm the app switch', async function (this: DifyWorld) {
1417
await this.getPage().getByRole('button', { name: 'Start switch' }).click()

0 commit comments

Comments
 (0)