-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[core/ui] bootstrap the legacy platform within the new platform #20699
Merged
spalger
merged 37 commits into
elastic:master
from
spalger:implement/new-platform-bootstrap
Jul 18, 2018
Merged
Changes from 2 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
97c86a3
[core/ui] bootstrap the legacy platform within the new platform
a7fd8fb
fix test that parsed uiApp response
bb73252
fix missed rename
0a8dcec
use a legacy platform service to bootstrap within the start() lifecycle
f1a698e
[tests/ui_exports_replace_injected_vars] read vars from legacyMetadata
9984fa5
[core/injectedMetadata] use less permissive array type to avoid freez…
6624b58
[ui/metadata/tests] remove unnecessary test
e514979
Merge branch 'master' of github.com:elastic/kibana into implement/new…
4f8fe21
implement feedback from Court
5357110
restore app_entry_template tests
3c71d11
Merge branch 'master' of github.com:elastic/kibana into implement/new…
b662c4d
[ui/notify/tests] remove reference to window.__KBN__
277f273
Merge branch 'master' of github.com:elastic/kibana into implement/new…
e404fa4
[core] use *StartContract naming convention
cc1d8f0
Merge branch 'master' of github.com:elastic/kibana into implement/new…
2151adf
[tslint] ignore fixtures in precommit hook
04af61a
[core/public] add tests, use *Params in constructors
9c76bfb
[core/public/tests] fix type definitions
3073159
[core/public/legacyPlatform] test arguments to legacy bootstrap module
450e6b1
[core/public/core/tests] use correct services for mock generics
5a5210b
Merge branch 'master' of github.com:elastic/kibana into implement/new…
675f032
[core/public] list explicit params for core service
7ec434b
Merge branch 'master' of github.com:elastic/kibana into implement/new…
33a74af
[core/public] tweak tests to address feedback
3e5a2ab
[core/public/core/tests] start the core once in each tests so mocks c…
e6c5c0b
Merge branch 'master' of github.com:elastic/kibana into implement/new…
0ec8793
[testBundle] use a Set() to avoid duplication
794ae2c
[core/public] add comments describing the core services/systems
fad92a0
[core/public] use `readonly` modifier for params property
7442290
[uiBundles] add comment about isCacheValid()
4567aed
[eslintResolver] remove ui_framework alias from webpack config
4f9f64d
fix references to remove kbn-initial-state element
874029c
[core/public/tests] use destructuring for readability
c210fef
[core/public/tests] cleanup in after hook for clarity
7a4987f
[core/public/deepFreeze] test that freezing arrays is supported
5b0edf1
[testsBundle] fix typo
9710387
[core/public/tests] fix typo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,16 +100,22 @@ describe('constructor', () => { | |
}); | ||
|
||
describe('#start()', () => { | ||
it('calls lifecycleSystem#start() and injectedMetadata#start()', () => { | ||
const core = new CoreSystem({ | ||
let core; | ||
|
||
beforeAll(() => { | ||
core = new CoreSystem({ | ||
...defaultCoreSystemParams, | ||
}); | ||
|
||
expect(core.start()).toBe(undefined); | ||
core.start(); | ||
}); | ||
|
||
it('calls injectedMetadata#start()', () => { | ||
expect(MockInjectedMetadataService.mock.instances[0].start).toHaveBeenCalledTimes(1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. optional nit: maybe destructuring can make it a little bit more readable: |
||
expect(MockInjectedMetadataService.mock.instances[0].start).toHaveBeenCalledWith(); | ||
}); | ||
|
||
it('calls lifecycleSystem#start()', () => { | ||
expect(MockLegacyPlatformService.mock.instances[0].start).toHaveBeenCalledTimes(1); | ||
expect(MockLegacyPlatformService.mock.instances[0].start).toHaveBeenCalledWith({ | ||
injectedMetadata: mockInjectedMetadataStartContract, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought you were the one in particular that hated this pattern and wanted everyone to use setup functions instead!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I do, but setup functions are best because they take arguments, when there aren't any arguments I'm not super picky. But point taken!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also the issue that the mocks are cleared between each test, so starting core once and reusing the value for each test wouldn't work anyway.