Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert default to named exports - errors #10986

Merged
merged 4 commits into from
Apr 4, 2017

Conversation

stacey-gammon
Copy link
Contributor

Related to #10981, but am doing some conversions separately since it will be a large chunk of work. Plus this file wasn't a straight conversion as I got rid of the external errors object and am exporting each error individually.

Background: #8641

KbnError.call(this,
'Courier attempted to start a query before the previous had finished.',
errors.HastyRefresh);
};
_.class(errors.HastyRefresh).inherits(KbnError);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really relevant to this PR, but as we're changing this code I'll ask:

Any reason we can't have class KbnError extends Errors and class HastyRefresh extends KbnError? If that works it would clean up this code even more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason I can see. Changed them all and added tests for a sanity check. Indeed looks much better this way.

Copy link
Contributor

@kimjoar kimjoar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ❤️ this. Much cleaner.

@stacey-gammon
Copy link
Contributor Author

Jenkins failed due to #10980

13:33:59.589: Load Saved Dashboard Dashboard Test Time
13:33:59.589: searchForDashboardWithName: Dashboard Test Time
13:33:59.589: gotoDashboardLandingPage
13:33:59.589: onDashboardLandingPage
13:33:59.589: doesCssSelectorExist a[href="#/dashboard"]
13:33:59.607: exists? true
13:33:59.607: findByCssSelector a[href="#/dashboard"]
13:33:59.681: in findTestSubject: [data-test-subj~="searchFilter"]
13:33:59.724: in findTestSubject: [data-test-subj~="searchFilter"]
13:33:59.822: in findTestSubject: [data-test-subj~="globalLoadingIndicator"]
13:34:00.038: Taking screenshot "/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/test/screenshots/failure/failure_1491226440038_dashboard without stored timed_Does not set the time picker on open.png"
>> FAIL: chrome on any platform - kibana - dashboard app - dashboard time - dashboard without stored timed - Does not set the time picker on open (4851ms)
UnknownError: [POST http://localhost:4444/wd/hub/session/caf6058b7d8cdd94052374a5cea78789/element/0.14483254627294562-19/click] unknown error: Element is not clickable at point (306, 276). Other element would receive the click: <div class="kuiToolBarFooter">...</div>
  (Session info: chrome=56.0.2924.87)
  (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.4.0-45-generic x86_64)
  at runRequest  <node_modules/leadfoot/Session.js:88:40>
  at <node_modules/leadfoot/Session.js:109:39>
  at new Promise  <node_modules/dojo/_debug/Promise.ts:411:4>
  at ProxiedSession._post  <node_modules/leadfoot/Session.js:63:10>
  at Element._post  <node_modules/leadfoot/Element.js:23:31>
  at Element.click  <node_modules/leadfoot/Element.js:163:15>
  at Command.<anonymous>  <node_modules/leadfoot/Command.js:680:19>
  at <node_modules/dojo/_debug/Promise.ts:393:16>
  at run  <node_modules/dojo/_debug/Promise.ts:237:8>

jenkins, test this

@stacey-gammon
Copy link
Contributor Author

jenkins, test this

@stacey-gammon
Copy link
Contributor Author

Failed on a different test, but same function (trying to open a link from the dashboard landing page):

15:33:34.081: doesCssSelectorExist a[href="#/dashboard"]
15:33:34.092: exists? true
15:33:34.092: findByCssSelector a[href="#/dashboard"]
15:33:34.182: in findTestSubject: [data-test-subj~="searchFilter"]
15:33:34.217: in findTestSubject: [data-test-subj~="searchFilter"]
15:33:34.338: in findTestSubject: [data-test-subj~="globalLoadingIndicator"]
15:33:34.568: Taking screenshot "/var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/test/screenshots/failure/failure_1491233614567_and loses changes on confirmation_when a new vis is added.png"
>> FAIL: chrome on any platform - kibana - dashboard app - dashboard view edit mode - shows lose changes warning - and loses changes on confirmation - when a new vis is added (651ms)
UnknownError: [POST http://localhost:4444/wd/hub/session/285ca531ae979e61c58ee2f3bef4c3ee/element/0.7376015521739807-135/click] unknown error: Element is not clickable at point (319, 236). Other element would receive the click: <div class="kuiToolBarFooter">...</div>
  (Session info: chrome=56.0.2924.87)
  (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.4.0-45-generic x86_64)
  at runRequest  <node_modules/leadfoot/Session.js:88:40>
  at <node_modules/leadfoot/Session.js:109:39>
  at new Promise  <node_modules/dojo/_debug/Promise.ts:411:4>
  at ProxiedSession._post  <node_modules/leadfoot/Session.js:63:10>
  at Element._post  <node_modules/leadfoot/Element.js:23:31>
  at Element.click  <node_modules/leadfoot/Element.js:163:15>
  at Command.<anonymous>  <node_modules/leadfoot/Command.js:680:19>

Going to try merging #11004

@stacey-gammon
Copy link
Contributor Author

stacey-gammon commented Apr 4, 2017

jenkins, test this (build aborted)

@stacey-gammon stacey-gammon merged commit 1486188 into elastic:master Apr 4, 2017
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Apr 4, 2017
* Convert default to named exports - errors

* Make all error classes use class syntax and extends

add tests

* Extending Error apparently doesn't work

* Merge PR elastic#11004 to try to fix test failures
stacey-gammon added a commit that referenced this pull request Apr 4, 2017
* Convert default to named exports - errors

* Make all error classes use class syntax and extends

add tests

* Extending Error apparently doesn't work

* Merge PR #11004 to try to fix test failures
simianhacker pushed a commit to simianhacker/kibana that referenced this pull request Apr 5, 2017
* Convert default to named exports - errors

* Make all error classes use class syntax and extends

add tests

* Extending Error apparently doesn't work

* Merge PR elastic#11004 to try to fix test failures
@stacey-gammon stacey-gammon deleted the default-to-named-errors branch October 24, 2017 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants