Skip to content
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

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

nickgros
Copy link
Collaborator

  • 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",
Copy link
Collaborator Author

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">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

</div>
</Form>
</div>
<div className="evaluation-editor">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

@@ -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">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

.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];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

<EvaluationEditorDropdown onClick={onSave} onDelete={onDelete} />
</Col>
</Row>
<Form>
Copy link
Collaborator Author

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">
Copy link
Collaborator Author

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>
Copy link
Collaborator Author

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

Comment on lines -254 to -255
<Row>
<Col>
Copy link
Collaborator Author

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'
Copy link
Collaborator Author

@nickgros nickgros Jan 31, 2025

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* and waitFors to improve test reliability and remove warnings.

@nickgros nickgros requested a review from jay-hodgson January 31, 2025 15:46
@nickgros nickgros merged commit 8d8f83f into Sage-Bionetworks:main Feb 4, 2025
24 checks passed
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