[logstash/pipelineCreate] retry reading rows (#32436) (#32485)

This commit is contained in:
Spencer 2019-03-05 11:02:28 -08:00 committed by GitHub
parent a89926e52b
commit d7f95fee0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,7 @@ export default function ({ getService, getPageObjects }) {
const pipelineList = getService('pipelineList');
const pipelineEditor = getService('pipelineEditor');
const PageObjects = getPageObjects(['logstash']);
const retry = getService('retry');
describe('pipeline create new', () => {
let originalWindowSize;
@ -67,11 +68,13 @@ export default function ({ getService, getPageObjects }) {
await pipelineList.assertExists();
await pipelineList.setFilter(id);
const rows = await pipelineList.readRows();
const newRow = rows.find(row => row.id === id);
await retry.try(async () => {
const rows = await pipelineList.readRows();
const newRow = rows.find(row => row.id === id);
expect(newRow)
.to.have.property('description', description);
expect(newRow)
.to.have.property('description', description);
});
});
});
@ -84,9 +87,11 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.logstash.gotoNewPipelineEditor();
await pipelineEditor.clickCancel();
await pipelineList.assertExists();
const currentRows = await pipelineList.readRows();
expect(originalRows).to.eql(currentRows);
await retry.try(async () => {
await pipelineList.assertExists();
const currentRows = await pipelineList.readRows();
expect(originalRows).to.eql(currentRows);
});
});
});