Fixes #38958 - Add basic Leapp preupgrade report table to the new job invocation page#165
Merged
adamruzicka merged 13 commits intotheforeman:masterfrom Jan 22, 2026
Merged
Conversation
- Add PropTypes and defaultProps to mock components (Table, Pagination) - Fix React Hooks rules violation by moving hooks before early return - Fix camelcase linting for API properties (template_name, preupgrade_report_entries) - Simplify else-if structure to avoid lonely-if error - Fix consistent-return by explicitly returning undefined in early exit - Fix boolean attribute syntax (isEmbedded) - Remove trailing whitespace for prettier compliance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-By: Claude <[email protected]>
adamlazik1
reviewed
Jan 14, 2026
adamlazik1
left a comment
There was a problem hiding this comment.
Haven't looked at the whole code yet but test failures are related and need to be addressed.
webpack/components/PreupgradeReportsTable/PreupgradeReportsTable.scss
Outdated
Show resolved
Hide resolved
131319a to
80017aa
Compare
adamruzicka
reviewed
Jan 14, 2026
webpack/components/PreupgradeReportsTable/__tests__/PreupgradeReportsTable.test.js
Outdated
Show resolved
Hide resolved
Fixed multiple test issues: - Changed redux-thunk import from named to default export - Added proper mocks for I18n, Pagination, and Table components - Updated Table mock to handle childrenOutsideTbody and customEmptyState props - Updated snapshots for PreupgradeReportsList tests All 61 tests now passing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Generated-By: Claude <[email protected]>
e42f6c1 to
ba5ec56
Compare
MariaAga
reviewed
Jan 15, 2026
.../components/PreupgradeReportsList/__tests__/__snapshots__/PreupgradeReportsList.test.js.snap
Outdated
Show resolved
Hide resolved
MariaAga
reviewed
Jan 15, 2026
57bf4e2 to
e369a39
Compare
Replace snapshot-based testing with React Testing Library assertions that test actual component behavior: - Verify header columns render correctly - Test entry data (titles, hostnames) appears in the document - Check checkbox interactions call the correct handlers - Test selected state rendering - Verify pagination component is present Generated-By: Claude Code 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
MariaAga
reviewed
Jan 15, 2026
webpack/components/PreupgradeReportsTable/PreupgradeReportsTableConstants.js
Outdated
Show resolved
Hide resolved
MariaAga
reviewed
Jan 15, 2026
- wrappers in columns instead of explicity tbody - no tableindexpage - no childrenOutsideTbody - no customEmptyState
1cf15c8 to
c7c4653
Compare
- use perPage over per_page whereever possible - drop custom bottom pagination & friends
c7c4653 to
2c260dd
Compare
MariaAga
requested changes
Jan 16, 2026
webpack/components/PreupgradeReportsTable/PreupgradeReportsTable.scss
Outdated
Show resolved
Hide resolved
webpack/components/PreupgradeReportsTable/PreupgradeReportsTableConstants.js
Outdated
Show resolved
Hide resolved
webpack/components/PreupgradeReportsTable/PreupgradeReportsTableConstants.js
Outdated
Show resolved
Hide resolved
- drop redefined STATUS constant - drop unused css - move rendering function out of constants
92b3a3b to
6a684d4
Compare
adamruzicka
reviewed
Jan 16, 2026
Contributor
Author
|
Thank you all for the reviews and the changes! I'm back, so I'll take it from here again. 😁 |
Contributor
Author
|
@MariaAga @adamruzicka I see that you addressed everything, and I think the code is great now. However, I can't access the legacy page right now to compare it against the new changes. |
Contributor
Member
|
Is the new table missing the summary part? or is it for later? |
Contributor
|
Afaik it was planned to be added later, same as checkboxes+actions and sorting+searching |
Contributor
|
@kmalyjur in light of my previous comment, is there anything left to be done here and now or can we |
adamruzicka
approved these changes
Jan 22, 2026
Contributor
Contributor
|
Eh, i should have squashed this. Oh well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


TO-DO: Fix tests
#38951 needs to be merged for this PR
Before:

After:
