mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* Reorder assertions in functional tests. * Introduce retry to functional tests.
This commit is contained in:
parent
1c8d7aed8c
commit
67343f77b1
1 changed files with 12 additions and 8 deletions
|
@ -7,9 +7,9 @@
|
|||
import expect from '@kbn/expect';
|
||||
import { FtrProviderContext } from '../../ftr_provider_context';
|
||||
|
||||
export default ({ getPageObjects }: FtrProviderContext) => {
|
||||
// TODO: add UI functional tests
|
||||
export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
||||
const pageObjects = getPageObjects(['uptime']);
|
||||
const retry = getService('retry');
|
||||
|
||||
describe('overview page', function() {
|
||||
const DEFAULT_DATE_START = 'Sep 10, 2019 @ 12:40:08.078';
|
||||
|
@ -84,16 +84,18 @@ export default ({ getPageObjects }: FtrProviderContext) => {
|
|||
]);
|
||||
});
|
||||
|
||||
// Flakey, see https://github.com/elastic/kibana/issues/54541
|
||||
describe.skip('snapshot counts', () => {
|
||||
describe('snapshot counts', () => {
|
||||
it('updates the snapshot count when status filter is set to down', async () => {
|
||||
await pageObjects.uptime.goToUptimePageAndSetDateRange(
|
||||
DEFAULT_DATE_START,
|
||||
DEFAULT_DATE_END
|
||||
);
|
||||
await pageObjects.uptime.setStatusFilter('down');
|
||||
const counts = await pageObjects.uptime.getSnapshotCount();
|
||||
expect(counts).to.eql({ up: '0', down: '7' });
|
||||
|
||||
await retry.tryForTime(12000, async () => {
|
||||
const counts = await pageObjects.uptime.getSnapshotCount();
|
||||
expect(counts).to.eql({ up: '0', down: '7' });
|
||||
});
|
||||
});
|
||||
|
||||
it('updates the snapshot count when status filter is set to up', async () => {
|
||||
|
@ -102,8 +104,10 @@ export default ({ getPageObjects }: FtrProviderContext) => {
|
|||
DEFAULT_DATE_END
|
||||
);
|
||||
await pageObjects.uptime.setStatusFilter('up');
|
||||
const counts = await pageObjects.uptime.getSnapshotCount();
|
||||
expect(counts).to.eql({ up: '93', down: '0' });
|
||||
await retry.tryForTime(12000, async () => {
|
||||
const counts = await pageObjects.uptime.getSnapshotCount();
|
||||
expect(counts).to.eql({ up: '93', down: '0' });
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue