mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Logs UI] Increase keypress delay in functional tests (#41777)
* [Logs UI] Increase keypress delay in functional tests * Re-enable moveLogColumn test * Use charByChar instead of arbitrary key delays * Remove contradictory expect statement * Revert to 500ms keypress delay
This commit is contained in:
parent
8e8c323459
commit
299718990e
2 changed files with 6 additions and 6 deletions
|
@ -98,8 +98,7 @@ export default ({ getPageObjects, getService }: KibanaFunctionalTestDefaultProvi
|
|||
await infraSourceConfigurationFlyout.addTimestampLogColumn();
|
||||
await infraSourceConfigurationFlyout.addFieldLogColumn('host.name');
|
||||
|
||||
// TODO: make test more robust
|
||||
// await infraSourceConfigurationFlyout.moveLogColumn(0, 1);
|
||||
await infraSourceConfigurationFlyout.moveLogColumn(0, 1);
|
||||
|
||||
await infraSourceConfigurationFlyout.saveConfiguration();
|
||||
await infraSourceConfigurationFlyout.closeFlyout();
|
||||
|
@ -108,9 +107,7 @@ export default ({ getPageObjects, getService }: KibanaFunctionalTestDefaultProvi
|
|||
it('renders the changed log columns with their headers', async () => {
|
||||
const columnHeaderLabels = await infraLogStream.getColumnHeaderLabels();
|
||||
|
||||
// TODO: make test more robust
|
||||
// expect(columnHeaderLabels).to.eql(['host.name', 'Timestamp', '']);
|
||||
expect(columnHeaderLabels).to.eql(['Timestamp', 'host.name', '']);
|
||||
expect(columnHeaderLabels).to.eql(['host.name', 'Timestamp', '']);
|
||||
|
||||
const logStreamEntries = await infraLogStream.getStreamEntries();
|
||||
|
||||
|
|
|
@ -83,6 +83,8 @@ export function InfraSourceConfigurationFlyoutProvider({
|
|||
}
|
||||
},
|
||||
async moveLogColumn(sourceIndex: number, destinationIndex: number) {
|
||||
const KEY_PRESS_DELAY_MS = 500; // This may need to be high for Jenkins; 100 works on desktop
|
||||
|
||||
const logColumnPanel = (await this.getLogColumnPanels())[sourceIndex];
|
||||
const moveLogColumnHandle = await testSubjects.findDescendant(
|
||||
'moveLogColumnHandle',
|
||||
|
@ -92,7 +94,7 @@ export function InfraSourceConfigurationFlyoutProvider({
|
|||
const movementDifference = destinationIndex - sourceIndex;
|
||||
await moveLogColumnHandle.pressKeys(browser.keys.SPACE);
|
||||
for (let i = 0; i < Math.abs(movementDifference); i++) {
|
||||
await new Promise(res => setTimeout(res, 100));
|
||||
await new Promise(res => setTimeout(res, KEY_PRESS_DELAY_MS));
|
||||
if (movementDifference > 0) {
|
||||
await moveLogColumnHandle.pressKeys(browser.keys.ARROW_DOWN);
|
||||
} else {
|
||||
|
@ -100,6 +102,7 @@ export function InfraSourceConfigurationFlyoutProvider({
|
|||
}
|
||||
}
|
||||
await moveLogColumnHandle.pressKeys(browser.keys.SPACE);
|
||||
await new Promise(res => setTimeout(res, KEY_PRESS_DELAY_MS));
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue