[7.3] [jest] disallow invalid describe calls (#41378) (#41486)

* [jest] disallow invalid describe calls (#41378)

* [jest] disallow invalid describe calls

* correct other describe calls

* remove unnecessary glob

* cast decribe names to strings

* remove new async describe function

# Conflicts:
#	test/functional/apps/dashboard/dashboard_filtering.js
#	x-pack/legacy/plugins/index_management/__jest__/client_integration/home.test.ts
#	x-pack/legacy/plugins/reporting/server/usage/get_reporting_usage_collector.test.js
#	x-pack/test/functional/apps/uptime/monitor.ts
#	x-pack/test_utils/jest/integration_tests/example_integration.test.ts

* fix eslint violation
This commit is contained in:
Spencer 2019-07-18 16:35:07 -07:00 committed by GitHub
parent c23de2ba14
commit 4d5764fbb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 103 additions and 93 deletions

View file

@ -361,6 +361,16 @@ module.exports = {
},
},
/**
* Jest specific rules
*/
{
files: ['**/*.test.{js,ts,tsx}'],
rules: {
'jest/valid-describe': 'error',
},
},
/**
* APM overrides
*/

View file

@ -224,7 +224,7 @@ describe('#topologicallyBatchProjects', () => {
expect(expectedBatches).toMatchSnapshot();
});
describe('batchByWorkspace = true', async () => {
describe('batchByWorkspace = true', () => {
test('batches projects topologically based on their project dependencies and workspaces', async () => {
const batches = topologicallyBatchProjects(projects, graph, { batchByWorkspace: true });

View file

@ -56,7 +56,7 @@ describe('KuiButton', () => {
describe('Props', () => {
describe('buttonType', () => {
BUTTON_TYPES.forEach(buttonType => {
describe(buttonType, () => {
describe(`${buttonType}`, () => {
test(`renders the ${buttonType} class`, () => {
const $button = render(
<KuiButton

View file

@ -42,7 +42,7 @@ describe('KuiButtonIcon', () => {
describe('Props', () => {
describe('type', () => {
ICON_TYPES.forEach(type => {
describe(type, () => {
describe(`${type}`, () => {
test(`renders the ${type} class`, () => {
const $buttonIcon = render(<KuiButtonIcon type={type} />);
expect($buttonIcon).toMatchSnapshot();

View file

@ -57,7 +57,7 @@ describe('KuiLinkButton', () => {
describe('Props', () => {
describe('buttonType', () => {
BUTTON_TYPES.forEach(buttonType => {
describe(buttonType, () => {
describe(`${buttonType}`, () => {
test(`renders the ${buttonType} class`, () => {
const $button = render(
<KuiLinkButton

View file

@ -55,7 +55,7 @@ describe('KuiSubmitButton', () => {
describe('Props', () => {
describe('buttonType', () => {
BUTTON_TYPES.forEach(buttonType => {
describe(buttonType, () => {
describe(`${buttonType}`, () => {
test(`renders the ${buttonType} class`, () => {
const $button = render(<KuiSubmitButton buttonType={buttonType} />);
expect($button).toMatchSnapshot();

View file

@ -31,7 +31,7 @@ describe('KuiCollapseButton', () => {
describe('Props', () => {
describe('direction', () => {
DIRECTIONS.forEach(direction => {
describe(direction, () => {
describe(`${direction}`, () => {
test(`renders the ${direction} class`, () => {
const component = <KuiCollapseButton direction={direction} {...requiredProps}/>;
expect(render(component)).toMatchSnapshot();

View file

@ -219,7 +219,7 @@ describe('filter_manager', () => {
});
});
describe('add filters', async () => {
describe('add filters', () => {
test('app state should accept a single filter', async function() {
updateSubscription = filterManager.getUpdates$().subscribe(updateListener);
const f1 = getFilter(FilterStateStore.APP_STATE, false, false, 'age', 34);
@ -535,7 +535,7 @@ describe('filter_manager', () => {
});
});
describe('remove filters', async () => {
describe('remove filters', () => {
test('remove on empty should do nothing and not fire events', async () => {
updateSubscription = filterManager.getUpdates$().subscribe(updateListener);
await filterManager.removeAll();

View file

@ -81,7 +81,7 @@ describe('headers', () => {
return JSON.parse(requestParts[0]);
};
describe('search request preference', async () => {
describe('search request preference', () => {
test('should be set to sessionId when courier:setRequestPreference is "sessionId"', async () => {
const config = {
get: () => {

View file

@ -133,7 +133,7 @@ describe('kfetch', () => {
}
});
describe('when throwing response error (KFetchError)', async () => {
describe('when throwing response error (KFetchError)', () => {
let error: KFetchError;
beforeEach(async () => {
fetchMock.get('*', { status: 404, body: { foo: 'bar' } });
@ -348,7 +348,7 @@ describe('kfetch', () => {
});
});
describe('when interceptors return synchronously', async () => {
describe('when interceptors return synchronously', () => {
let resp: any;
beforeEach(async () => {
fetchMock.get('*', { foo: 'bar' });
@ -381,7 +381,7 @@ describe('kfetch', () => {
});
});
describe('when interceptors return promise', async () => {
describe('when interceptors return promise', () => {
let resp: any;
beforeEach(async () => {
fetchMock.get('*', { foo: 'bar' });

View file

@ -52,7 +52,7 @@ export default function ({ getService }) {
const getSavedObjectTypesQuery = types => coerceToArray(types).map(type => `savedObjectTypes=${type}`).join('&');
const defaultQuery = getSavedObjectTypesQuery(['visualization', 'index-pattern', 'search', 'dashboard']);
describe('searches', async () => {
describe('searches', () => {
it('should validate search response schema', async () => {
await supertest
.get(`${baseApiUrl}/search/960372e0-3224-11e8-a572-ffca06da1357?${defaultQuery}`)
@ -145,7 +145,7 @@ export default function ({ getService }) {
});
});
describe('dashboards', async () => {
describe('dashboards', () => {
it('should validate dashboard response schema', async () => {
await supertest
.get(`${baseApiUrl}/dashboard/b70c7ae0-3224-11e8-a572-ffca06da1357?${defaultQuery}`)
@ -240,7 +240,7 @@ export default function ({ getService }) {
});
});
describe('visualizations', async () => {
describe('visualizations', () => {
it('should validate visualization response schema', async () => {
await supertest
.get(`${baseApiUrl}/visualization/a42c0580-3224-11e8-a572-ffca06da1357?${defaultQuery}`)
@ -320,7 +320,7 @@ export default function ({ getService }) {
});
});
describe('index patterns', async () => {
describe('index patterns', () => {
it('should validate visualization response schema', async () => {
await supertest
.get(`${baseApiUrl}/index-pattern/8963ca30-3224-11e8-a572-ffca06da1357?${defaultQuery}`)

View file

@ -29,7 +29,7 @@ export default function ({ getService, getPageObjects }) {
const browser = getService('browser');
const dashboardAddPanel = getService('dashboardAddPanel');
describe('create and add embeddables', async () => {
describe('create and add embeddables', () => {
before(async () => {
await PageObjects.dashboard.loadSavedDashboard('few panels');
});

View file

@ -27,12 +27,12 @@ export default function ({ getService, getPageObjects }) {
const pieChart = getService('pieChart');
const PageObjects = getPageObjects(['dashboard', 'header', 'visualize']);
describe('dashboard filter bar', async () => {
describe('dashboard filter bar', () => {
before(async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
});
describe('Add a filter bar', async function () {
describe('Add a filter bar', function () {
before(async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
});
@ -50,7 +50,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('filter editor field list', async function () {
describe('filter editor field list', function () {
this.tags(['skipFirefox']);
before(async () => {
@ -80,7 +80,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('filter pills', async function () {
describe('filter pills', function () {
before(async () => {
await filterBar.ensureFieldEditorModalIsClosed();
await PageObjects.dashboard.gotoDashboardLandingPage();

View file

@ -36,13 +36,13 @@ export default function ({ getService, getPageObjects }) {
// FLAKY: https://github.com/elastic/kibana/issues/41088
// FLAKY: https://github.com/elastic/kibana/issues/41087
describe.skip('dashboard filtering', async function () {
describe.skip('dashboard filtering', function () {
this.tags('smoke');
before(async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
});
describe('adding a filter that excludes all data', async () => {
describe('adding a filter that excludes all data', () => {
before(async () => {
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.setTimepickerInDataRange();
@ -108,7 +108,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('using a pinned filter that excludes all data', async () => {
describe('using a pinned filter that excludes all data', () => {
before(async () => {
await filterBar.toggleFilterPinned('bytes');
await PageObjects.header.waitUntilLoadingHasFinished();
@ -170,7 +170,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('disabling a filter unfilters the data on', async () => {
describe('disabling a filter unfilters the data on', () => {
before(async () => {
await filterBar.toggleFilterEnabled('bytes');
await PageObjects.header.waitUntilLoadingHasFinished();
@ -227,7 +227,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('nested filtering', async () => {
describe('nested filtering', () => {
before(async () => {
await PageObjects.dashboard.gotoDashboardLandingPage();
});

View file

@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.dashboard.initTests();
});
describe('create prompt', async () => {
describe('create prompt', () => {
it('appears when there are no dashboards', async function () {
const promptExists = await PageObjects.dashboard.getCreateDashboardPromptExists();
expect(promptExists).to.be(true);
@ -59,7 +59,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('delete', async function () {
describe('delete', function () {
it('default confirm action is cancel', async function () {
await PageObjects.dashboard.searchForDashboardWithName(dashboardName);
await PageObjects.dashboard.checkDashboardListingSelectAllCheckbox();

View file

@ -23,7 +23,7 @@ export default function ({ getService, getPageObjects }) {
const retry = getService('retry');
const PageObjects = getPageObjects(['dashboard']);
describe('dashboard data-shared attributes', async () => {
describe('dashboard data-shared attributes', () => {
let originalTitles = [];
before(async () => {

View file

@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }) {
const queryBar = getService('queryBar');
const PageObjects = getPageObjects(['dashboard', 'discover']);
describe('dashboard query bar', async () => {
describe('dashboard query bar', () => {
before(async () => {
await PageObjects.dashboard.loadSavedDashboard('dashboard with filter');
});

View file

@ -56,7 +56,7 @@ export default function ({ getPageObjects, getService }) {
});
});
describe('dashboard with stored timed', async function () {
describe('dashboard with stored timed', function () {
it('is saved with time', async function () {
await PageObjects.dashboard.switchToEditMode();
await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);

View file

@ -24,7 +24,7 @@ export default function ({ getService, getPageObjects }) {
const PageObjects = getPageObjects(['dashboard', 'common']);
const browser = getService('browser');
describe('embed mode', async () => {
describe('embed mode', () => {
before(async () => {
await PageObjects.dashboard.loadSavedDashboard('few panels');
});

View file

@ -24,7 +24,7 @@ export default function ({ getService, getPageObjects }) {
const dashboardAddPanel = getService('dashboardAddPanel');
const PageObjects = getPageObjects(['dashboard']);
describe('empty dashboard', async () => {
describe('empty dashboard', () => {
before(async () => {
await PageObjects.dashboard.clickNewDashboard();
});

View file

@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }) {
const dashboardPanelActions = getService('dashboardPanelActions');
const PageObjects = getPageObjects(['dashboard', 'common']);
describe('full screen mode', async () => {
describe('full screen mode', () => {
before(async () => {
await PageObjects.dashboard.loadSavedDashboard('few panels');
});

View file

@ -53,7 +53,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('shows lose changes warning', async function () {
describe('shows lose changes warning', function () {
describe('and loses changes on confirmation', function () {
beforeEach(async function () {
await PageObjects.dashboard.gotoDashboardEditMode(dashboardName);
@ -193,7 +193,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('Does not show lose changes warning', async function () {
describe('Does not show lose changes warning', function () {
it('when time changed is not stored with dashboard', async function () {
await PageObjects.dashboard.gotoDashboardEditMode(dashboardName);
await PageObjects.dashboard.saveDashboard(dashboardName, { storeTimeWithDashboard: false });

View file

@ -380,7 +380,7 @@ export default function ({ getService, getPageObjects }) {
}
});
describe('query #2, which has an empty time range', async () => {
describe('query #2, which has an empty time range', () => {
const fromTime = '1999-06-11 09:22:11.000';
const toTime = '1999-06-12 11:21:04.000';
@ -401,7 +401,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('filter editor', async function () {
describe('filter editor', function () {
it('should add a phrases filter', async function () {
await filterBar.addFilter('extension.raw', 'is one of', 'jpg');
expect(await filterBar.hasFilter('extension.raw', 'jpg')).to.be(true);

View file

@ -29,7 +29,7 @@ export default function ({ getPageObjects, getService }) {
<h3>Inline HTML that should not be rendered as html</h3>
`;
describe('visualize app', async () => {
describe('visualize app', () => {
before(async function () {
await PageObjects.visualize.navigateToNewVisualization();
await PageObjects.visualize.clickMarkdownWidget();
@ -37,7 +37,7 @@ export default function ({ getPageObjects, getService }) {
await PageObjects.visualize.clickGo();
});
describe('markdown vis', async () => {
describe('markdown vis', () => {
it('should not have inspector enabled', async function () {
await inspector.expectIsNotEnabled();

View file

@ -28,7 +28,7 @@ export default function ({ getService, getPageObjects }) {
const fromTime = '2015-09-19 06:31:44.000';
const toTime = '2015-09-23 18:31:44.000';
describe('pie chart', async function () {
describe('pie chart', function () {
const vizName1 = 'Visualization PieChart';
before(async function () {
log.debug('navigateToApp visualize');

View file

@ -184,7 +184,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('timezones', async function () {
describe('timezones', function () {
const expectedLabels = [
'2015-09-20 00:00',
'2015-09-21 00:00',

View file

@ -209,7 +209,7 @@ export default function ({ getService, getPageObjects }) {
});
describe('Only request data around extent of map option', async () => {
describe('Only request data around extent of map option', () => {
it('when checked adds filters to aggregation', async () => {
const vizName1 = 'Visualization TileMap';

View file

@ -25,7 +25,7 @@ export default function ({ getPageObjects }) {
describe('visualize listing page', function describeIndexTests() {
const vizName = 'Visualize Listing Test';
describe('create and delete', async function () {
describe('create and delete', function () {
before(async function () {
await PageObjects.visualize.gotoVisualizationLandingPage();

View file

@ -7,7 +7,7 @@
import { migrations } from './migrations';
import { CANVAS_TYPE } from './common/lib';
describe(CANVAS_TYPE, () => {
describe(`${CANVAS_TYPE}`, () => {
describe('7.0.0', () => {
const migrate = doc => migrations[CANVAS_TYPE]['7.0.0'](doc);

View file

@ -252,7 +252,7 @@ Array [
});
});
describe(`GET ${routePrefix}/find`, async () => {
it(`GET ${routePrefix}/find`, async () => {
const request = {
method: 'GET',
url: `${routePrefix}/find?name=abc&page=2&perPage=10`,

View file

@ -76,7 +76,7 @@ describe('<AutoFollowPatternList />', () => {
});
});
describe('when there are auto-follow patterns', async () => {
describe('when there are auto-follow patterns', () => {
let find;
let exists;
let component;

View file

@ -74,7 +74,7 @@ describe('<FollowerIndicesList />', () => {
});
});
describe('when there are follower indices', async () => {
describe('when there are follower indices', () => {
let find;
let exists;
let component;

View file

@ -45,7 +45,7 @@ describe('license_pre_routing_factory', () => {
});
});
describe('isAvailable is true', async () => {
describe('isAvailable is true', () => {
beforeEach(() => {
mockLicenseCheckResults = {
isAvailable: true

View file

@ -45,7 +45,7 @@ const mockTooltipProperties = [
new MockTooltipProperty('prop2', 'foobar2', false)
];
describe('FeatureProperties', async () => {
describe('FeatureProperties', () => {
test('should not show filter button', async () => {
const component = shallow(

View file

@ -52,7 +52,7 @@ const defaultProps = {
isLocked: false
};
describe('FeatureTooltip (single)', async () => {
describe('FeatureTooltip (single)', () => {
test('should not show close button', async () => {
const component = shallow(
@ -91,7 +91,7 @@ describe('FeatureTooltip (single)', async () => {
});
describe('FeatureTooltip (multi)', async () => {
describe('FeatureTooltip (multi)', () => {
test('should not show close button / should show count', async () => {
const component = shallow(

View file

@ -129,7 +129,7 @@ describe('Elasticsearch Settings Find Reason for No Data', () => {
expect(result).to.eql({ found: false });
});
describe('exporters', async () => {
describe('exporters', () => {
it('should warn if all exporters are disabled', async () => {
const input = {
exporters: {

View file

@ -60,7 +60,7 @@ describe('<RemoteClusterList />', () => {
});
});
describe('when there are remote clusters', async () => {
describe('when there are remote clusters', () => {
let find;
let exists;
let component;

View file

@ -296,7 +296,7 @@ describe('CSV Execute Job', function () {
});
});
describe('Cells with formula values', async () => {
describe('Cells with formula values', () => {
it('returns `csv_contains_formulas` when cells contain formulas', async function () {
mockServer.config().get.withArgs('xpack.reporting.csv.checkForFormulas').returns(true);
callWithRequestStub.onFirstCall().returns({

View file

@ -228,7 +228,7 @@ describe(`when job is completed`, () => {
expect(headers['content-type']).toBe('application/pdf');
});
describe(`when non-whitelisted contentType specified in job output`, async () => {
describe(`when non-whitelisted contentType specified in job output`, () => {
test(`sets statusCode to 500`, async () => {
const { statusCode } = await getCompletedResponse({ outputContentType: 'application/html' });
expect(statusCode).toBe(500);

View file

@ -70,7 +70,7 @@ test('sets enabled to false when reporting is turned off', async () => {
expect(usageStats.enabled).toBe(false);
});
describe('with a basic license', async () => {
describe('with a basic license', () => {
let usageStats;
beforeAll(async () => {
const serverWithBasicLicenseMock = getServerMock();
@ -93,7 +93,7 @@ describe('with a basic license', async () => {
});
});
describe('with no license', async () => {
describe('with no license', () => {
let usageStats;
beforeAll(async () => {
const serverWithNoLicenseMock = getServerMock();
@ -116,7 +116,7 @@ describe('with no license', async () => {
});
});
describe('with platinum license', async () => {
describe('with platinum license', () => {
let usageStats;
beforeAll(async () => {
const serverWithPlatinumLicenseMock = getServerMock();

View file

@ -274,7 +274,7 @@ describe('features', () => {
expectGetFeatures: false,
},
].forEach(({ group, expectManageSpaces, expectGetFeatures }) => {
describe(group, () => {
describe(`${group}`, () => {
test('actions defined only at the feature are included in `all` and `read`', () => {
const features: Feature[] = [
{

View file

@ -17,7 +17,7 @@ import '../../mock/ui_settings';
import { LastEventTime } from '.';
describe('Last Event Time Stat', async () => {
describe('Last Event Time Stat', () => {
// this is just a little hack to silence a warning that we'll get until react
// fixes this: https://github.com/facebook/react/pull/14853
// For us that mean we need to upgrade to 16.9.0

View file

@ -19,7 +19,7 @@ import { createStore, hostsModel, networkModel, State } from '../../../store';
import { AddToKql } from '.';
describe('AddToKql Component', async () => {
describe('AddToKql Component', () => {
const state: State = mockGlobalState;
let store = createStore(state, apolloClientObservable);

View file

@ -16,7 +16,7 @@ import '../../../../mock/ui_settings';
import { FirstLastSeenHost, FirstLastSeenHostType } from '.';
describe('FirstLastSeen Component', async () => {
describe('FirstLastSeen Component', () => {
// this is just a little hack to silence a warning that we'll get until react
// fixes this: https://github.com/facebook/react/pull/14853
// For us that mean we need to upgrade to 16.9.0

View file

@ -17,7 +17,7 @@ import '../../../../mock/ui_settings';
import { FirstLastSeenDomain } from './index';
describe('FirstLastSeen Component', async () => {
describe('FirstLastSeen Component', () => {
// this is just a little hack to silence a warning that we'll get until react
// fixes this: https://github.com/facebook/react/pull/14853
// For us that mean we need to upgrade to 16.9.0

View file

@ -21,7 +21,7 @@ describe('getDeprecationLoggingStatus', () => {
});
describe('setDeprecationLogging', () => {
describe('isEnabled = true', async () => {
describe('isEnabled = true', () => {
it('calls cluster.putSettings with logger.deprecation = WARN', async () => {
const callWithRequest = jest.fn();
await setDeprecationLogging(callWithRequest, {} as any, true);
@ -31,7 +31,7 @@ describe('setDeprecationLogging', () => {
});
});
describe('isEnabled = false', async () => {
describe('isEnabled = false', () => {
it('calls cluster.putSettings with logger.deprecation = ERROR', async () => {
const callWithRequest = jest.fn();
await setDeprecationLogging(callWithRequest, {} as any, false);

View file

@ -33,7 +33,7 @@ export default function ({ getService }) {
});
});
describe('detail', async () => {
describe('detail', () => {
it('should return the node stats when providing a custom node attribute', async () => {
// Load the stats from ES js client
const nodeStats = await getNodesStats();

View file

@ -88,7 +88,7 @@ export default function ({ getService }) {
});
});
it(`should ${basic ? 'not' : ''} create a role with kibana and FLS/DLS elasticsearch
it(`should ${basic ? 'not' : ''} create a role with kibana and FLS/DLS elasticsearch
privileges on ${basic ? 'basic' : 'trial'} licenses`, async () => {
await supertest.put('/api/security/role/role_with_privileges_dls_fls')
.set('kbn-xsrf', 'xxx')
@ -219,7 +219,7 @@ export default function ({ getService }) {
});
});
it(`should ${basic ? 'not' : ''} update a role adding DLS and TLS priviledges
it(`should ${basic ? 'not' : ''} update a role adding DLS and TLS priviledges
when using ${basic ? 'basic' : 'trial'} license`, async () => {
await es.shield.putRole({
@ -267,7 +267,7 @@ export default function ({ getService }) {
});
});
describe('Get Role', async () => {
describe('Get Role', () => {
it('should get roles', async () => {
await es.shield.putRole({
name: 'role_to_get',

View file

@ -14,7 +14,7 @@ export default function canvasSmokeTest({ getService, getPageObjects }) {
const retry = getService('retry');
const PageObjects = getPageObjects(['common']);
describe('smoke test', async function () {
describe('smoke test', function () {
this.tags('smoke');
const workpadListSelector = 'canvasWorkpadLoaderTable canvasWorkpadLoaderWorkpad';
const testWorkpadId = 'workpad-1705f884-6224-47de-ba49-ca224fe6ec31';

View file

@ -117,7 +117,7 @@ export default function({ getPageObjects, getService }: KibanaFunctionalTestDefa
});
});
describe('space with Visualize disabled', async () => {
describe('space with Visualize disabled', () => {
before(async () => {
// we need to load the following in every situation as deleting
// a space deletes all of the associated saved objects
@ -144,7 +144,7 @@ export default function({ getPageObjects, getService }: KibanaFunctionalTestDefa
});
});
describe('space with index pattern management disabled', async () => {
describe('space with index pattern management disabled', () => {
before(async () => {
await spacesService.create({
id: 'custom_space',

View file

@ -31,7 +31,7 @@ export default function ({ getPageObjects, getService }) {
expect(mapboxStyle.sources[VECTOR_SOURCE_ID].data.features.length).to.equal(10);
});
describe('configuration', async () => {
describe('configuration', () => {
before(async () => {
await PageObjects.maps.openLayerPanel('logstash');
// Can not use testSubjects because data-test-subj is placed range input and number input
@ -52,7 +52,7 @@ export default function ({ getPageObjects, getService }) {
});
});
describe('query', async () => {
describe('query', () => {
before(async () => {
await PageObjects.maps.setAndSubmitQuery('machine.os.raw : "win 8"');
});

View file

@ -30,7 +30,7 @@ export default function ({ getPageObjects, getService }) {
function makeRequestTestsForGeoPrecision(LAYER_ID) {
describe('geoprecision - requests', async () => {
describe('geoprecision - requests', () => {
let beforeTimestamp;
beforeEach(async () => {
await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 1);
@ -58,7 +58,7 @@ export default function ({ getPageObjects, getService }) {
});
});
describe('geotile grid precision - data', async ()=> {
describe('geotile grid precision - data', ()=> {
beforeEach(async () => {
await PageObjects.maps.setView(DATA_CENTER_LAT, DATA_CENTER_LON, 1);

View file

@ -16,7 +16,7 @@ export default function ({ getPageObjects }) {
await PageObjects.maps.loadSavedMap('layer with errors');
});
describe('ESSearchSource with missing index pattern id', async () => {
describe('ESSearchSource with missing index pattern id', () => {
const MISSING_INDEX_ID = 'idThatDoesNotExitForESSearchSource';
const LAYER_NAME = MISSING_INDEX_ID;
@ -33,7 +33,7 @@ export default function ({ getPageObjects }) {
});
});
describe('ESGeoGridSource with missing index pattern id', async () => {
describe('ESGeoGridSource with missing index pattern id', () => {
const MISSING_INDEX_ID = 'idThatDoesNotExitForESGeoGridSource';
const LAYER_NAME = MISSING_INDEX_ID;
@ -49,7 +49,7 @@ export default function ({ getPageObjects }) {
});
});
describe('ESJoinSource with missing index pattern id', async () => {
describe('ESJoinSource with missing index pattern id', () => {
const MISSING_INDEX_ID = 'idThatDoesNotExitForESJoinSource';
const LAYER_NAME = 'geo_shapes*';
@ -65,7 +65,7 @@ export default function ({ getPageObjects }) {
});
});
describe('EMSFileSource with missing EMS id', async () => {
describe('EMSFileSource with missing EMS id', () => {
const MISSING_EMS_ID = 'idThatDoesNotExitForEMSFileSource';
const LAYER_NAME = 'EMS_vector_shapes';
@ -81,7 +81,7 @@ export default function ({ getPageObjects }) {
});
});
describe('EMSTMSSource with missing EMS id', async () => {
describe('EMSTMSSource with missing EMS id', () => {
const MISSING_EMS_ID = 'idThatDoesNotExitForEMSTile';
const LAYER_NAME = 'EMS_tiles';
@ -97,7 +97,7 @@ export default function ({ getPageObjects }) {
});
});
describe('KibanaRegionmapSource with missing region map configuration', async () => {
describe('KibanaRegionmapSource with missing region map configuration', () => {
const MISSING_REGION_NAME = 'nameThatDoesNotExitForKibanaRegionmapSource';
const LAYER_NAME = 'Custom_vector_shapes';
@ -113,7 +113,7 @@ export default function ({ getPageObjects }) {
});
});
describe('KibanaTilemapSource with missing map.tilemap.url configuration', async () => {
describe('KibanaTilemapSource with missing map.tilemap.url configuration', () => {
const LAYER_NAME = 'Custom_TMS';
it('should diplay error message in layer panel', async () => {

View file

@ -161,7 +161,7 @@ export default function ({ getService, getPageObjects }) {
});
});
describe('alert actions take you to the elasticsearch indices listing', async () => {
describe('alert actions take you to the elasticsearch indices listing', () => {
const { setup, tearDown } = getLifecycleMethods(getService, getPageObjects);
before(async () => {

View file

@ -12,7 +12,7 @@ export default function ({ getService, getPageObjects }) {
const log = getService('log');
const PageObjects = getPageObjects(['security', 'rollup', 'common', 'header']);
describe('rollup job', async function () {
describe('rollup job', function () {
this.tags('smoke');
before(async () => {
// init data

View file

@ -41,8 +41,8 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.settings.navigateTo();
});
describe('Security', async () => {
describe('navigation', async () => {
describe('Security', () => {
describe('navigation', () => {
it('Can navigate to create user section', async () => {
await PageObjects.security.clickElasticsearchUsers();
await PageObjects.security.clickCreateNewUser();

View file

@ -14,7 +14,7 @@ export default function ({ getService, getPageObjects }) {
const browser = getService('browser');
const kibanaServer = getService('kibanaServer');
describe('rbac ', async function () {
describe('rbac ', function () {
before(async () => {
await browser.setWindowSize(1600, 1000);
log.debug('users');

View file

@ -92,7 +92,7 @@ export default function spaceSelectorFunctonalTests({
await esArchiver.unload('spaces/selector');
});
describe('displays separate data for each space', async () => {
describe('displays separate data for each space', () => {
it('in the default space', async () => {
await PageObjects.common.navigateToApp('dashboard');
await expectDashboardRenders('[Logs] Web Traffic');

View file

@ -20,7 +20,7 @@ export default function ({ getService }) {
const reportingAPI = getService('reportingAPI');
const usageAPI = getService('usageAPI');
describe('BWC report generation into existing indexes', async () => {
describe('BWC report generation into existing indexes', () => {
let expectedCompletedReportCount;
let cleanupIndexAlias;

View file

@ -164,7 +164,7 @@ export function deleteTestSuiteFactory(es: any, esArchiver: any, supertest: Supe
.then(tests.exists.response);
});
describe(`when the space is reserved`, async () => {
describe(`when the space is reserved`, () => {
it(`should return ${tests.reservedSpace.statusCode}`, async () => {
return supertest
.delete(`${getUrlPrefix(spaceId)}/api/spaces/space/default`)

View file

@ -7,7 +7,7 @@
import * as kbnTestServer from '../../../../src/test_utils/kbn_server';
import { TestKbnServerConfig } from '../../kbn_server_config';
describe('example integration test with kbn server', async () => {
describe('example integration test with kbn server', () => {
let servers: any = null;
beforeAll(async () => {
servers = await kbnTestServer.startTestServers({