RTC: Fix change-detection E2E tests after RTC enabled by default#75744
RTC: Fix change-detection E2E tests after RTC enabled by default#75744chriszarate wants to merge 2 commits intotrunkfrom
Conversation
| // Autosave draft as same user should do full save, i.e. not dirty. | ||
| expect( await changeDetectionUtils.getIsDirty() ).toBe( false ); | ||
| // With RTC enabled, all autosaves target an autosave revision. | ||
| expect( await changeDetectionUtils.getIsDirty() ).toBe( true ); |
There was a problem hiding this comment.
Is what cases do we "auto-save" a revision instead of an actual auto-draft? Should we test that additionally to this?
There was a problem hiding this comment.
It's the two sides of this if statement basically:
So we can test both, and it will be based on whether RTC is enabled.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +15 B (0%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
ellatrix
left a comment
There was a problem hiding this comment.
Let's move ahead with it to reduce the failures.
9d52da0 to
e83c582
Compare
What?
Fix change-detection E2E tests after RTC enabled by default.
Why?
E2E tests began failing after they starting running against WordPress
trunkwith RTC enabled by default.How?
Should autosave post. The failing expectation is directly testing behavior that has now changed in WordPresstrunk.draftorauto-draftstatus, that autosave does not target an autosave revision. Instead a special case is triggered and the autosave targets the post itself.Should prompt to confirm unsaved changes for new post with initial edits. Bug: The sync manager was callingsaveRecordfor all posts whenever a persisted CRDT document was not detected. It should only do this when the post is notauto-draft.Should prompt if save failed. This one is straightforward. Move the reconnect command up above the expectation to allow the user to reconnect to the sync provider first.Testing Instructions
Run E2E tests