Skip to content

Commit

Permalink
[Uptime] Unskip certs func tests (#73086) (#73957)
Browse files Browse the repository at this point in the history
* Temporarily unload all other functional tests.

* Unskip certificates test.

* Uncomment skipped test files.

* Add explicit fields to check generator call to prevent grouping issues that can lead to test flakiness.

* added wait for loading

* update missing func

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Shahzad <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Shahzad <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2020
1 parent ed08468 commit 78419d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions x-pack/test/functional/apps/uptime/certificates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const certId = getSha256();
const { monitorId } = await makeCheck({
es,
monitorId: 'cert-test-check-id',
fields: {
monitor: {
name: 'Cert Test Check',
},
url: {
full: 'https://site-to-check.com/',
},
},
tls: {
sha256: certId,
},
Expand Down
1 change: 1 addition & 0 deletions x-pack/test/functional/apps/uptime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default ({ loadTestFile, getService }: FtrProviderContext) => {
loadTestFile(require.resolve('./settings'));
loadTestFile(require.resolve('./certificates'));
});

describe('with real-world data', () => {
before(async () => {
await esArchiver.unload(ARCHIVE);
Expand Down
5 changes: 4 additions & 1 deletion x-pack/test/functional/services/uptime/certificates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';

export function UptimeCertProvider({ getService }: FtrProviderContext) {
export function UptimeCertProvider({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const retry = getService('retry');

const PageObjects = getPageObjects(['common', 'timePicker', 'header']);

const changeSearchField = async (text: string) => {
const input = await testSubjects.find('uptimeCertSearch');
await input.clearValueWithKeyboard();
Expand Down Expand Up @@ -61,6 +63,7 @@ export function UptimeCertProvider({ getService }: FtrProviderContext) {
const self = this;
return retry.tryForTime(60 * 1000, async () => {
await changeSearchField(monId);
await PageObjects.header.waitUntilLoadingHasFinished();
await self.hasCertificates(1);
});
},
Expand Down

0 comments on commit 78419d0

Please sign in to comment.