Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix link back to editor from revisions screen #3511
Fix link back to editor from revisions screen.
How Has This Been Tested?
@@ Coverage Diff @@ ## master #3511 +/- ## ========================================== - Coverage 37.74% 34.61% -3.13% ========================================== Files 279 261 -18 Lines 6743 6769 +26 Branches 1227 1231 +4 ========================================== - Hits 2545 2343 -202 - Misses 3536 3733 +197 - Partials 662 693 +31
Another issue here is that restoring the revision still returns to the classic editor, even when navigating revisions from Gutenberg. I'm going to take a look.
@aduth I added some phpunit tests to validate the filters we have applied.
I tried working on jest to test
@adamsilverstein It's because the default export of
You can see an example of this here:
Where in addition to the default export, we also create a separate named export for the class itself, which is used in the tests:
Ok, I think I misunderstood how these components were set up in my previous recommendations. For shallow testing, we'd want to ensure we're targeting the specific component we're testing, in this case the
PostLastRevisionCheck component. So this is the one which should have a named export (from
check.js). I'm honestly not sure how the previous tests were working, but we shouldn't be reaching into inner component behaviors for shallow testing.
I pushed updated tests with resolved lint issues in 4c13d2c