+ cd /testbed
+ git config --global --add safe.directory /testbed
+ cd /testbed
+ git checkout 4e8168f998f4619a58251fb93fdc0683596399bc client/lib/posts/test/utils.js client/state/posts/test/reducer.js client/state/posts/test/selectors.js
Updated 0 paths from 4a00644a8
+ git apply --verbose --reject -
Checking patch client/lib/posts/test/utils.js...
Checking patch client/state/posts/test/reducer.js...
Checking patch client/state/posts/test/selectors.js...
Applied patch client/lib/posts/test/utils.js cleanly.
Applied patch client/state/posts/test/reducer.js cleanly.
Applied patch client/state/posts/test/selectors.js cleanly.
+ : '>>>>> Start Test Output'
+ ./node_modules/.bin/jest --verbose -c=test/client/jest.config.json client/lib/posts/test/utils.js
PASS client/lib/posts/test/utils.js
  utils
    #getEditURL
      ✓ should return correct path type=post is supplied (3ms)
      ✓ should return correct path type=page is supplied
      ✓ should return correct path when custom post type is supplied
      ✓ should default to type=post if no post type is supplied (1ms)
    #getVisibility
      ✓ should return undefined when no post is supplied
      ✓ should return public when password and private are not set
      ✓ should return private when post#status is private (1ms)
      ✓ should return password when post#password is set
    #isPrivate
      ✓ should return undefined when no post is supplied
      ✓ should return true when post.status is private
      ✓ should return false when post.status is not private
    #isPublished
      ✓ should return undefined when no post is supplied (1ms)
      ✓ should return true when post.status is private
      ✓ should return true when post.status is publish
      ✓ should return false when post.status is not publish or private
    #isPending
      ✓ should return undefined when no post is supplied
      ✓ should return true when post.status is pending
      ✓ should return false when post.status is not pending (1ms)
    #isBackDatedPublished
      ✓ should return false when no post is supplied
      ✓ should return false when status !== future
      ✓ should return false when status === future and date is in future (1ms)
      ✓ should return true when status === future and date is in the past
    #removeSlug
      ✓ should return undefined when no path is supplied
      ✓ should strip slug on post URL (1ms)
      ✓ should strip slug on page URL
    #getPermalinkBasePath
      ✓ should return undefined when no post is supplied
      ✓ should return post.URL when post is published
      ✓ should use permalink_URL when not published and present
    #getPagePath
      ✓ should return undefined when no post is supplied
      ✓ should return post.URL without slug when page is published (1ms)
      ✓ should use permalink_URL when not published and present
    #getFeaturedImageId()
      ✓ should return undefined when no post is specified
      ✓ should return a non-URL featured_image property
      ✓ should return a `null` featured_image property
      ✓ should return empty string if that is the featured_image value
      ✓ should fall back to post thumbnail object ID if exists, if featured_image is URL
      ✓ should return undefined if featured_image is URL and post thumbnail object doesn't exist (1ms)

Test Suites: 1 passed, 1 total
Tests:       37 passed, 37 total
Snapshots:   0 total
Time:        4.441s
Ran all test suites matching /client\/lib\/posts\/test\/utils.js/i.
+ ./node_modules/.bin/jest --verbose -c=test/client/jest.config.json client/state/posts/test/reducer.js
FAIL client/state/posts/test/reducer.js (6.464s)
  reducer
    ✓ should include expected keys in return value (2ms)
    #items()
      ✓ should default to an empty object
      ✓ should index received posts by global ID
      ✓ should accumulate posts (1ms)
      ✓ should remove an item when delete action is dispatched
      ✓ should persist state
      ✓ should load valid persisted state (2ms)
      ✓ should not load invalid persisted state (14ms)
    #queryRequests()
      ✓ should default to an empty object
      ✓ should track post query request fetching
      ✓ should track post queries without specified site
      ✓ should accumulate queries
      ✓ should track post query request success
      ✓ should track post query request failure
    #queries()
      ✓ should default to an empty object
      ✓ should track post query request success (3ms)
      ✓ should accumulate query request success (2ms)
      ✓ should return the same state if successful request has no changes
      ✓ should track posts even if not associated with an existing site or query (1ms)
      ✓ should update received posts
      ✓ should apply pending restore status on restore actions (1ms)
      ✓ should apply pending trash status on restore failure actions
      ✓ should apply save actions as partial received posts
      ✓ should apply pending delete status on delete actions
      ✓ should restore item when post delete fails (1ms)
      ✓ should remove item when post delete action success dispatched (1ms)
      ✓ should persist state
      ✓ should load valid persisted state (2ms)
      ✓ should not load invalid persisted state (2ms)
    #siteRequests()
      ✓ should default to an empty object
      ✓ should map site ID, post ID to true value if request in progress
      ✓ should accumulate mappings
      ✓ should map site ID, post ID to false value if request finishes successfully
      ✓ should map site ID, post ID to false value if request finishes with failure
    #edits()
      ✓ should default to an empty object
      ✓ should track new post draft revisions by site ID
      ✓ should track existing post revisions by site ID, post ID (1ms)
      ✓ should accumulate posts
      ✓ should accumulate sites
      ✓ should merge post revisions
      ✓ should merge nested post revisions
      ✓ should eliminate redundant data on posts received (1ms)
      ✓ should handle term shape differences on posts received (1ms)
      ✓ should preserve term edit differences on posts received (1ms)
      ✓ should remove discussion edits after they are saved
      ✓ should keep discussion edits if they are not yet present in the saved post
      ✓ should remove author edit after it is saved and user IDs are equal
      ✕ should remove featured image edit after it is saved (2ms)
      ✓ should ignore reset edits action when discarded site doesn't exist
      ✓ should copy edits when the post is saved and prior postId was null
      ✓ should ignore stop editor action when site doesn't exist
      ✓ should discard edits when we stop editing the post (1ms)
      ✓ should reset edits when we start editing a post
    #allSitesQueries()
      ✓ should default to a new PostQueryManager
      ✓ should track post query request success
      ✓ should accumulate query request success (1ms)
      ✓ should return the same state if successful request has no changes
      ✓ should track post items received from site-specific queries
      ✓ should ignore query results of site-specific queries
      ✓ should update received posts (1ms)
      ✓ should apply pending restore status on restore actions
      ✓ should apply pending trash status on restore failure actions (1ms)
      ✓ should apply save actions as partial received posts
      ✓ should apply pending delete status on delete actions (1ms)
      ✓ should restore item when post delete fails
      ✓ should remove item when post delete action success dispatched (1ms)
      ✓ should persist state
      ✓ should load valid persisted state (1ms)
      ✓ should not load invalid persisted state (2ms)

  ● reducer › #edits() › should remove featured image edit after it is saved

    AssertionError: expected { Object (2916284) } to deeply equal { '2916284': { '841': {} } }

      1271 | 			);
      1272 |
    > 1273 | 			expect( state ).to.eql( {
      1274 | 				2916284: {
      1275 | 					841: {},
      1276 | 				},
      
      at Object.<anonymous> (client/state/posts/test/reducer.js:1273:23)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 68 passed, 69 total
Snapshots:   0 total
Time:        6.614s
Ran all test suites matching /client\/state\/posts\/test\/reducer.js/i.
+ ./node_modules/.bin/jest --verbose -c=test/client/jest.config.json client/state/posts/test/selectors.js
PASS client/state/posts/test/selectors.js
  selectors
    #getPost()
      ✓ should return null if the global ID is not tracked (2ms)
      ✓ should return null if there is no manager associated with the path site
      ✓ should return the object for the post global ID
    getNormalizedPost()
      ✓ should return null if the post is not tracked (1ms)
      ✓ should return a normalized copy of the post (3ms)
    #getSitePosts()
      ✓ should return an array of post objects for the site
    #getSitePost()
      ✓ should return null if the post is not known for the site (1ms)
      ✓ should return the object for the post site ID, post ID pair
    #getPostsForQuery()
      ✓ should return null if the site query is not tracked
      ✓ should return null if the query is not tracked to the query manager (1ms)
      ✓ should return an array of normalized known queried posts (1ms)
      ✓ should return null if we know the number of found items but the requested set hasn't been received
    #isRequestingPostsForQuery()
      ✓ should return false if the site has not been queried
      ✓ should return false if the site has not been queried for the specific query
      ✓ should return true if the site has been queried for the specific query
      ✓ should return false if the site has previously, but is not currently, querying for the specified query (1ms)
    getPostsFoundForQuery()
      ✓ should return null if the site query is not tracked
      ✓ should return the found items for a site query
      ✓ should return zero if in-fact there are zero items
    #getPostsLastPageForQuery()
      ✓ should return null if the site query is not tracked
      ✓ should return the last page value for a site query
      ✓ should return the last page value for a site query, even if including page param (1ms)
      ✓ should return 1 if there are no found posts
    #isPostsLastPageForQuery()
      ✓ should return null if the last page is not known
      ✓ should return false if the query explicit value is not the last page
      ✓ should return true if the query explicit value is the last page
      ✓ should return true if the query implicit value is the last page
    #getPostsForQueryIgnoringPage()
      ✓ should return null if the query is not tracked (1ms)
      ✓ should return null if the query manager has not received items for query
      ✓ should return a concatenated array of all site posts ignoring page
      ✓ should omit found items for which the requested result hasn't been received
    isRequestingPostsForQueryIgnoringPage()
      ✓ should return false if not requesting for query (1ms)
      ✓ should return true requesting for query at exact page
      ✓ should return true requesting for query without page specified (1ms)
      ✓ should return true for all-sites query
      ✓ should return false for single site when requesting all sites
    #getEditedPost()
      ✓ should return the original post if no revisions exist on site
      ✓ should return revisions for a new draft
      ✓ should return revisions for a draft if the original is unknown
      ✓ should return revisions merged with the original post
      ✓ should return revisions merged with original post nested properties (1ms)
      ✓ should return revisions with array properties overwriting objects
      ✓ should return revisions with array properties overwriting previous versions
    getPostEdits()
      ✓ should return null if no edits exist for a new post
      ✓ should return null if no edits exist for an existing post (1ms)
      ✓ should return the edited attributes for a new post
      ✓ should return the edited attributes for an existing post
    getEditedPostValue()
      ✓ should return undefined if the post does not exist
      ✓ should return the assigned post value
      ✓ should return the assigned nested post value
    isEditedPostPrivate()
      ✓ should return false if the post does not exist (1ms)
      ✓ should return false if post password is a zero length string
      ✓ should return true if post password is a non-zero length string
      ✓ should return true if post password is whitespace only
    isPrivateEditedPostPasswordValid()
      ✓ should return false if the post does not exist
      ✓ should return false if post password is a zero length string
      ✓ should return true if post password is a non-zero length string (1ms)
      ✓ should return false if post password is whitespace only
    isEditedPostDirty()
      ✓ should return false if there are no edits for the post
      ✓ should return false if edited with a type
      ✓ should return false if newly edited with custom type
      ✓ should return false if no saved post and value matches default for new post (1ms)
      ✓ should return true if no saved post and value does not match default for new post
      ✓ should return true if no saved post and no default exists for key
      ✓ should return false if saved post value equals edited post value (6ms)
      ✓ should return true if saved post value does not equal edited post value
      ✓ should return true if saved post parent attr changes
      ✓ should return false if saved post parent attr doesn't change (1ms)
      ✓ should return true if saved post date changes (3ms)
      ✓ should return false if saved post date doesn't change (1ms)
      ✓ should return true if discussion options change
      ✓ should return false if discussion options didn't change
      ✓ should return false if author ID didn't change
      ✓ should return false if featured image ID didn't change
    getPostPreviewUrl()
      ✓ should return null if the post is not known
      ✓ should return null if the post has no URL
      ✓ should return null if the post is trashed
      ✓ should prefer the post preview URL if available
      ✓ should use post URL if preview URL not available
      ✓ should change http to https if mapped domain
      ✓ should append preview query argument to non-published posts (1ms)
    isPostPublished()
      ✓ should return null if the post is not known (1ms)
      ✓ should return true if the post status is publish
      ✓ should return true if the post status is private
      ✓ should return false if the post status is draft
      ✓ should return false if the post status is future and date is in future
      ✓ should return true if the post status is future and date is in past (1ms)
    getEditedPostSlug()
      ✓ should return undefined if the post is not known
      ✓ should return post.slug if post is published
      ✓ should return decoded non-latin post.slug if post is published
      ✓ should return undecoded post.slug if post with malformed URI sequence is published
      ✓ should return decoded post.slug with emoji sequences if post is published (1ms)
      ✓ should return edited slug if post is not published
      ✓ should return suggested-slug if post is not published
      ✓ should return slug if post is not published and slug is set
      ✓ should return edited slug if post is published
      ✓ should return an empty edited slug if post is published
    getSitePostsByTerm()
      ✓ should return an array of post objects for the site matching the termId (1ms)

Test Suites: 1 passed, 1 total
Tests:       98 passed, 98 total
Snapshots:   0 total
Time:        3.139s
Ran all test suites matching /client\/state\/posts\/test\/selectors.js/i.
+ : '>>>>> End Test Output'
+ git checkout 4e8168f998f4619a58251fb93fdc0683596399bc client/lib/posts/test/utils.js client/state/posts/test/reducer.js client/state/posts/test/selectors.js
Updated 3 paths from 4a00644a8
