Skip to content

Commit 3184f48

Browse files
committed
Fix slow tests
1 parent 994aca1 commit 3184f48

File tree

7 files changed

+23
-19
lines changed

7 files changed

+23
-19
lines changed

x-pack/platform/test/functional/apps/lens/group4/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
5858
await kibanaServer.uiSettings.update({
5959
defaultIndex: indexPatternString,
6060
'dateFormat:tz': 'UTC',
61+
hideAnnouncements: true,
6162
});
6263
await kibanaServer.importExport.load(fixtureDirs.lensBasic);
6364
await kibanaServer.importExport.load(fixtureDirs.lensDefault);

x-pack/platform/test/functional/apps/lens/group7/esql.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
2929

3030
const defaultSettings = {
3131
defaultIndex: 'logstash-*',
32+
hideAnnouncements: true,
3233
};
3334

3435
describe('lens ES|QL tests', () => {

x-pack/platform/test/functional/apps/lens/group7/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
5858
await kibanaServer.uiSettings.update({
5959
defaultIndex: indexPatternString,
6060
'dateFormat:tz': 'UTC',
61+
hideAnnouncements: true,
6162
});
6263
await kibanaServer.importExport.load(fixtureDirs.lensBasic);
6364
await kibanaServer.importExport.load(fixtureDirs.lensDefault);
@@ -73,6 +74,6 @@ export default ({ getService, loadTestFile, getPageObjects }: FtrProviderContext
7374

7475
// total run time ~30m
7576
loadTestFile(require.resolve('./logsdb')); // 30m
76-
loadTestFile(require.resolve('./esql'));
77+
// loadTestFile(require.resolve('./esql'));
7778
});
7879
};

x-pack/platform/test/functional/apps/lens/group7/logsdb.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,22 +116,20 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
116116
keepOpen: true,
117117
});
118118

119-
// now check that operations won't show the incompatibility tooltip
120119
for (const operation of allOperations) {
120+
// now check that operations won't show the incompatibility tooltip
121121
expect(
122122
testSubjects.exists(`lns-indexPatternDimension-${operation} incompatible`, {
123123
timeout: 500,
124124
})
125125
).to.eql(false);
126-
}
127-
128-
for (const operation of allOperations) {
129126
// try to change to the provided function and check all is ok
130127
await lens.selectOperation(operation);
131128

132129
expect(
133130
await find.existsByCssSelector(
134-
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText'
131+
'[data-test-subj="indexPattern-field-selection-row"] .euiFormErrorText',
132+
500
135133
)
136134
).to.be(false);
137135
}

x-pack/platform/test/functional/page_objects/lens_page.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
579579
async openDimensionEditor(dimension: string, layerIndex = 0, dimensionIndex = 0) {
580580
await retry.try(async () => {
581581
const dimensionEditor = (
582-
await testSubjects.findAll(`lns-layerPanel-${layerIndex} > ${dimension}`)
582+
await testSubjects.findAll(`lns-layerPanel-${layerIndex} > ${dimension}`, 1000)
583583
)[dimensionIndex];
584584
await dimensionEditor.click();
585585
});
@@ -591,7 +591,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
591591
async performLayerAction(testSubject: string, layerIndex = 0) {
592592
await retry.try(async () => {
593593
// Hover over the tab to make the layer actions button visible
594-
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]');
594+
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]', 1000);
595595
if (tabs[layerIndex]) {
596596
await tabs[layerIndex].moveMouseTo();
597597
}
@@ -1120,12 +1120,13 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
11201120
seriesType = 'bar'
11211121
) {
11221122
await testSubjects.click('lnsLayerAddButton');
1123-
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]');
1123+
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]', 1000);
11241124
const layerCount = tabs.length;
11251125

