Skip to content

Fixes #38958 - Add basic Leapp preupgrade report table to the new job invocation page#165

Merged
adamruzicka merged 13 commits intotheforeman:masterfrom
kmalyjur:job-inv-leapp
Jan 22, 2026
Merged

Fixes #38958 - Add basic Leapp preupgrade report table to the new job invocation page#165
adamruzicka merged 13 commits intotheforeman:masterfrom
kmalyjur:job-inv-leapp

Conversation

@kmalyjur
Copy link
Contributor

@kmalyjur kmalyjur commented Dec 15, 2025

TO-DO: Fix tests

#38951 needs to be merged for this PR

Before:
image

After:
image

@kmalyjur kmalyjur changed the title Add basic Leapp preupgrade report table to the new job invocation page Fixes #38958 - Add basic Leapp preupgrade report table to the new job invocation page Dec 15, 2025
@kmalyjur kmalyjur added the breaks-robottelo Can be set via comment: /label breaks-robottelo label Dec 15, 2025
- 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]>
Copy link

@adamlazik1 adamlazik1 left a comment

Choose a reason for hiding this comment

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

Haven't looked at the whole code yet but test failures are related and need to be addressed.

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]>
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]>
- wrappers in columns instead of explicity tbody
- no tableindexpage
- no childrenOutsideTbody
- no customEmptyState
- use perPage over per_page whereever possible
- drop custom bottom pagination & friends
- drop redefined STATUS constant
- drop unused css
- move rendering function out of constants
@kmalyjur
Copy link
Contributor Author

Thank you all for the reviews and the changes! I'm back, so I'll take it from here again. 😁

@kmalyjur
Copy link
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.

@adamruzicka
Copy link
Contributor

Would this help at least a bit?

Old:
image

New:
image

@MariaAga
Copy link
Member

MariaAga commented Jan 19, 2026

Is the new table missing the summary part? or is it for later?

@adamruzicka
Copy link
Contributor

Afaik it was planned to be added later, same as checkboxes+actions and sorting+searching

@adamruzicka
Copy link
Contributor

@kmalyjur in light of my previous comment, is there anything left to be done here and now or can we :shipit: ?

@adamruzicka adamruzicka merged commit 1e15e6a into theforeman:master Jan 22, 2026
12 checks passed
@adamruzicka
Copy link
Contributor

Thank you @kmalyjur & @MariaAga !

@adamruzicka
Copy link
Contributor

Eh, i should have squashed this. Oh well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaks-robottelo Can be set via comment: /label breaks-robottelo Waiting on contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants