{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/16900","repository_url":"https://api.github.com/repos/elastic/kibana","labels_url":"https://api.github.com/repos/elastic/kibana/issues/16900/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/16900/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/16900/events","html_url":"https://github.com/elastic/kibana/issues/16900","id":299878504,"number":16900,"title":"dashboard_grid_container test throwing UnhandledPromiseRejectionWarning","user":{"login":"nreese","id":373691,"avatar_url":"https://avatars0.githubusercontent.com/u/373691?v=4","gravatar_id":"","url":"https://api.github.com/users/nreese","html_url":"https://github.com/nreese","followers_url":"https://api.github.com/users/nreese/followers","following_url":"https://api.github.com/users/nreese/following{/other_user}","gists_url":"https://api.github.com/users/nreese/gists{/gist_id}","starred_url":"https://api.github.com/users/nreese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nreese/subscriptions","organizations_url":"https://api.github.com/users/nreese/orgs","repos_url":"https://api.github.com/users/nreese/repos","events_url":"https://api.github.com/users/nreese/events{/privacy}","received_events_url":"https://api.github.com/users/nreese/received_events","type":"User","site_admin":false},"labels":[{"id":470241449,"url":"https://api.github.com/repos/elastic/kibana/labels/:Sharing","name":":Sharing","color":"fef2c0","default":false},{"id":140008186,"url":"https://api.github.com/repos/elastic/kibana/labels/test","name":"test","color":"5319e7","default":false}],"state":"closed","locked":false,"assignee":{"login":"Stacey-Gammon","id":16563603,"avatar_url":"https://avatars3.githubusercontent.com/u/16563603?v=4","gravatar_id":"","url":"https://api.github.com/users/Stacey-Gammon","html_url":"https://github.com/Stacey-Gammon","followers_url":"https://api.github.com/users/Stacey-Gammon/followers","following_url":"https://api.github.com/users/Stacey-Gammon/following{/other_user}","gists_url":"https://api.github.com/users/Stacey-Gammon/gists{/gist_id}","starred_url":"https://api.github.com/users/Stacey-Gammon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stacey-Gammon/subscriptions","organizations_url":"https://api.github.com/users/Stacey-Gammon/orgs","repos_url":"https://api.github.com/users/Stacey-Gammon/repos","events_url":"https://api.github.com/users/Stacey-Gammon/events{/privacy}","received_events_url":"https://api.github.com/users/Stacey-Gammon/received_events","type":"User","site_admin":false},"assignees":[{"login":"Stacey-Gammon","id":16563603,"avatar_url":"https://avatars3.githubusercontent.com/u/16563603?v=4","gravatar_id":"","url":"https://api.github.com/users/Stacey-Gammon","html_url":"https://github.com/Stacey-Gammon","followers_url":"https://api.github.com/users/Stacey-Gammon/followers","following_url":"https://api.github.com/users/Stacey-Gammon/following{/other_user}","gists_url":"https://api.github.com/users/Stacey-Gammon/gists{/gist_id}","starred_url":"https://api.github.com/users/Stacey-Gammon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stacey-Gammon/subscriptions","organizations_url":"https://api.github.com/users/Stacey-Gammon/orgs","repos_url":"https://api.github.com/users/Stacey-Gammon/repos","events_url":"https://api.github.com/users/Stacey-Gammon/events{/privacy}","received_events_url":"https://api.github.com/users/Stacey-Gammon/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-02-23T23:07:15Z","updated_at":"2018-02-25T19:18:42Z","closed_at":"2018-02-25T19:18:42Z","author_association":"CONTRIBUTOR","body":"On master, running `node scripts/jest dashboard_grid_container` results in the following warnings, yet the tests pass\r\n\r\n```\r\n(node:7181) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'then' of undefined\r\n...\r\n```\r\n\r\nThe exceptions are getting thrown in [dashboard_panel.js](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/dashboard/panel/dashboard_panel.js#L10) because `this.props.renderEmbeddable` is not passed to the component.\r\n```\r\n// dashboard_panel.js#L10\r\n  async componentDidMount() {\r\n    this.props.renderEmbeddable(this.panelElement, this.props.panel);\r\n  }\r\n```\r\n\r\nAnother weird thing  in dashboard_panel.js is that the methods `renderEmbeddedContent` and `renderEmbeddedError` are each defined twice and `renderEmbeddedError` is defined with different implementations!\r\n\r\nI don't know if there is a big disconnect between this test and live code but I am not sure how `props.renderEmbeddable` ever gets passed to `DashboardPanel`.  [dashboard_grid.js](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/public/dashboard/grid/dashboard_grid.js#L184) never tries to pass renderEmbeddable as a prop when specifying the component.\r\n```\r\n// dashboard_grid.js#L184\r\n        <DashboardPanel\r\n            panelId={panel.panelIndex}\r\n            getContainerApi={getContainerApi}\r\n            embeddableFactory={this.embeddableFactoryMap[panel.type]}\r\n            onPanelFocused={this.onPanelFocused}\r\n            onPanelBlurred={this.onPanelBlurred}\r\n          />\r\n```\r\n\r\ncc @Stacey-Gammon "}}
{"actor":{"display_login":"nreese"}}