Add typings for new tags API (#26027)

* Add typings for new tags API

* Remove test code
This commit is contained in:
Tim Roes 2018-11-21 18:55:48 +01:00 committed by GitHub
parent 4d7c141e66
commit c8647f109b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 25 additions and 8 deletions

View file

@ -9,7 +9,7 @@ import { KibanaFunctionalTestDefaultProviders } from '../../../types/providers';
// tslint:disable-next-line:no-default-export
export default ({ loadTestFile }: KibanaFunctionalTestDefaultProviders) => {
describe('InfraOps app', function() {
(this as any).tags('ciGroup4');
this.tags('ciGroup4');
loadTestFile(require.resolve('./home_page'));
});

View file

@ -8,7 +8,7 @@ import { TestInvoker } from './lib/types';
// tslint:disable:no-default-export
export default function spacesApp({ loadTestFile }: TestInvoker) {
describe('Spaces app', function spacesAppTestSuite() {
(this as any).tags('ciGroup4');
this.tags('ciGroup4');
loadTestFile(require.resolve('./spaces_selection'));
});

View file

@ -8,7 +8,7 @@ import { TestInvoker } from './lib/types';
// tslint:disable:no-default-export
export default function statusPage({ loadTestFile }: TestInvoker) {
describe('Status page', function statusPageTestSuite() {
(this as any).tags('ciGroup4');
this.tags('ciGroup4');
loadTestFile(require.resolve('./status_page'));
});

View file

@ -13,7 +13,7 @@ export default function({ getService, loadTestFile }: TestInvoker) {
const supertest = getService('supertest');
describe('saved objects security and spaces enabled', function() {
(this as any).tags('ciGroup5');
this.tags('ciGroup5');
before(async () => {
await createUsersAndRoles(es, supertest);

View file

@ -13,7 +13,7 @@ export default function({ getService, loadTestFile }: TestInvoker) {
const supertest = getService('supertest');
describe('saved objects security only enabled', function() {
(this as any).tags('ciGroup5');
this.tags('ciGroup5');
before(async () => {
await createUsersAndRoles(es, supertest);

View file

@ -9,7 +9,7 @@ import { TestInvoker } from '../../common/lib/types';
// tslint:disable:no-default-export
export default function({ loadTestFile }: TestInvoker) {
describe('saved objects spaces only enabled', function() {
(this as any).tags('ciGroup5');
this.tags('ciGroup5');
loadTestFile(require.resolve('./bulk_create'));
loadTestFile(require.resolve('./bulk_get'));

View file

@ -13,7 +13,7 @@ export default function({ loadTestFile, getService }: TestInvoker) {
const supertest = getService('supertest');
describe('spaces api with security', function() {
(this as any).tags('ciGroup5');
this.tags('ciGroup5');
before(async () => {
await createUsersAndRoles(es, supertest);

View file

@ -9,7 +9,7 @@ import { TestInvoker } from '../../common/lib/types';
// tslint:disable:no-default-export
export default function spacesOnlyTestSuite({ loadTestFile }: TestInvoker) {
describe('spaces api without security', function() {
(this as any).tags('ciGroup5');
this.tags('ciGroup5');
loadTestFile(require.resolve('./create'));
loadTestFile(require.resolve('./delete'));

View file

@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { Suite } from 'mocha';
// tslint:disable-next-line:no-namespace We need to use the namespace here to match the Mocha definition
declare module 'mocha' {
interface Suite {
/**
* Assign tags to the test suite to determine in which CI job it should be run.
*/
tags(tags: string[] | string): void;
}
}