mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
test(core): chat with collection & tags (#11388)
### TL:DR * AI chat with collection E2E * AI chat with tag E2E > Close BS-3007
This commit is contained in:
@@ -607,7 +607,13 @@ export class ChatPanel extends SignalWatcher(
|
||||
|
||||
return html`<div class="chat-panel-container" style=${style}>
|
||||
<div class="chat-panel-title">
|
||||
<div>${isEmbedding ? `Embedding ${done}/${total}` : 'AFFiNE AI'}</div>
|
||||
<div>
|
||||
${isEmbedding
|
||||
? html`<span data-testid="chat-panel-embedding-progress"
|
||||
>Embedding ${done}/${total}</span
|
||||
>`
|
||||
: 'AFFiNE AI'}
|
||||
</div>
|
||||
<div
|
||||
@click=${() => {
|
||||
AIProvider.toggleGeneralAIOnboarding?.(true);
|
||||
|
||||
@@ -254,6 +254,9 @@ export class ChatPanelAddPopover extends SignalWatcher(
|
||||
@property({ attribute: false })
|
||||
accessor abortController!: AbortController;
|
||||
|
||||
@property({ attribute: 'data-testid', reflect: true })
|
||||
accessor testId: string = 'ai-search-input';
|
||||
|
||||
@query('.search-input')
|
||||
accessor searchInput!: HTMLInputElement;
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ export const useExplorerCollectionNodeOperations = (
|
||||
view: (
|
||||
<IconButton
|
||||
size="16"
|
||||
data-testid="collection-add-doc-button"
|
||||
onClick={handleAddDocToCollection}
|
||||
tooltip={t[
|
||||
'com.affine.rootAppSidebar.explorer.collection-add-tooltip'
|
||||
|
||||
@@ -91,6 +91,7 @@ export const useExplorerTagNodeOperations = (
|
||||
<IconButton
|
||||
size="16"
|
||||
onClick={handleNewDoc}
|
||||
data-testid="tag-add-doc-button"
|
||||
tooltip={t['com.affine.rootAppSidebar.explorer.tag-add-tooltip']()}
|
||||
>
|
||||
<PlusIcon />
|
||||
|
||||
@@ -43,6 +43,7 @@ export const ExplorerTags = () => {
|
||||
return (
|
||||
<CollapsibleSection
|
||||
name="tags"
|
||||
testId="explorer-tags"
|
||||
headerClassName={styles.draggedOverHighlight}
|
||||
title={t['com.affine.rootAppSidebar.tags']()}
|
||||
actions={
|
||||
|
||||
Reference in New Issue
Block a user