-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Logs UI] Make column configurations reorderable #41035
Changes from 5 commits
78a1025
4c678b6
503b43d
41e07f5
3088fea
d9eb7ad
cd4ce93
41c663c
bdb8d51
9f289a6
4e2d6ac
e1f5d37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,6 +4,7 @@ | |||||
* you may not use this file except in compliance with the Elastic License. | ||||||
*/ | ||||||
|
||||||
import { Key } from 'selenium-webdriver'; | ||||||
import { KibanaFunctionalTestDefaultProviders } from '../../types/providers'; | ||||||
import { WebElementWrapper } from '../../../../test/functional/services/lib/web_element_wrapper'; | ||||||
|
||||||
|
@@ -81,6 +82,25 @@ export function InfraSourceConfigurationFlyoutProvider({ | |||||
await this.removeLogColumn(0); | ||||||
} | ||||||
}, | ||||||
async moveLogColumn(sourceIndex: number, destinationIndex: number) { | ||||||
const logColumnPanel = (await this.getLogColumnPanels())[sourceIndex]; | ||||||
const moveLogColumnHandle = await testSubjects.findDescendant( | ||||||
'moveLogColumnHandle', | ||||||
logColumnPanel | ||||||
); | ||||||
await moveLogColumnHandle.focus(); | ||||||
const movementDifference = destinationIndex - sourceIndex; | ||||||
await moveLogColumnHandle.pressKeys(Key.SPACE); | ||||||
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. Assuming we access the keys via the
Suggested change
|
||||||
for (let i = 0; i < Math.abs(movementDifference); i++) { | ||||||
await new Promise(res => setTimeout(res, 100)); | ||||||
if (movementDifference > 0) { | ||||||
await moveLogColumnHandle.pressKeys(Key.ARROW_DOWN); | ||||||
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. Assuming we access the keys via the
Suggested change
|
||||||
} else { | ||||||
await moveLogColumnHandle.pressKeys(Key.ARROW_UP); | ||||||
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.
Suggested change
|
||||||
} | ||||||
} | ||||||
await moveLogColumnHandle.pressKeys(Key.SPACE); | ||||||
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.
Suggested change
|
||||||
}, | ||||||
|
||||||
/** | ||||||
* Form and flyout | ||||||
|
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.
In order to not break the abstraction introduced by the testing framework we should probably avoid importing from
selenium-webdriver
directly.How about we access the
Key
object via thebrowser
service at the top of the provider function below?