Skip to content

Commit

Permalink
fix: test case
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit committed Oct 15, 2024
1 parent 5f5fccb commit 5c80975
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/affine-cloud/e2e/copilot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const clearChat = async (page: Page) => {

const collectChat = async (page: Page) => {
const chatPanel = await page.waitForSelector('.chat-panel-messages');
if (await chatPanel.$('.chat-panel-messages-placeholder')) {
return [];
}
// wait ai response
await page.waitForSelector('.chat-panel-messages .message chat-copy-more');
const lastMessage = await chatPanel.$$('.message').then(m => m[m.length - 1]);
Expand Down Expand Up @@ -176,6 +179,7 @@ test.describe('chat panel', () => {
await focusToEditor(page);
// insert below
await page.getByTestId('action-insert-below').click();
await page.waitForSelector('affine-format-bar-widget editor-toolbar');
const editorContent = await getEditorContent(page);
expect(editorContent).toBe(content);
});
Expand Down

0 comments on commit 5c80975

Please sign in to comment.