{"action":"closed","number":8301,"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/8301","id":204847090,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0ODQ3MDkw","html_url":"https://github.com/WordPress/gutenberg/pull/8301","diff_url":"https://github.com/WordPress/gutenberg/pull/8301.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/8301.patch","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/8301","number":8301,"state":"closed","locked":false,"title":"Try to rewrite e2e tests using jest-puppeter preset","user":{"login":"gziolo","id":699132,"node_id":"MDQ6VXNlcjY5OTEzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/699132?v=4","gravatar_id":"","url":"https://api.github.com/users/gziolo","html_url":"https://github.com/gziolo","followers_url":"https://api.github.com/users/gziolo/followers","following_url":"https://api.github.com/users/gziolo/following{/other_user}","gists_url":"https://api.github.com/users/gziolo/gists{/gist_id}","starred_url":"https://api.github.com/users/gziolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gziolo/subscriptions","organizations_url":"https://api.github.com/users/gziolo/orgs","repos_url":"https://api.github.com/users/gziolo/repos","events_url":"https://api.github.com/users/gziolo/events{/privacy}","received_events_url":"https://api.github.com/users/gziolo/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\nCloses #8619.\r\n\r\nImproves #6956. See known issues to find out what is still necessary to make it bulletproof.\r\n\r\nTries to fix intermittent e2e test failures. In particular an error with `preview` test:\r\n\r\n> Starting to see a new one.\r\n> \r\n> ```\r\n> FAIL test/e2e/specs/preview.test.js\r\n>   ● Preview › Should open a preview window for a new post\r\n>     Protocol error (Runtime.callFunctionOn): Cannot find context with specified id undefined\r\n>       \r\n>       at Promise (node_modules/puppeteer/lib/Connection.js:198:56)\r\n>       at CDPSession.send (node_modules/puppeteer/lib/Connection.js:197:12)\r\n>       at ExecutionContext.evaluateHandle (node_modules/puppeteer/lib/ExecutionContext.js:71:75)\r\n>       at ExecutionContext.evaluate (node_modules/puppeteer/lib/ExecutionContext.js:46:31)\r\n>       at Frame.evaluate (node_modules/puppeteer/lib/FrameManager.js:299:20)\r\n> ```\r\n> \r\n> Example: #7841 https://travis-ci.org/WordPress/gutenberg/jobs/401939944\r\n\r\n**This is try to use `jest-puppeteer` preset recommended in Jest docs:**\r\n\r\nhttps://jestjs.io/docs/en/puppeteer#use-puppeteer-preset\r\n\r\nThe biggest difference is that we no longer use isolated browser instance per test suite but share one browser to speed up tests execution.\r\n\r\n**It also enables some new methods to `expect` API.** See:\r\nhttps://github.com/smooth-code/jest-puppeteer/tree/master/packages/expect-puppeteer#api\r\n\r\n## How has this been tested?\r\n\r\n`npm run test-e2e`\r\n\r\n## Knows issues\r\n\r\nWe should open a follow up tasks for two issues.\r\n\r\n### Preview opens new tab after publish\r\n\r\nSteps to reproduce:\r\n1. Type something in the title field.\r\n1. Click the preview button.\r\n1. Go back to the editor.\r\n1. Publish post.\r\n1. Click the preview button.\r\n1. Go back to the editor.\r\n1. Type something in the title field.\r\n1. Click the preview button.\r\n1. It shouldn't open a new tab. It should reuse the existing one.\r\n\r\n### Too many undo levels\r\n\r\nIt happens only in the headless mode when running e2e tests. Sometimes it creates two undo levels for the first paragraph. When you modify test and add snapshots after each undo action you might see the following:\r\n\r\n```js\r\nexports[`undo Should undo to expected level intervals 5`] = `\r\n“<!-- wp:paragraph -->\r\n<p>This</p>\r\n<!-- /wp:paragraph -->”\r\n`;\r\n\r\nexports[`undo Should undo to expected level intervals 6`] = `\r\n“<!-- wp:paragraph -->\r\n<p>Thi</p>\r\n<!-- /wp:paragraph -->”\r\n`;\r\n```\r\n\r\nThis isn't expected behavior. It uncovers some edge case happening inside the logic which creates undo levels.","created_at":"2018-07-30T15:42:27Z","updated_at":"2018-08-08T11:04:32Z","closed_at":"2018-08-08T11:04:32Z","merged_at":"2018-08-08T11:04:32Z","merge_commit_sha":"1b9af37d774d427565070c794c6042510ff51ab3","assignee":{"login":"gziolo","id":699132,"node_id":"MDQ6VXNlcjY5OTEzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/699132?v=4","gravatar_id":"","url":"https://api.github.com/users/gziolo","html_url":"https://github.com/gziolo","followers_url":"https://api.github.com/users/gziolo/followers","following_url":"https://api.github.com/users/gziolo/following{/other_user}","gists_url":"https://api.github.com/users/gziolo/gists{/gist_id}","starred_url":"https://api.github.com/users/gziolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gziolo/subscriptions","organizations_url":"https://api.github.com/users/gziolo/orgs","repos_url":"https://api.github.com/users/gziolo/repos","events_url":"https://api.github.com/users/gziolo/events{/privacy}","received_events_url":"https://api.github.com/users/gziolo/received_events","type":"User","site_admin":false},"assignees":[{"login":"gziolo","id":699132,"node_id":"MDQ6VXNlcjY5OTEzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/699132?v=4","gravatar_id":"","url":"https://api.github.com/users/gziolo","html_url":"https://github.com/gziolo","followers_url":"https://api.github.com/users/gziolo/followers","following_url":"https://api.github.com/users/gziolo/following{/other_user}","gists_url":"https://api.github.com/users/gziolo/gists{/gist_id}","starred_url":"https://api.github.com/users/gziolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gziolo/subscriptions","organizations_url":"https://api.github.com/users/gziolo/orgs","repos_url":"https://api.github.com/users/gziolo/repos","events_url":"https://api.github.com/users/gziolo/events{/privacy}","received_events_url":"https://api.github.com/users/gziolo/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"pento","id":352291,"node_id":"MDQ6VXNlcjM1MjI5MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/352291?v=4","gravatar_id":"","url":"https://api.github.com/users/pento","html_url":"https://github.com/pento","followers_url":"https://api.github.com/users/pento/followers","following_url":"https://api.github.com/users/pento/following{/other_user}","gists_url":"https://api.github.com/users/pento/gists{/gist_id}","starred_url":"https://api.github.com/users/pento/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pento/subscriptions","organizations_url":"https://api.github.com/users/pento/orgs","repos_url":"https://api.github.com/users/pento/repos","events_url":"https://api.github.com/users/pento/events{/privacy}","received_events_url":"https://api.github.com/users/pento/received_events","type":"User","site_admin":false},{"login":"jorgefilipecosta","id":11271197,"node_id":"MDQ6VXNlcjExMjcxMTk3","avatar_url":"https://avatars1.githubusercontent.com/u/11271197?v=4","gravatar_id":"","url":"https://api.github.com/users/jorgefilipecosta","html_url":"https://github.com/jorgefilipecosta","followers_url":"https://api.github.com/users/jorgefilipecosta/followers","following_url":"https://api.github.com/users/jorgefilipecosta/following{/other_user}","gists_url":"https://api.github.com/users/jorgefilipecosta/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgefilipecosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgefilipecosta/subscriptions","organizations_url":"https://api.github.com/users/jorgefilipecosta/orgs","repos_url":"https://api.github.com/users/jorgefilipecosta/repos","events_url":"https://api.github.com/users/jorgefilipecosta/events{/privacy}","received_events_url":"https://api.github.com/users/jorgefilipecosta/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":615503111,"node_id":"MDU6TGFiZWw2MTU1MDMxMTE=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Automated%20Testing","name":"Automated Testing","color":"e93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/8301/commits","review_comments_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/8301/comments","review_comment_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/8301/comments","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/299088eaea74dddb7292ce212be769b7eb20ec8f","head":{"label":"WordPress:fix/e2e-test-preview","ref":"fix/e2e-test-preview","sha":"299088eaea74dddb7292ce212be769b7eb20ec8f","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Beta plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-08-08T10:53:54Z","pushed_at":"2018-08-08T11:04:32Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/ ","size":20148,"stargazers_count":2963,"watchers_count":2963,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":767,"mirror_url":null,"archived":false,"open_issues_count":1125,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":767,"open_issues":1125,"watchers":2963,"default_branch":"master"}},"base":{"label":"WordPress:master","ref":"master","sha":"a529cc393aee03bcbc7dcaf371e621539324df52","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Beta plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-08-08T10:53:54Z","pushed_at":"2018-08-08T11:04:32Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/ ","size":20148,"stargazers_count":2963,"watchers_count":2963,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":767,"mirror_url":null,"archived":false,"open_issues_count":1125,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":767,"open_issues":1125,"watchers":2963,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/8301"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/8301"},"issue":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/8301"},"comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/8301/comments"},"review_comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/8301/comments"},"review_comment":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/8301/commits"},"statuses":{"href":"https://api.github.com/repos/WordPress/gutenberg/statuses/299088eaea74dddb7292ce212be769b7eb20ec8f"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"gziolo","id":699132,"node_id":"MDQ6VXNlcjY5OTEzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/699132?v=4","gravatar_id":"","url":"https://api.github.com/users/gziolo","html_url":"https://github.com/gziolo","followers_url":"https://api.github.com/users/gziolo/followers","following_url":"https://api.github.com/users/gziolo/following{/other_user}","gists_url":"https://api.github.com/users/gziolo/gists{/gist_id}","starred_url":"https://api.github.com/users/gziolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gziolo/subscriptions","organizations_url":"https://api.github.com/users/gziolo/orgs","repos_url":"https://api.github.com/users/gziolo/repos","events_url":"https://api.github.com/users/gziolo/events{/privacy}","received_events_url":"https://api.github.com/users/gziolo/received_events","type":"User","site_admin":false},"comments":20,"review_comments":57,"maintainer_can_modify":false,"commits":25,"additions":618,"deletions":289,"changed_files":35}}
{"actor":{"display_login":"gziolo"}}