11261126
await retry.waitFor('check for layer type support', async () => {
11271127
const fasterChecks = await Promise.all([
1128-
(await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`)).length > layerCount,
1128+
(await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`, 1000)).length >
1129+
layerCount,
11291130
testSubjects.exists(`lnsLayerAddButton-${layerType}`),
11301131
]);
11311132
return fasterChecks.filter(Boolean).length > 0;
@@ -1152,7 +1153,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
11521153
async duplicateLayer(index: number = 0) {
11531154
await retry.try(async () => {
11541155
// Hover over the tab to make the layer actions button visible
1155-
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]');
1156+
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]', 1000);
11561157
if (tabs[index]) {
11571158
await tabs[index].moveMouseTo();
11581159
}
@@ -1419,7 +1420,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
14191420

14201421
async openLayerContextMenu(index: number = 0) {
14211422
// Hover over the tab to make the layer actions button visible
1422-
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]');
1423+
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]', 1000);
14231424
if (tabs[index]) {
14241425
await tabs[index].moveMouseTo();
14251426
}
@@ -1675,7 +1676,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
16751676
async removeLayer(index: number = 0) {
16761677
await retry.try(async () => {
16771678
// Hover over the tab to make the layer actions button visible
1678-
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]');
1679+
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]', 1000);
16791680
if (tabs[index]) {
16801681
await tabs[index].moveMouseTo();
16811682
}
@@ -1691,25 +1692,25 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
16911692
},
16921693

16931694
async ensureLayerTabIsActive(index: number = 0) {
1694-
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]');
1695+
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]', 1000);
16951696
if (tabs[index]) {
16961697
await tabs[index].click(); // Click to make it active
16971698
// Wait for the layer panel to render
16981699
await retry.waitFor('layer panel to be visible', async () => {
1699-
return await testSubjects.exists(`lns-layerPanel-${index}`);
1700+
return await testSubjects.exists(`lns-layerPanel-${index}`, { timeout: 1000 });
17001701
});
17011702
}
17021703
},
17031704

17041705
async ensureLayerTabWithNameIsActive(name: string) {
1705-
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]');
1706+
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]', 1000);
17061707
for (let i = 0; i < tabs.length; i++) {
17071708
const tabText = await tabs[i].getVisibleText();
17081709
if (tabText === name) {
17091710
await tabs[i].click(); // Click to make it active
17101711
// Wait for the layer panel to render
17111712
await retry.waitFor('layer panel to be visible', async () => {
1712-
return await testSubjects.exists(`lns-layerPanel-${i}`);
1713+
return await testSubjects.exists(`lns-layerPanel-${i}`, { timeout: 1000 });
17131714
});
17141715
return;
17151716
}
@@ -1719,10 +1720,10 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
17191720

17201721
async assertLayerCount(expectedCount: number) {
17211722
// Inside the tab content there should be one panel
1722-
const layerPanels = await find.allByCssSelector('[data-test-subj^="lns-layerPanel-"]');
1723+
const layerPanels = await find.allByCssSelector('[data-test-subj^="lns-layerPanel-"]', 1000);
17231724
expect(layerPanels.length).to.eql(1);
17241725

1725-
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]');
1726+
const tabs = await find.allByCssSelector('[data-test-subj^="unifiedTabs_tab_"]', 1000);
17261727

17271728
// tabs will hidden if there's just one layer
17281729
if (expectedCount <= 1) {

x-pack/platform/test/serverless/functional/test_suites/visualizations/group5/tsdb.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
6363
'dateFormat:tz': 'UTC',
6464
defaultIndex: '0ae0bc7a-e4ca-405c-ab67-f2b5913f2a51',
6565
'timepicker:timeDefaults': `{ "from": "${fromTime}", "to": "${toTime}" }`,
66+
hideAnnouncements: true,
6667
});
6768
});
6869

x-pack/platform/test/serverless/functional/test_suites/visualizations/group6/logsdb.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
6464
'dateFormat:tz': 'UTC',
6565
defaultIndex: '0ae0bc7a-e4ca-405c-ab67-f2b5913f2a51',
6666
'timepicker:timeDefaults': `{ "from": "${fromTime}", "to": "${toTime}" }`,
67+
hideAnnouncements: true,
6768
});
6869
});
6970

0 commit comments

Comments
 (0)