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

[Maps] Add XYZTMSSource unit test #58567

Merged
merged 10 commits into from
Feb 26, 2020

Conversation

thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck commented Feb 26, 2020

This adds unit tests for the XYZTMSSource.

It also introduces the boilerplate for the type-declaration files of two core components in Maps.

  • ISource
  • ILayer

and some of their dependencies.

This will also help condense the #57879 PR, as that one will extend the object model.

@thomasneirynck thomasneirynck added the WIP Work in progress label Feb 26, 2020
@thomasneirynck thomasneirynck changed the title [Maps] Add ILayer [Maps] Add xyz-source unit test Feb 26, 2020
@thomasneirynck thomasneirynck changed the title [Maps] Add xyz-source unit test [Maps] Add XYZTMSSource unit test Feb 26, 2020
@thomasneirynck thomasneirynck added chore release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0 labels Feb 26, 2020
@@ -4,11 +4,17 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { IFieldType } from '../../../../../src/plugins/data/common/index_patterns/fields';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this import was an oversight. remove.

it('should create a tile-layer', () => {
const source = new XYZTMSSource(descriptor, null);
const layer: ILayer = source.createDefaultLayer();
expect(layer instanceof TileLayer).toEqual(true);
Copy link
Contributor Author

@thomasneirynck thomasneirynck Feb 26, 2020

Choose a reason for hiding this comment

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

this is more to illustrate the typing in this PR. When TileLayer will be used in signatures in other .ts files (not yet the case), the actual type-checking will also be enforced by the compiler.

@thomasneirynck thomasneirynck added the [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation label Feb 26, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@thomasneirynck thomasneirynck removed the WIP Work in progress label Feb 26, 2020
@thomasneirynck thomasneirynck marked this pull request as ready for review February 26, 2020 12:31
@thomasneirynck thomasneirynck requested a review from a team as a code owner February 26, 2020 12:31
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

Thanks for starting the typings of Layer and Source. These are going to be a ton of work and this is a great way to get them going.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

Thanks for starting the types for Layer and Source
LGTM
code review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants