Skip to content

Commit

Permalink
fix flaky test elastic#83231
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisecheng committed Nov 12, 2020
1 parent b8576ed commit bc6c33d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x-pack/test/functional/apps/logstash/pipeline_create.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

import expect from '@kbn/expect';
import { omit } from 'lodash';

export default function ({ getService, getPageObjects }) {
const browser = getService('browser');
Expand Down Expand Up @@ -89,14 +90,16 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.logstash.gotoPipelineList();
await pipelineList.assertExists();
const originalRows = await pipelineList.readRows();
const originalRowsWithoutTime = originalRows.map((row) => omit(row, 'lastModified'));

await PageObjects.logstash.gotoNewPipelineEditor();
await pipelineEditor.clickCancel();

await retry.try(async () => {
await pipelineList.assertExists();
const currentRows = await pipelineList.readRows();
expect(originalRows).to.eql(currentRows);
const currentRowsWithoutTime = currentRows.map((row) => omit(row, 'lastModified'));
expect(originalRowsWithoutTime).to.eql(currentRowsWithoutTime);
});
});
});
Expand Down

0 comments on commit bc6c33d

Please sign in to comment.