Skip to content

Conversation

valkirilov
Copy link
Member

Description

Created e2e tests to verify the availability of the "Vector Search" page:

  • it should open the page when all requirements are met
  • it should open a fallback message when the Redis Query Engine module is not enabled
  • it should show a fallback message when Redis version doesn't support vector sets

How the tests work

  • We have page objects that define selectors for all the main elements we need to use in our tests. These page object classes also provide helper utilities that we can use in our test cases to keep them concise yet informative about what’s happening. They serve as a layer of abstraction.
  • In each test case, we have a setup step that initializes the environment and prepares a Redis instance suitable for it. Then, we open the correct page (navigate through the UI) until we reach it.
  • After that, we execute some test steps using the browser page helpers.

How to run the tests

You can always refer to the README, but simply running the following commands should do the trick for you

# From the root directory
yarn dev:api

# In a new tab, again from the root directory
yarn dev:ui

# In a new tab, but this time go to tests/playwright directory
yarn test:chromium:local-web vector-search/version-compatibility

# Then, check the detailed report and all the video recordings
yarn playwright show-report
image

Copy link
Contributor

github-actions bot commented Sep 4, 2025

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟢 Statements 81.53% 16228/19902
🟡 Branches 64.41% 7309/11347
🟡 Functions 70.3% 2271/3230
🟢 Lines 81.17% 15266/18807

@valkirilov valkirilov self-assigned this Sep 4, 2025
@valkirilov valkirilov requested a review from Copilot September 4, 2025 11:14
Copy link
Contributor

github-actions bot commented Sep 4, 2025

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 92.34% 13847/14995
🟡 Branches 74.05% 4177/5641
🟢 Functions 85.86% 2131/2482
🟢 Lines 92.14% 13236/14365

Test suite run success

2951 tests passing in 286 suites.

Report generated by 🧪jest coverage report action from aaf3540

Copy link
Contributor

@Copilot Copilot AI left a 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 creates comprehensive e2e tests for the Vector Search page to verify its availability and fallback behavior under different Redis configurations. The tests validate that the page opens correctly when requirements are met, shows appropriate fallback messages when the Redis Query Engine module is disabled, and displays version compatibility warnings when Redis doesn't support Vector Sets.

  • Implements comprehensive e2e test suite for Vector Search page functionality
  • Adds page object models for Vector Search and Create Index pages with proper selectors
  • Refactors utility functions to support multiple database configurations

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/playwright/types/databases.ts Makes host/port optional and adds new optional parameters for enhanced database configuration flexibility
tests/playwright/tests/vector-search/version-compatibility.spec.ts Implements three test cases covering Vector Search page accessibility and fallback scenarios
tests/playwright/pageObjects/pages/vector-search/vector-search-page.ts Creates page object model with selectors and navigation methods for Vector Search functionality
tests/playwright/pageObjects/pages/vector-search/create-index-page.ts Adds page object for Create Index page with verification methods
tests/playwright/helpers/utils.ts Updates utility functions to accept configurable database parameters instead of hardcoded values
tests/playwright/helpers/conf.ts Adds type annotations to all database configuration objects for better type safety
redisinsight/ui/src/pages/vector-search/pages/VectorSearchPage.tsx Adds test IDs to enable proper test automation targeting
redisinsight/ui/src/pages/vector-search/create-index/steps/*.tsx Adds test IDs to various UI components for test automation support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

github-actions bot commented Sep 4, 2025

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82% 19883/24248
🟡 Branches 67.32% 8614/12795
🟡 Functions 76.11% 5293/6954
🟢 Lines 82.42% 19464/23616

Test suite run success

5113 tests passing in 673 suites.

Report generated by 🧪jest coverage report action from aaf3540

@valkirilov valkirilov force-pushed the feature/RI-7275/e2e-vector-search-query branch from 2a4df5b to 1eb268a Compare September 4, 2025 11:22
- it should open the page when all reqreumenets are met
- it should open fallback message when redis quirey engine modue is not enabled
- it should show fallback message when redis version doens't support vector sets

re #RI-7275
@valkirilov valkirilov force-pushed the feature/RI-7275/e2e-vector-search-query branch from 1eb268a to aaf3540 Compare September 9, 2025 05:45
Copy link
Collaborator

@ArtemHoruzhenko ArtemHoruzhenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@valkirilov valkirilov merged commit 056d243 into main Sep 11, 2025
38 of 44 checks passed
@valkirilov valkirilov deleted the feature/RI-7275/e2e-vector-search-query branch September 11, 2025 05:17
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.

2 participants