* Updating everything except the license headers themselves * Applying ESLint rules * Manually replacing the stragglers
72 lines
2.4 KiB
TypeScript
72 lines
2.4 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
import expect from '@kbn/expect';
|
|
import { FtrProviderContext } from '../ftr_provider_context';
|
|
|
|
const DEFAULT_REQUEST = `
|
|
|
|
GET _search
|
|
{
|
|
"query": {
|
|
"match_all": {}
|
|
}
|
|
}
|
|
|
|
`.trim();
|
|
|
|
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|
const retry = getService('retry');
|
|
const log = getService('log');
|
|
const visualTesting = getService('visualTesting');
|
|
const PageObjects = getPageObjects(['common', 'console']);
|
|
|
|
describe.skip('console app', function describeIndexTests() {
|
|
before(async () => {
|
|
log.debug('navigateTo console');
|
|
await PageObjects.common.navigateToApp('console');
|
|
});
|
|
|
|
it('should show the default request', async () => {
|
|
// collapse the help pane because we only get the VISIBLE TEXT, not the part that is scrolled
|
|
await PageObjects.console.collapseHelp();
|
|
await retry.try(async () => {
|
|
const actualRequest = await PageObjects.console.getRequest();
|
|
log.debug(actualRequest);
|
|
expect(actualRequest.trim()).to.eql(DEFAULT_REQUEST);
|
|
});
|
|
|
|
await visualTesting.snapshot();
|
|
});
|
|
|
|
it('default request response should include `"timed_out" : false`', async () => {
|
|
const expectedResponseContains = '"timed_out" : false,';
|
|
await PageObjects.console.clickPlay();
|
|
await retry.try(async () => {
|
|
const actualResponse = await PageObjects.console.getResponse();
|
|
log.debug(actualResponse);
|
|
expect(actualResponse).to.contain(expectedResponseContains);
|
|
});
|
|
});
|
|
|
|
it('settings should allow changing the text size', async () => {
|
|
await PageObjects.console.setFontSizeSetting(20);
|
|
await retry.try(async () => {
|
|
// the settings are not applied synchronously, so we retry for a time
|
|
expect(await PageObjects.console.getRequestFontSize()).to.be('20px');
|
|
});
|
|
|
|
await PageObjects.console.setFontSizeSetting(24);
|
|
await retry.try(async () => {
|
|
// the settings are not applied synchronously, so we retry for a time
|
|
expect(await PageObjects.console.getRequestFontSize()).to.be('24px');
|
|
});
|
|
});
|
|
});
|
|
}
|