Cu 86bznyre9 settings end to end testing#293
Cu 86bznyre9 settings end to end testing#293NyashaMuusha wants to merge 10 commits intoCU-86bznypcf_Notifications-End-To-End-Testingfrom
Conversation
…e-records-filter CU-86bzr9373 - Remove UID from browse records filter
|
Task linked: CU-86bznyre9 Settings-End-To-End-Testing |
WalkthroughThe recent updates significantly enhance the testing capabilities of the JeMPI_UI project by integrating Cypress for both end-to-end and component testing. New configuration files streamline the testing setup, while various test files cover essential application features like notifications, settings, and dashboards. Improvements to UI components enhance accessibility and usability, fostering a more effective testing environment. Collectively, these changes promote robust and maintainable testing practices throughout the application. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant Cypress
User->>Cypress: Start Tests
Cypress->>App: Load App Components
App->>Cypress: Render UI
Cypress->>App: Trigger User Interactions
App->>Cypress: Return UI State
User->>Cypress: View Test Results
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
JeMPI_Apps/JeMPI_UI/src/pages/settings/blocking/Blocking.tsx (2)
3-3: Remove unnecessary space in import statement.The space between
React, {useState }should be consistent.- import React, {useState } from 'react' + import React, { useState } from 'react'
14-14: Remove trailing comma in destructuring assignment.The trailing comma in the destructuring assignment of
useConfigurationis unnecessary.- const { configuration,} = useConfiguration() + const { configuration } = useConfiguration()
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
JeMPI_Apps/JeMPI_UI/package-lock.jsonis excluded by!**/package-lock.jsonJeMPI_Apps/JeMPI_UI/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
Files selected for processing (23)
- JeMPI_Apps/JeMPI_UI/cypress.config.ts (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/e2e/browseRecords.cy.ts (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/e2e/dashboard.cy.ts (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/e2e/notifications.cy.ts (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/e2e/settings.cy.ts (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/fixtures/configuration.json (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/fixtures/notifications.json (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/fixtures/searchResponse.json (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/support/commands.ts (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/support/component-index.html (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/support/component.ts (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/support/e2e.ts (1 hunks)
- JeMPI_Apps/JeMPI_UI/cypress/ts.config.json (1 hunks)
- JeMPI_Apps/JeMPI_UI/package.json (3 hunks)
- JeMPI_Apps/JeMPI_UI/src/components/browseRecords/BrowseRecords.tsx (4 hunks)
- JeMPI_Apps/JeMPI_UI/src/components/dashboard/Dashboard.tsx (1 hunks)
- JeMPI_Apps/JeMPI_UI/src/components/notificationWorklist/NotificationWorklist.tsx (2 hunks)
- JeMPI_Apps/JeMPI_UI/src/components/shell/PageHeader.tsx (1 hunks)
- JeMPI_Apps/JeMPI_UI/src/pages/settings/blocking/Blocking.tsx (1 hunks)
- JeMPI_Apps/JeMPI_UI/src/pages/settings/blocking/BlockingContent.tsx (4 hunks)
- JeMPI_Apps/JeMPI_UI/src/pages/settings/deterministic/DeterministicContent.tsx (2 hunks)
- JeMPI_Apps/JeMPI_UI/src/pages/settings/deterministic/SourceView.tsx (1 hunks)
- JeMPI_Apps/JeMPI_UI/tsconfig.json (1 hunks)
Files skipped from review due to trivial changes (8)
- JeMPI_Apps/JeMPI_UI/cypress/fixtures/configuration.json
- JeMPI_Apps/JeMPI_UI/cypress/support/commands.ts
- JeMPI_Apps/JeMPI_UI/cypress/support/component-index.html
- JeMPI_Apps/JeMPI_UI/cypress/support/e2e.ts
- JeMPI_Apps/JeMPI_UI/cypress/ts.config.json
- JeMPI_Apps/JeMPI_UI/src/components/dashboard/Dashboard.tsx
- JeMPI_Apps/JeMPI_UI/src/components/shell/PageHeader.tsx
- JeMPI_Apps/JeMPI_UI/src/pages/settings/deterministic/SourceView.tsx
Additional comments not posted (62)
JeMPI_Apps/JeMPI_UI/cypress.config.ts (3)
1-4: LGTM! Import statement and project ID configuration.The import statement and project ID configuration are correctly set up.
5-11: LGTM! End-to-end testing configuration.The base URL, default command timeout, and node event listeners are correctly set up.
13-18: LGTM! Component testing configuration.The dev server configuration with create-react-app and webpack is correctly set up for component testing.
JeMPI_Apps/JeMPI_UI/tsconfig.json (4)
22-22: LGTM! Paths modification.The new entry for Cypress in the paths section is correctly set up.
29-29: LGTM! Types modification.The new entries for Cypress and Node in the types section are correctly set up.
30-30: LGTM! Include modification.The broadened include section to encompass all TypeScript files is correctly set up.
31-36: LGTM! Exclude modification.The new entries for test files, Cypress configuration file, and the Cypress directory in the exclude section are correctly set up.
JeMPI_Apps/JeMPI_UI/cypress/support/component.ts (4)
1-14: LGTM! File header comments.The comments explaining the purpose and configuration of the support file are clear and informative.
16-23: LGTM! Import statements.The import statements for commands and the mount function are correctly set up.
24-34: LGTM! Cypress namespace augmentation.The augmentation of the Cypress namespace to include type definitions for the custom mount command is correctly set up.
36-36: LGTM! Custom mount command.The custom mount command is correctly set up.
JeMPI_Apps/JeMPI_UI/src/pages/settings/blocking/Blocking.tsx (2)
1-6: LGTM!The import statements are correct and necessary for the component's functionality.
Line range hint
7-46:
LGTM!The changes streamline the component by removing unnecessary props and simplifying configuration handling.
JeMPI_Apps/JeMPI_UI/cypress/e2e/notifications.cy.ts (5)
1-4: LGTM!The initial setup for the
Notificationstest block is correct, visiting the notifications page before each test.
6-10: LGTM!The
Page Headerdescribe block correctly verifies the presence of the page header.
12-44: LGTM!The
Filtersdescribe block correctly verifies the presence and functionality of the filters.
47-55: LGTM!The
Data Griddescribe block correctly verifies the presence of the data grid and pagination.
57-74: LGTM!The
API Callsdescribe block correctly verifies the API calls and mock responses.JeMPI_Apps/JeMPI_UI/cypress/e2e/dashboard.cy.ts (7)
1-4: LGTM!The initial setup for the
Dashboard Componenttest block is correct, visiting the dashboard page before each test.
6-8: LGTM!The test correctly verifies the visibility of the dashboard tabs.
10-24: LGTM!The test correctly verifies the navigation through different tabs on the dashboard.
26-33: LGTM!The test correctly verifies the visibility of widgets in the Confusion Matrix tab.
35-40: LGTM!The test correctly verifies the visibility of the M & U widget in the M & U Values tab.
42-62: LGTM!The test correctly verifies the rendering of the dashboard with no data.
64-83: LGTM!The tests correctly verify the loading state and error handling of the dashboard component.
JeMPI_Apps/JeMPI_UI/package.json (3)
19-19: Approved: Consistent formatting.The reformatting of the
mock:enviromentsscript improves readability and consistency.
20-20: Approved: Added Cypress script.The addition of the
cypressscript enhances the project's testing capabilities by enabling Cypress for end-to-end testing.
64-72: Approved: Dependency updates.Updating
@testing-library/jest-domand@types/jest, and addingcypresstodevDependenciesensures compatibility and enhances testing capabilities.JeMPI_Apps/JeMPI_UI/cypress/e2e/browseRecords.cy.ts (6)
3-8: Approved: Setup for "Browse Records".The setup for the "Browse Records" feature includes visiting a specific URL before each test, which is appropriate for end-to-end testing.
14-18: Approved: Test for page header.The test verifies that the page header contains the text "Browse Patients", which is a valid check.
20-51: Approved: Tests for filters.The tests verify the visibility and functionality of the filter accordion, start date filter, end date filter, and interactions switch, which are valid checks.
54-63: Approved: Tests for search results.The tests verify the visibility of the data grid, the presence of search results, and navigation to the record details page, which are valid checks.
65-109: Approved: Tests for record details page.The tests verify navigation to the record details page, visibility of tables, enabling of buttons, and discarding changes, which are valid checks.
112-124: Approved: Test for API calls.The test intercepts a POST request and verifies the search results in the data grid, which is a valid check.
JeMPI_Apps/JeMPI_UI/src/components/notificationWorklist/NotificationWorklist.tsx (2)
143-145: Approved: Addedidattribute toBoxcomponent.Adding an
idattribute to theBoxcomponent facilitates targeting the component with CSS or JavaScript, improving accessibility or functionality.
218-221: Approved: ExportedCustomTextFieldfunction.Exporting the
CustomTextFieldfunction increases its accessibility across the application, allowing it to be imported and utilized in other modules.JeMPI_Apps/JeMPI_UI/src/components/browseRecords/BrowseRecords.tsx (4)
51-51: New import statement looks good.The import statement for
CustomTextFieldis appropriate and aligns with the changes in the code.
233-236: DateTimePicker component update looks good.The
slotsproperty withCustomTextFieldsimplifies the structure and improves UI consistency.
242-245: DateTimePicker component update looks good.The
slotsproperty withCustomTextFieldsimplifies the structure and improves UI consistency.
260-260: Addition ofidattribute to the interactions switch looks good.The
idattribute improves accessibility and interaction tracking.JeMPI_Apps/JeMPI_UI/src/pages/settings/deterministic/DeterministicContent.tsx (4)
345-345: Modification ofInputLabellooks good.Removing the dynamic
idsimplifies identification and does not affect functionality.
353-356: Addition ofdata-testidattribute toSelectcomponent looks good.The
data-testidattribute improves testability without affecting functionality.
364-364: Addition of uniqueidattributes toMenuItemcomponents looks good.The unique
idattributes improve identification during testing and interaction.
387-390: Addition of uniqueidattributes toMenuItemcomponents looks good.The unique
idattributes improve identification during testing and interaction.JeMPI_Apps/JeMPI_UI/cypress/fixtures/notifications.json (1)
1-351: New fixture data for notifications looks good.The data structure is correct, and the data is relevant and useful for testing.
JeMPI_Apps/JeMPI_UI/src/pages/settings/blocking/BlockingContent.tsx (4)
373-373: LGTM! Enhances testability.The addition of
SelectDisplayPropswithdata-testidimproves the testability of the field selection component.
401-401: LGTM! Enhances testability.The addition of
SelectDisplayPropswithdata-testidimproves the testability of the comparator selection component.
431-431: LGTM! Enhances accessibility.The addition of
id="add-row-button"to theIconButtonimproves accessibility and testability.
461-461: LGTM! Enhances accessibility.The addition of
id="close-button"to theButtonimproves accessibility and testability.JeMPI_Apps/JeMPI_UI/cypress/e2e/settings.cy.ts (12)
1-2: LGTM! Correct reference to Cypress types.The reference to Cypress types ensures proper type checking and autocompletion in the test file.
8-21: LGTM! Comprehensive tab rendering test.The test correctly verifies the presence and content of all tabs on the settings page.
23-41: LGTM! Correct tab switching test.The test correctly verifies the functionality of switching between different tabs and displaying the correct content.
43-54: LGTM! Proper save configuration test.The test correctly verifies the save functionality and the success message.
56-69: LGTM! Proper row edit and save test in Common Settings.The test correctly verifies the functionality of editing and saving a row in Common Settings.
71-91: LGTM! Correct cancel edit test.The test correctly verifies that the original value is retained when editing is cancelled.
92-121: LGTM! Proper Unique to Golden Record End-to-End Tests.The tests correctly verify the functionality of editing, saving, and cancelling rows in the Unique to Golden Record tab.
124-154: LGTM! Proper UniqueToInteraction Tab End-to-End Tests.The tests correctly verify the functionality of editing, saving, and cancelling rows in the UniqueToInteraction tab.
157-192: LGTM! Proper Golden Record Lists End-to-End Tests.The tests correctly verify the functionality of editing, saving, and cancelling rows in the Golden Record Lists tab.
196-261: LGTM! Comprehensive Deterministic End-to-End Tests.The tests correctly verify various functionalities in the Deterministic tab, including rendering, tab switching, adding rules, and deleting rows.
270-385: LGTM! Comprehensive Blocking End-to-End Tests.The tests correctly verify various functionalities in the Blocking tab, including switching views, adding rules, and deleting rows.
388-461: LGTM! Comprehensive Probabilistic End-to-End Tests.The tests correctly verify various functionalities in the Probabilistic tab, including rendering fields, saving configuration, and updating threshold values.
JeMPI_Apps/JeMPI_UI/cypress/fixtures/searchResponse.json (1)
1-963: LGTM! Correct JSON structure and data.The JSON structure is correct, and the data appears to be complete and accurate.
|
Task linked: CU-86bznypcf Notifications-End-To-End-Testing |
…86bznyre9_Settings-End-To-End-Testing
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- devops/linux/docker/data-config/config-reference-link-dp-api.json (1 hunks)
Additional comments not posted (1)
devops/linux/docker/data-config/config-reference-link-dp-api.json (1)
Line range hint
1-1:
Verify the impact of removing/browse-recordsroute.The
/browse-recordsroute has been removed from several fields. Ensure that this change does not affect other parts of the application that might rely on this route for functionality.
Summary by CodeRabbit
New Features
Improvements
data-testidattributes and IDs./browse-recordsAPI route, shifting focus to more specific record retrieval.Bug Fixes
Documentation
Chores
package.jsonfor better compatibility and support.