mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 06:16:59 +08:00
fix(core): generate the image cannot enter text prompt (#12717)
Close [AI-167](https://linear.app/affine-design/issue/AI-167)   <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved AI panel behavior with explicit modes for input and answer generation, providing a more intuitive user experience when interacting with AI features. - **Refactor** - Streamlined AI panel toggling logic for more consistent and predictable panel states during different actions. - **Tests** - Enhanced AI image generation test to simulate user input and send actions for more accurate end-to-end validation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -551,9 +551,11 @@ export class EditorUtils {
|
||||
explainImage: this.createAction(page, () =>
|
||||
page.getByTestId('action-explain-image').click()
|
||||
),
|
||||
generateImage: this.createAction(page, () =>
|
||||
page.getByTestId('action-generate-image').click()
|
||||
),
|
||||
generateImage: this.createAction(page, async () => {
|
||||
await page.getByTestId('action-generate-image').click();
|
||||
await page.keyboard.type('generate an image');
|
||||
await page.getByTestId('ai-panel-input-send').click();
|
||||
}),
|
||||
generateCaption: this.createAction(page, () =>
|
||||
page.getByTestId('action-generate-caption').click()
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user