Add typings for new tags API (#26027)
* Add typings for new tags API * Remove test code
This commit is contained in:
parent
4d7c141e66
commit
c8647f109b
|
@ -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'));
|
||||
});
|
||||
|
|
|
@ -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'));
|
||||
});
|
||||
|
|
|
@ -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'));
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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'));
|
||||
|
|
17
x-pack/test/types/mocha_decorations.d.ts
vendored
Normal file
17
x-pack/test/types/mocha_decorations.d.ts
vendored
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue