Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.9] [Uptime] Unskip certs func tests (#73086) #73957

Merged
merged 4 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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