-
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
Functional tests: convert more test/services to TS #45176
Conversation
💔 Build Failed |
ea00f95
to
b9eb1ad
Compare
💚 Build Succeeded |
retest |
💚 Build Succeeded |
b9eb1ad
to
7091caa
Compare
💚 Build Succeeded |
Co-Authored-By: Tre' <wayne.seymour@elastic.co>
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.
Great work @dmlemeshko , lemme know if we need to zoom or discuss the type signatures.
const testSubjects = getService('testSubjects'); | ||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
export function FilterBarProvider({ getService, getPageObjects }: FtrProviderContext) { |
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.
export function FilterBarProvider({ getService, getPageObjects }: FtrProviderContext) { | |
export function FilterBarProvider({ getService, getPageObjects }: FtrProviderContext): InstanceType<FilterBar> { |
Again, not sure if this is how to properly type a factory function in TS.
export function FlyoutProvider({ getService }) { | ||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
export function FlyoutProvider({ getService }: FtrProviderContext) { |
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.
export function FlyoutProvider({ getService }: FtrProviderContext) { | |
export function FlyoutProvider({ getService }: FtrProviderContext): InstanceType<typeof Flyout> { |
Maybe?
const RENDER_COMPLETE_SELECTOR = '[data-render-complete="true"]'; | ||
const RENDER_COMPLETE_PENDING_SELECTOR = '[data-render-complete="false"]'; | ||
const DATA_LOADING_SELECTOR = '[data-loading]'; | ||
|
||
export function RenderableProvider({ getService }) { | ||
export function RenderableProvider({ getService }: FtrProviderContext) { |
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.
export function RenderableProvider({ getService }: FtrProviderContext) { | |
export function RenderableProvider({ getService }: FtrProviderContext): InstanceType<typeof Renderable> { |
throw new Error(`${ | ||
completedElements.length | ||
} elements completed rendering, still waiting on a total of ${count} | ||
specifically:\n${pendingElementNames.join('\n')}`); |
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'm curious, did prettier
or eslint
cause this formatting?
Not interested in bikeshedding on formatting, but it seemed peculiar.
export function VisualizeListingTableProvider({ getService, getPageObjects }) { | ||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
export function VisualizeListingTableProvider({ getService, getPageObjects }: FtrProviderContext) { |
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.
export function VisualizeListingTableProvider({ getService, getPageObjects }: FtrProviderContext) { | |
export function VisualizeListingTableProvider({ getService, getPageObjects }: FtrProviderContext): InstanceType<typeof VisualizeListingTable> { |
Co-Authored-By: Tre' <wayne.seymour@elastic.co>
Co-Authored-By: Tre' <wayne.seymour@elastic.co>
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.
IMO, specifying explicit return values when they can be inferred is unnecessary. But changes LGTM
…o tsfy-test-services
💔 Build Failed |
💚 Build Succeeded |
LGTM |
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.
LGTM
* convert more test/services to TS * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * fix lint error
* convert more test/services to TS * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * fix lint error
* convert more test/services to TS * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * fix lint error
…-to-np-ready * 'master' of github.com:elastic/kibana: Upgrade EUI to 13.8.1 (elastic#45052) [ML] Add multi metric job wizard test (elastic#45279) [SIEM] Inject/apply KQL changed in refresh button (elastic#45065) [Graph] Type persistence (elastic#44985) Functional tests: convert more test/services to TS (elastic#45176)
* convert more test/services to TS * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * fix lint error
…ditor * 'master' of github.com:elastic/kibana: (76 commits) Upgrade EUI to 13.8.1 (elastic#45052) [ML] Add multi metric job wizard test (elastic#45279) [SIEM] Inject/apply KQL changed in refresh button (elastic#45065) [Graph] Type persistence (elastic#44985) Functional tests: convert more test/services to TS (elastic#45176) [ML] Fixes display of matching modules in index data visualizer (elastic#45261) [Console] Update indentation behaviour (elastic#45249) Convert value provided to PhraseValueInput to string to catch Exception (elastic#45259) [Region Map] Fix loading default vector map and base layer setting (elastic#43858) [ML] Fixing empty time range when cloning jobs (elastic#45286) [ML] Fixing wizard validation delay (elastic#45265) [Logs UI] Interpret finished analysis jobs as healthy (elastic#45268) [Console] SQL template with triple quote in completion (elastic#45248) [ML] Data Frames: Cards as links (elastic#45254) fix(code/frontend): should show updating instead of cloning when updating (elastic#45238) fix(code/frontend): fix document search result from (elastic#45236) disable another flaky suite (elastic#45323) (elastic#45330) disable flaky suite (elastic#45105) skip flaky suite (elastic#43069) skip flaky suite (elastic#45089) ...
* convert more test/services to TS * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * fix lint error
* convert more test/services to TS * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * Update test/functional/services/combo_box.ts Co-Authored-By: Tre' <wayne.seymour@elastic.co> * fix lint error
Summary
This PR migrates services located in
test/services
to typescript.I added small descriptions to some functions to clarify how they should be used.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers