mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Tweaks needed for integrating with the functional test runner (#11469)
* [git] ignore the entire root optimize directory * [ftr] fix readConfigFile export * [ftr/config] set default hostname and protocols for urls * [chrome] make top-level chrome a test-subject * [ftr/CommonPage] only auto-login when not navigating to the login page
This commit is contained in:
parent
7ef0f6cbfe
commit
b31e4be076
6 changed files with 9 additions and 10 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -5,9 +5,7 @@
|
|||
.node_binaries
|
||||
node_modules
|
||||
trash
|
||||
/optimize/bundles
|
||||
/optimize/testdev
|
||||
/optimize/testUiServer
|
||||
/optimize
|
||||
target
|
||||
/build
|
||||
.jruby
|
||||
|
|
|
@ -1 +1 @@
|
|||
export { readConfigFile } from './create_config';
|
||||
export { readConfigFile } from './read_config_file';
|
||||
|
|
|
@ -2,7 +2,7 @@ import { defaultsDeep } from 'lodash';
|
|||
|
||||
import { Config } from './config';
|
||||
|
||||
export async function readConfigFile(log, configFile, settingOverrides) {
|
||||
export async function readConfigFile(log, configFile, settingOverrides = {}) {
|
||||
log.debug('Loading config file from %j', configFile);
|
||||
|
||||
const configModule = require(configFile);
|
|
@ -8,8 +8,8 @@ const ID_PATTERN = /^[a-zA-Z0-9_]+$/;
|
|||
const INSPECTING = process.execArgv.includes('--inspect');
|
||||
|
||||
const urlPartsSchema = () => Joi.object().keys({
|
||||
protocol: Joi.string().valid('http', 'https'),
|
||||
hostname: Joi.string().hostname(),
|
||||
protocol: Joi.string().valid('http', 'https').default('http'),
|
||||
hostname: Joi.string().hostname().default('localhost'),
|
||||
port: Joi.number(),
|
||||
auth: Joi.string().regex(/^[^:]+:.+$/, 'username and password seperated by a colon'),
|
||||
username: Joi.string(),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="content" chrome-context >
|
||||
<div class="content" chrome-context data-test-subj="kibanaChrome">
|
||||
<global-nav
|
||||
chrome="chrome"
|
||||
is-visible="chrome.getVisible()"
|
||||
|
|
|
@ -79,8 +79,9 @@ export function CommonPageProvider({ getService, getPageObjects }) {
|
|||
return remote.getCurrentUrl();
|
||||
})
|
||||
.then(function (currentUrl) {
|
||||
const loginPage = new RegExp('login').test(currentUrl);
|
||||
if (loginPage) {
|
||||
const loginPage = currentUrl.includes('/login');
|
||||
const wantedLoginPage = appUrl.includes('/login') || appUrl.includes('/logout');
|
||||
if (loginPage && !wantedLoginPage) {
|
||||
log.debug('Found loginPage username = '
|
||||
+ config.get('servers.kibana.username'));
|
||||
return PageObjects.shield.login(config.get('servers.kibana.username'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue