Skip to content

PINE-33: E2E-007 Metadata Filter Tests - #31

Merged
stepandel merged 3 commits into
masterfrom
feat/pine-33-metadata-filter-tests
Feb 4, 2026
Merged

PINE-33: E2E-007 Metadata Filter Tests#31
stepandel merged 3 commits into
masterfrom
feat/pine-33-metadata-filter-tests

Conversation

@stepandel

Copy link
Copy Markdown
Owner

Summary

Implements comprehensive E2E tests for metadata filtering functionality as specified in PINE-33.

Test Coverage

17 comprehensive test cases covering:

  • ✅ Add metadata filter row
  • ✅ Select field, operator, value
  • ✅ Apply filter and verify results
  • ✅ Add multiple filters (AND logic)
  • ✅ Remove filter row
  • ✅ Clear all filters
  • ✅ All operator types: =, !=, >, >=, <, <=, in, not in, exists
  • ✅ Field type support: string, number, boolean
  • ✅ Keyboard shortcuts (Enter to search)
  • ✅ Operator reset when field type changes

Infrastructure

Test Framework:

  • Playwright for Electron E2E testing
  • Helper utilities for app lifecycle and filter operations
  • CI-ready configuration with retries and reporting

Files Created:

  • playwright.config.ts - Playwright configuration
  • e2e/metadata-filter.spec.ts - Comprehensive test suite (17 tests)
  • e2e/helpers/electron-app.ts - Test helper utilities
  • e2e/README.md - Test documentation and usage guide
  • e2e/IMPLEMENTATION.md - Implementation summary

Files Modified:

  • package.json - Added test scripts (test:e2e, test:e2e:ui, test:e2e:debug, test:e2e:report)
  • .gitignore - Added test artifact exclusions
  • src/components/query/MetadataFilterRow.tsx - Added data-testid attributes
  • src/components/query/QueryToolbar.tsx - Added data-testid attributes

Filter Translation Testing

Tests validate filter translation for Pinecone provider with support for all operators:

  • Equality: $eq, $ne
  • Comparison: $gt, $gte, $lt, $lte
  • Array: $in, $nin
  • Existence: $exists

Note: Structure is ready to support Qdrant and Weaviate testing when multi-provider support is merged.

Component Enhancements

Added data-testid attributes to enable reliable E2E testing:

MetadataFilterRow:

  • metadata-filter-row, filter-field-select, filter-field-input
  • filter-operator-select, filter-value-input
  • remove-filter-button, add-filter-button

QueryToolbar:

  • query-toolbar, scope-select, search-text-input, id-search-input
  • limit-select, rerank-checkbox, add-filter-button
  • alpha-slider, metadata-filters-container

Running the Tests

# Build the app first
pnpm build

# Run all E2E tests
pnpm test:e2e

# Interactive UI mode
pnpm test:e2e:ui

# Debug mode
pnpm test:e2e:debug

# View test report
pnpm test:e2e:report

Test Data Requirements

Tests require a Pinecone profile with test data containing metadata fields:

{
  "category": "document",
  "status": "active", 
  "score": 0.85,
  "isActive": true
}

Test Plan

  • Test metadata filter row operations (add, remove, clear)
  • Test all operator types with appropriate field types
  • Test multiple filters with AND logic
  • Test keyboard shortcuts and UX features
  • Add comprehensive documentation
  • Add data-testid attributes for reliable selectors
  • Configure CI-ready test infrastructure

Related Issues

Closes #PINE-33

🤖 Generated with Claude Code

Implemented complete E2E test suite for metadata filter functionality:

Tests:
- Add/remove metadata filter rows
- Select field, operator, and value
- Apply filters and verify results
- Multiple filters with AND logic
- All operator types: =, !=, >, >=, <, <=, in, not in, exists
- Field type support: string, number, boolean
- Keyboard shortcuts (Enter to search)
- Operator reset on field type change

Infrastructure:
- Playwright configuration for Electron testing
- Test helpers for app lifecycle and filter operations
- Comprehensive documentation (README, IMPLEMENTATION)

Component Updates:
- Added data-testid attributes to MetadataFilterRow
- Added data-testid attributes to QueryToolbar
- Enhanced testability without breaking existing functionality

Configuration:
- Added test scripts to package.json
- Updated .gitignore for test artifacts
- CI-ready configuration with retries and reporting

17 comprehensive test cases covering all metadata filtering features
on the Pinecone provider. Structure ready for Qdrant/Weaviate when
multi-provider support is merged.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Feb 3, 2026

Copy link
Copy Markdown

Code Review

Issue: Missing @playwright/test dependency

The PR adds test scripts and test files that import from @playwright/test, but this package is not listed in devDependencies in package.json:26-27.

Running pnpm test:e2e will fail because the package is not installed. The following files require @playwright/test:

Suggested fix:

"devDependencies": {
  "@playwright/test": "^1.40.0",
  "@tailwindcss/postcss": "^4.1.18",
  // ... rest of devDependencies
}

Resolved conflicts by:
- Combined test artifacts patterns in .gitignore
- Merged test scripts in package.json, keeping test:build and adding test:e2e:report
- Merged playwright.config.ts with detailed comments and json reporter
- Regenerated pnpm-lock.yaml

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 4, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@stepandel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/pine-33-metadata-filter-tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@stepandel
stepandel merged commit 37e175c into master Feb 4, 2026
2 checks passed
@stepandel
stepandel deleted the feat/pine-33-metadata-filter-tests branch February 4, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant