-
Notifications
You must be signed in to change notification settings - Fork 398
RI-7275 Create e2e tests for "Create Index" flow on "Vector Search" page #4919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
||
// ** Create index step */ | ||
|
||
export const bikesIndexFieldsBoxes: VectorSearchBox[] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s a weird issue with importing the FieldTypes
enum when using it in the playwright tests. The enum is originally defined in the api
, but we’re referencing it from the ui
. For some reason, once we use it inside the tests/playwright
directory, the tests can't run anymore.
It’s likely due to a misconfiguration of playwright, but I haven’t been able to resolve the issue yet. To address this, I’ve temporarily moved the problematic code outside the file. At least now, we can directly use the rest of the constants in the tests without relying on hardcoded values across different test cases.
eb8841d
to
50081f2
Compare
Code Coverage - Backend unit tests
Test suite run success2951 tests passing in 286 suites. Report generated by 🧪jest coverage report action from 0f54c1a |
Code Coverage - Integration Tests
|
Code Coverage - Frontend unit tests
Test suite run success5117 tests passing in 673 suites. Report generated by 🧪jest coverage report action from 0f54c1a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements end-to-end tests for the "Create Index" flow on the Vector Search page. The tests verify the complete user journey from navigating to the Vector Search page, through the multi-step index creation wizard, to successful index creation.
- Created comprehensive e2e test suite using Playwright page object pattern
- Added module mocks to handle UI component imports in Node.js test environment
- Enhanced UI components with test identifiers for reliable test automation
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/playwright/tests/vector-search/create-index.spec.ts |
Main test file implementing the create index flow test |
tests/playwright/setup/module-mocks.ts |
Node.js module mocks for SVG and UI dependency imports |
tests/playwright/playwright.config.ts |
Updated config to import module mocks |
tests/playwright/pageObjects/pages/vector-search/vector-search-page.ts |
Page object for Vector Search page interactions |
tests/playwright/pageObjects/pages/vector-search/create-index-page.ts |
Page object for Create Index wizard interactions |
redisinsight/ui/src/pages/vector-search/pages/VectorSearchPage.tsx |
Added test identifier |
redisinsight/ui/src/pages/vector-search/pages/VectorSearchCreateIndexPage.tsx |
Added test identifier |
redisinsight/ui/src/pages/vector-search/create-index/steps/index.ts |
Added export for data module |
redisinsight/ui/src/pages/vector-search/create-index/steps/data.ts |
Extracted bike index data to separate file |
redisinsight/ui/src/pages/vector-search/create-index/steps/config.ts |
Removed bike index data (moved to data.ts) |
redisinsight/ui/src/pages/vector-search/create-index/steps/PreviewCommandDrawer.tsx |
Added test identifier |
redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.tsx |
Added test identifier and updated import |
redisinsight/ui/src/pages/vector-search/create-index/steps/CreateIndexStep.spec.tsx |
Updated import path |
redisinsight/ui/src/pages/vector-search/create-index/steps/AddDataStep.tsx |
Added test identifiers and container structure |
redisinsight/ui/src/pages/vector-search/create-index/steps/AddDataStep.spec.tsx |
Updated import path |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
50081f2
to
abfdc34
Compare
- necessary due to some odd issues with the imports, failing when running the playwright tests re #RI-7275
abfdc34
to
0f54c1a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
Created an e2e test to verify the "Create Index" flow on the new "Vector Search" page:
video.webm
Notes
How the tests work
How to run the tests
You can always refer to the README, but simply running the following commands should do the trick for you