-
Notifications
You must be signed in to change notification settings - Fork 24
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
PORTALS-2651 - Evaluations #1535
PORTALS-2651 - Evaluations #1535
Conversation
nickgros
commented
Jan 30, 2025
- Remove react-bootstrap from Evaluations components
- Remove JestMockPromise
- Remove react-bootstrap from Evaluations components - Remove JestMockPromise
@@ -207,7 +207,6 @@ | |||
"jest-environment-jsdom": "^29.7.0", | |||
"jest-fail-on-console": "^3.1.2", | |||
"jest-html-reporter": "^3.10.2", | |||
"jest-mock-promise": "^1.1.12", |
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.
Unnecessary dependency when Jest has mockResolvedValue
/mockRejectedValue
- Fix lockfile
@@ -72,26 +82,22 @@ export function EvaluationCard({ | |||
} | |||
|
|||
return ( | |||
<div className="bootstrap-4-backport evaluation-card"> | |||
<div className="evaluation-card"> |
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.
</div> | ||
</Form> | ||
</div> | ||
<div className="evaluation-editor"> |
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.
@@ -245,46 +253,32 @@ export function EvaluationRoundEditor({ | |||
evaluationRoundInput.roundStart, | |||
) | |||
|
|||
// https://react-bootstrap.github.io/components/forms/#forms-validation-native | |||
return ( | |||
<div className="evaluation-round-editor"> |
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.
.advanced-limits-grid { | ||
display: grid; | ||
// We need a fixed size for the add-button | ||
// or else the alignment will slightly change once the add-button disappears upon reaching the max number of rows | ||
grid-template-columns: [limit-type] 1fr [spacer] 30px [limit-input] 1.8fr [remove-button] 30px [add-button] 30px [end]; | ||
grid-template-columns: [limit-type] 1fr [spacer] 30px [limit-input] 1.8fr [remove-button] 50px [add-button] 50px [end]; |
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.
<EvaluationEditorDropdown onClick={onSave} onDelete={onDelete} /> | ||
</Col> | ||
</Row> | ||
<Form> |
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.
Replace bootstrap form components with MUI form components
@@ -237,27 +229,36 @@ function EvaluationEditorDropdown({ | |||
confirmButtonColor="error" | |||
/> | |||
)} | |||
<Dropdown className="float-right"> |
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.
Replace bootstrap dropdown with MUI IconButton + Menu popover
return ( | ||
<div className="evaluation-round-editor"> | ||
<Card> | ||
<Card.Body> |
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.
Replace bootstrap CardBody with MUI CardContent
<Row> | ||
<Col> |
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.
Replace Bootstrap Grid with MUI Grid2
@@ -1,6 +1,5 @@ | |||
import { render, screen, within } from '@testing-library/react' | |||
import { render, screen, waitFor, within } from '@testing-library/react' |
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.
Changes in all tests are minor, and are basically all
- replacing JestMockPromise with Jest builtin functionality
- Updating role queries to match the new MUI components
- Applying appropriate
findBy*
andwaitFor
s to improve test reliability and remove warnings.