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

Fix occasional integration test failure and some IE issues #155

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

andy-lee-eng
Copy link
Collaborator

IE uses left/right instead of x/y and different format "transform".
Use "closest" (with polyfill) to navigate up to the chart element.
Polyfill "matches" which is used by d3fc
Move default theme variables to where they actually need to be (IE/Edge don't get the variables otherwise)

IE uses left/right instead of x/y and different format "transform".
Use "closest" (with polyfill) to navigate up to the chart element.
Polyfill "matches" which is used by d3fc
Move default theme variables to where they actually need to be (IE/Edge don't get the variables otherwise)
Copy link
Collaborator

@Ro4052 Ro4052 left a comment

Choose a reason for hiding this comment

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

What was causing the test failures?

@andy-lee-eng
Copy link
Collaborator Author

The get-root-container code was for some reason returning the plot-area instead of the custom element (which has the "getContainer" method).
I can only guess this is some weird artifact of the test context.
As the code that uses it was actually just trying to get the ancestor element, it seemed like "closest" was a better fit anyway.
But that isn't supported by IE without a polyfill, and in the process of checking that out, I found a whole load of other things broken in IE/Edge!

@matt-hooper
Copy link
Collaborator

@DevAndyLee
Did you have to do anything to your environment to get this to work?
I have pulled the new branch down.
Rebuilt all the packages and tried to run the tests, but all the puppeteer ones give me an error:

filter by a single instrument.: Failed to load resource: the server responded with a status of 404 (Not Found)

filter by a single instrument.: Failed to load resource: the server responded with a status of 404 (Not Found)

FAIL test/js/integration/candlestick.spec.js (5.644s)
candlestick.html
✕ filter by a single instrument. (2506ms)
✕ filter to date range. (586ms)

● candlestick.html › filter by a single instrument.

expect(received).toEqual(expected)

Difference:

- Expected
+ Received

- Array []
+ Array [
+   "Failed to load resource: the server responded with a status of 404 (Not Found)",
+   "Failed to load resource: the server responded with a status of 404 (Not Found)",
+ ]

  at Object.test (../../node_modules/@jpmorganchase/perspective-viewer/test/js/utils.js:295:32)

@matt-hooper
Copy link
Collaborator

I have done a completely fresh install and the tests now pass. I am not sure what was going with the 404 errors.

@matt-hooper matt-hooper merged commit ec08bd5 into develop Apr 3, 2019
@matt-hooper matt-hooper deleted the feature/fix-tests-and-ie branch April 3, 2019 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants