Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define integrationTestRoot in config file and use to define screensho… #79247

Merged
merged 4 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import expect from '@kbn/expect';
import { REPO_ROOT } from '@kbn/dev-utils';

export default function ({ getService, getPageObjects, updateBaselines }) {
const screenshot = getService('screenshots');
Expand All @@ -15,7 +14,7 @@ export default function ({ getService, getPageObjects, updateBaselines }) {

describe('check metricbeat Dashboard', function () {
before(async function () {
await esArchiver.load(`${REPO_ROOT}/../integration-test/test/es_archives/metricbeat`);
await esArchiver.load('metricbeat');
wayneseymour marked this conversation as resolved.
Show resolved Hide resolved

// this navigateToActualURL takes the place of navigating to the dashboard landing page,
// filtering on the dashboard name, selecting it, setting the timepicker, and going to full screen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ const log = new ToolingLog({
level: 'info',
writeTo: process.stdout,
});
log.info(`REPO_ROOT = ${REPO_ROOT}`);
log.info(`WORKSPACE in config file ${process.env.WORKSPACE}`);
LeeDr marked this conversation as resolved.
Show resolved Hide resolved
const stateFilePath = process.env.WORKSPACE
? `${process.env.WORKSPACE}/qa/envvars.sh`
: `${REPO_ROOT}/../integration-test/qa/envvars.sh`;

const INTEGRATION_TEST_ROOT = process.env.WORKSPACE || resolve(REPO_ROOT, '../integration-test');
log.info(`INTEGRATION_TEST_ROOT = ${INTEGRATION_TEST_ROOT}`);

const stateFilePath = resolve(INTEGRATION_TEST_ROOT, 'qa/envvars.sh');
log.info(`stateFilePath = ${stateFilePath}`);

const prepend = (testFile) => require.resolve(`${testsFolder}/${testFile}`);

Expand All @@ -46,11 +50,11 @@ export default async ({ readConfigFile }) => {
security: { disableTestUser: true },
// choose where screenshots should be saved
screenshots: {
directory: resolve(`${REPO_ROOT}/../integration-test`, 'test/screenshots'),
directory: resolve(INTEGRATION_TEST_ROOT, 'test/screenshots'),
},
// choose where esArchiver should load archives from
esArchiver: {
directory: resolve(`${REPO_ROOT}/../integration-test`, 'test/es_archives'),
directory: resolve(INTEGRATION_TEST_ROOT, 'test/es_archives'),
},
};
return settings;
Expand Down