[Monitoring] Fix 7.5 cloud test issues (#51781)
* Fix cloud test issues * We don't have to skip for cloud
This commit is contained in:
parent
eb8c0e33dd
commit
802423da89
|
@ -5,7 +5,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default function ({ loadTestFile }) {
|
export default function ({ loadTestFile }) {
|
||||||
describe('Setup', () => {
|
describe('Setup', function () {
|
||||||
|
// Setup mode is not supported in cloud
|
||||||
|
this.tags(['skipCloud']);
|
||||||
|
|
||||||
loadTestFile(require.resolve('./collection'));
|
loadTestFile(require.resolve('./collection'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default function ({ getService, getPageObjects }) {
|
||||||
const clusterOverview = getService('monitoringClusterOverview');
|
const clusterOverview = getService('monitoringClusterOverview');
|
||||||
const retry = getService('retry');
|
const retry = getService('retry');
|
||||||
|
|
||||||
describe('Monitoring is turned off', () => {
|
describe('Monitoring is turned off', function () {
|
||||||
before(async () => {
|
before(async () => {
|
||||||
const browser = getService('browser');
|
const browser = getService('browser');
|
||||||
await browser.setWindowSize(1600, 1000);
|
await browser.setWindowSize(1600, 1000);
|
||||||
|
|
|
@ -10,6 +10,7 @@ export function MonitoringLogstashPipelinesProvider({ getService, getPageObjects
|
||||||
const testSubjects = getService('testSubjects');
|
const testSubjects = getService('testSubjects');
|
||||||
const retry = getService('retry');
|
const retry = getService('retry');
|
||||||
const PageObjects = getPageObjects(['monitoring']);
|
const PageObjects = getPageObjects(['monitoring']);
|
||||||
|
const find = getService('find');
|
||||||
|
|
||||||
const SUBJ_LISTING_PAGE = 'logstashPipelinesListing';
|
const SUBJ_LISTING_PAGE = 'logstashPipelinesListing';
|
||||||
|
|
||||||
|
@ -34,6 +35,12 @@ export function MonitoringLogstashPipelinesProvider({ getService, getPageObjects
|
||||||
return PageObjects.monitoring.tableGetRowsFromContainer(SUBJ_TABLE_CONTAINER);
|
return PageObjects.monitoring.tableGetRowsFromContainer(SUBJ_TABLE_CONTAINER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async waitForTableToFinishLoading() {
|
||||||
|
await retry.try(async () => {
|
||||||
|
await find.waitForDeletedByCssSelector('.euiBasicTable-loading', 5000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async getPipelinesAll() {
|
async getPipelinesAll() {
|
||||||
const ids = await testSubjects.getVisibleTextAll(SUBJ_PIPELINES_IDS);
|
const ids = await testSubjects.getVisibleTextAll(SUBJ_PIPELINES_IDS);
|
||||||
const eventsEmittedRates = await testSubjects.getVisibleTextAll(SUBJ_PIPELINES_EVENTS_EMITTED_RATES);
|
const eventsEmittedRates = await testSubjects.getVisibleTextAll(SUBJ_PIPELINES_EVENTS_EMITTED_RATES);
|
||||||
|
@ -57,21 +64,25 @@ export function MonitoringLogstashPipelinesProvider({ getService, getPageObjects
|
||||||
async clickIdCol() {
|
async clickIdCol() {
|
||||||
const headerCell = await testSubjects.find(SUBJ_TABLE_SORT_ID_COL);
|
const headerCell = await testSubjects.find(SUBJ_TABLE_SORT_ID_COL);
|
||||||
const button = await headerCell.findByTagName('button');
|
const button = await headerCell.findByTagName('button');
|
||||||
return button.click();
|
await button.click();
|
||||||
|
await this.waitForTableToFinishLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
async clickEventsEmittedRateCol() {
|
async clickEventsEmittedRateCol() {
|
||||||
const headerCell = await testSubjects.find(SUBJ_TABLE_SORT_EVENTS_EMITTED_RATE_COL);
|
const headerCell = await testSubjects.find(SUBJ_TABLE_SORT_EVENTS_EMITTED_RATE_COL);
|
||||||
const button = await headerCell.findByTagName('button');
|
const button = await headerCell.findByTagName('button');
|
||||||
return button.click();
|
await button.click();
|
||||||
|
await this.waitForTableToFinishLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
setFilter(text) {
|
async setFilter(text) {
|
||||||
return PageObjects.monitoring.tableSetFilter(SUBJ_SEARCH_BAR, text);
|
await PageObjects.monitoring.tableSetFilter(SUBJ_SEARCH_BAR, text);
|
||||||
|
await this.waitForTableToFinishLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
clearFilter() {
|
async clearFilter() {
|
||||||
return PageObjects.monitoring.tableClearFilter(SUBJ_SEARCH_BAR);
|
await PageObjects.monitoring.tableClearFilter(SUBJ_SEARCH_BAR);
|
||||||
|
await this.waitForTableToFinishLoading();
|
||||||
}
|
}
|
||||||
|
|
||||||
assertNoData() {
|
assertNoData() {
|
||||||
|
|
Loading…
Reference in a new issue