-
Notifications
You must be signed in to change notification settings - Fork 18
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
Cu 86bznyre9 settings end to end testing #293
base: CU-86bznypcf_Notifications-End-To-End-Testing
Are you sure you want to change the base?
Cu 86bznyre9 settings end to end testing #293
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
useConfiguration
is 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.json
is excluded by!**/package-lock.json
JeMPI_Apps/JeMPI_UI/yarn.lock
is 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
Notifications
test block is correct, visiting the notifications page before each test.
6-10
: LGTM!The
Page Header
describe block correctly verifies the presence of the page header.
12-44
: LGTM!The
Filters
describe block correctly verifies the presence and functionality of the filters.
47-55
: LGTM!The
Data Grid
describe block correctly verifies the presence of the data grid and pagination.
57-74
: LGTM!The
API Calls
describe 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 Component
test 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:enviroments
script improves readability and consistency.
20-20
: Approved: Added Cypress script.The addition of the
cypress
script enhances the project's testing capabilities by enabling Cypress for end-to-end testing.
64-72
: Approved: Dependency updates.Updating
@testing-library/jest-dom
and@types/jest
, and addingcypress
todevDependencies
ensures 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: Addedid
attribute toBox
component.Adding an
id
attribute to theBox
component facilitates targeting the component with CSS or JavaScript, improving accessibility or functionality.
218-221
: Approved: ExportedCustomTextField
function.Exporting the
CustomTextField
function 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
CustomTextField
is appropriate and aligns with the changes in the code.
233-236
: DateTimePicker component update looks good.The
slots
property withCustomTextField
simplifies the structure and improves UI consistency.
242-245
: DateTimePicker component update looks good.The
slots
property withCustomTextField
simplifies the structure and improves UI consistency.
260-260
: Addition ofid
attribute to the interactions switch looks good.The
id
attribute improves accessibility and interaction tracking.JeMPI_Apps/JeMPI_UI/src/pages/settings/deterministic/DeterministicContent.tsx (4)
345-345
: Modification ofInputLabel
looks good.Removing the dynamic
id
simplifies identification and does not affect functionality.
353-356
: Addition ofdata-testid
attribute toSelect
component looks good.The
data-testid
attribute improves testability without affecting functionality.
364-364
: Addition of uniqueid
attributes toMenuItem
components looks good.The unique
id
attributes improve identification during testing and interaction.
387-390
: Addition of uniqueid
attributes toMenuItem
components looks good.The unique
id
attributes 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
SelectDisplayProps
withdata-testid
improves the testability of the field selection component.
401-401
: LGTM! Enhances testability.The addition of
SelectDisplayProps
withdata-testid
improves the testability of the comparator selection component.
431-431
: LGTM! Enhances accessibility.The addition of
id="add-row-button"
to theIconButton
improves accessibility and testability.
461-461
: LGTM! Enhances accessibility.The addition of
id="close-button"
to theButton
improves 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-records
route.The
/browse-records
route 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-testid
attributes and IDs./browse-records
API route, shifting focus to more specific record retrieval.Bug Fixes
Documentation
Chores
package.json
for better compatibility and support.