Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/02-testing/e2e-test-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Actual UI Structure (from error-context.md):
- Welcome Screen:
- img
- heading "Welcome to DocuNote" [level=2]
- paragraph: "Upload a TXT or PDF file and start asking questions..."
- paragraph: "Upload documents (.txt, .pdf, .docx, .md, .csv) or add website URLs..."
- Input Area:
- textbox "Ask a question about your document(s)..."
- button "Send message" [disabled]
Expand Down Expand Up @@ -91,8 +91,8 @@ Actual UI Structure (from error-context.md):
#### Chat Functionality Tests (20 failures)
- **Test:** "should show empty state without sources"
- **Expected:** Text matching `/upload files or add urls/i`
- **Actual:** Shows "Upload a TXT or PDF file and start asking questions..."
- **Fix Needed:** Update text matcher to actual welcome message
- **Actual:** Shows "Upload documents (.txt, .pdf, .docx, .md, .csv) or add website URLs..."
- **Fix Needed:** ✅ FIXED - Updated text matcher to actual welcome message

- **Test:** "should not allow empty message submission"
- **Expected:** `input[placeholder*="Ask"]`
Expand Down Expand Up @@ -170,7 +170,7 @@ Both test suites suffer from the **same root cause**:
**Test Expected:** "upload files or add urls" text
**Screenshot Shows:**
- Welcome heading: "Welcome to DocuNote"
- Description: "Upload a TXT or PDF file and start asking questions to get insights from your document."
- Description: "Upload documents (.txt, .pdf, .docx, .md, .csv) or add website URLs to start asking questions and get insights from your content."
- Input field visible but disabled until files added
- Sidebar visible with "No URLs added" and "No files added" messages

Expand All @@ -196,7 +196,7 @@ Both test suites suffer from the **same root cause**:
- `input[type="file"]` → Click "Add Files" button, then use hidden input

2. Update expected text:
- `/upload files or add urls/i` → `/Upload a TXT or PDF file/i`
- ✅ FIXED: Updated to `/Upload documents.*or add website URLs/i` to match actual welcome message

3. Skip theme tests (or update if Settings has theme toggle)

Expand Down
2 changes: 1 addition & 1 deletion e2e/chat-functionality.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.describe('Chat Functionality', () => {
});

test('should show empty state without sources', async ({ page }) => {
await expect(page.locator('text=/Upload a TXT or PDF file/i')).toBeVisible();
await expect(page.locator('text=/Upload documents.*or add website URLs/i')).toBeVisible();
});

test('should not allow empty message submission', async ({ page }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/app/page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('Main Page Component', () => {
it('should show upload prompt when no files uploaded', () => {
renderPage();

expect(screen.getByText(/Upload a TXT or PDF file/i)).toBeInTheDocument();
expect(screen.getByText(/Upload documents.*\.txt.*\.pdf.*\.docx.*\.md.*\.csv/i)).toBeInTheDocument();
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/components/chat-messages.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('ChatMessages', () => {
render(<ChatMessages messages={[]} hasFiles={false} {...mockEditHandlers} />);

expect(screen.getByText(/Welcome to DocuNote/i)).toBeInTheDocument();
expect(screen.getByText(/Upload a TXT or PDF file/i)).toBeInTheDocument();
expect(screen.getByText(/Upload documents.*\.txt.*\.pdf.*\.docx.*\.md.*\.csv/i)).toBeInTheDocument();
});

it('renders prompt to ask questions when files exist but no messages', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/chat-messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function ChatMessages({
</div>
<h2 className="text-2xl font-headline font-semibold">Welcome to DocuNote</h2>
<p className="max-w-md text-muted-foreground">
{hasFiles ? 'Your files are ready. Ask a question to get started.' : 'Upload a TXT or PDF file and start asking questions to get insights from your document.'}
{hasFiles ? 'Your files are ready. Ask a question to get started.' : 'Upload documents (.txt, .pdf, .docx, .md, .csv) or add website URLs to start asking questions and get insights from your content.'}
</p>
</div>
);
Expand Down