wordpress-develop/tests
Sergey Biryukov 570d86da90 Tests: Correct the test for autosaving a post with Ajax.
`wp_autosave()` only updates drafts and auto-drafts created by the current user if the post is not locked.

As a result of previous Ajax test refactoring, setting the current user and creating a test post ended up in different methods, with the user being set after the post is already created.

This resulted in the test post being created with the `post_author` field set to zero, and the current user check in `wp_autosave()` failed. Instead of updating the original post as the test intended, it created a new autosave.

The test only passed accidentally due to `assertGreaterThanOrEqual()` not performing a strict type check.

Follow-up to [26995], [35311].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51450 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-17 10:23:57 +00:00
..
e2e Build/Test Tools: Silence jQuery Migrate console warnings when running E2E tests. 2021-06-09 01:35:26 +00:00
gutenberg Block Editor: Update the Gutenberg branch used to launch Gutenberg e2e tests. 2021-06-01 09:21:36 +00:00
phpunit Tests: Correct the test for autosaving a post with Ajax. 2021-07-17 10:23:57 +00:00
qunit Tests: Update the wp-api-generated.js fixture. 2021-07-06 15:58:38 +00:00