Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 0 additions & 5 deletions x-pack/test/functional/apps/canvas/custom_elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default function canvasCustomElementTest({
getService,
getPageObjects,
}: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const testSubjects = getService('testSubjects');
const browser = getService('browser');
const retry = getService('retry');
Expand All @@ -23,10 +22,6 @@ export default function canvasCustomElementTest({
this.tags('skipFirefox');

before(async () => {
// init data
await esArchiver.loadIfNeeded('logstash_functional');
await esArchiver.load('canvas/default');
Comment thread
rashmivkulkarni marked this conversation as resolved.

// open canvas home
await PageObjects.common.navigateToApp('canvas');

Expand Down
6 changes: 0 additions & 6 deletions x-pack/test/functional/apps/canvas/expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function canvasExpressionTest({ getService, getPageObjects }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const testSubjects = getService('testSubjects');
// const browser = getService('browser');
const retry = getService('retry');
const PageObjects = getPageObjects(['canvas', 'common']);
const find = getService('find');
Expand All @@ -21,10 +19,6 @@ export default function canvasExpressionTest({ getService, getPageObjects }: Ftr
this.tags('skipFirefox');

before(async () => {
// init data
await esArchiver.loadIfNeeded('logstash_functional');
await esArchiver.load('canvas/default');

// load test workpad
await PageObjects.common.navigateToApp('canvas', {
hash: '/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1',
Expand Down
16 changes: 15 additions & 1 deletion x-pack/test/functional/apps/canvas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@
* you may not use this file except in compliance with the Elastic License.
*/

export default function canvasApp({ loadTestFile }) {
export default function canvasApp({ loadTestFile, getService }) {
const security = getService('security');
const esArchiver = getService('esArchiver');

describe('Canvas app', function canvasAppTestSuite() {
before(async () => {
// init data
await security.testUser.setRoles(['test_logstash_reader', 'global_canvas_read']);
await esArchiver.loadIfNeeded('logstash_functional');
await esArchiver.load('canvas/default');
});

after(async () => {
await security.testUser.restoreDefaults();
});

this.tags('ciGroup2'); // CI requires tags ヽ(゜Q。)ノ?
loadTestFile(require.resolve('./smoke_test'));
loadTestFile(require.resolve('./expression'));
Expand Down
7 changes: 0 additions & 7 deletions x-pack/test/functional/apps/canvas/smoke_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import expect from '@kbn/expect';
import { parse } from 'url';

export default function canvasSmokeTest({ getService, getPageObjects }) {
const esArchiver = getService('esArchiver');
const testSubjects = getService('testSubjects');
const browser = getService('browser');
const retry = getService('retry');
Expand All @@ -20,12 +19,6 @@ export default function canvasSmokeTest({ getService, getPageObjects }) {
const testWorkpadId = 'workpad-1705f884-6224-47de-ba49-ca224fe6ec31';

before(async () => {
// init data
await esArchiver.loadIfNeeded('logstash_functional');
await esArchiver.load('canvas/default');

// load canvas
// see also navigateToUrl(app, hash)
await PageObjects.common.navigateToApp('canvas');
});

Expand Down
11 changes: 11 additions & 0 deletions x-pack/test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,17 @@ export default async function ({ readConfigFile }) {
kibana: [],
},

global_canvas_read: {
Comment thread
rashmivkulkarni marked this conversation as resolved.
Outdated
kibana: [
{
feature: {
canvas: ['all'],
},
spaces: ['*'],
},
],
},

global_discover_read: {
kibana: [
{
Expand Down