test(dashboard): regression for widget removal sync (#15390)#16864
test(dashboard): regression for widget removal sync (#15390)#16864Ibochkarev wants to merge 1 commit intomodxcms:3.xfrom
Conversation
2572bd6 to
80125b2
Compare
Code ReviewSummary Fixes the default dashboard not respecting widget removal (#14753). When a template dashboard (user=0) is updated and a widget is removed, user-specific placements are now also updated. The Dashboard Assessment Well-structured fix. The Verdict: Approve |
30cbb79 to
9189c98
Compare
mkschell
left a comment
There was a problem hiding this comment.
This solution does not appear to take into account the discussion and the lack of consensus on the solution in #14753 . It looks like a low resolution shortcut to resolve the issue as stated, without considering the nuance of the issue.
|
On further exploration, I could not reproduce the issue. It appears to have already been solved in 2021 via #15390 The new test Thanks! |
Guards behavior from modxcms#15390: saving the template dashboard with fewer widgets updates user placements; render shows only remaining widgets. modxcms#14753 context.
9189c98 to
ee82917
Compare
|
@mkschell Thanks for the detailed review. I agree the runtime behavior is already covered by #15390 in Following your suggestion, I narrowed this PR to a regression test only ( If we want to follow up on the edge case where |
What does it do?
Adds
testRemovedWidgetsNotShownAfterUpdate()in_build/test/Tests/Model/Dashboard/modDashboardTest.php: after saving a customizable dashboard template (user=0) with fewer widgets, user-specific placements stay in sync andrender()output matches.Why is it needed?
Per review on this PR: runtime behavior is already covered by #15390. This test documents and guards that path. #14753 remains the original report context.
How to test
With a configured test DB:
Related issue(s)/PR(s)