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

Search profiler functional test -- using "test_user" with limited role. #69841

Merged
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 @@ -12,15 +12,21 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const aceEditor = getService('aceEditor');
const retry = getService('retry');
const security = getService('security');

const editorTestSubjectSelector = 'searchProfilerEditor';

describe('Search Profiler Editor', () => {
before(async () => {
await security.testUser.setRoles(['global_devtools_read']);
await PageObjects.common.navigateToApp('searchProfiler');
expect(await testSubjects.exists('searchProfilerEditor')).to.be(true);
});

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

it('correctly parses triple quotes in JSON', async () => {
// The below inputs are written to work _with_ ace's autocomplete unlike console's unit test
// counterparts in src/legacy/core_plugins/console/public/tests/src/editor.test.js
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 @@ -231,6 +231,17 @@ export default async function ({ readConfigFile }) {
],
},

global_devtools_read: {
kibana: [
{
feature: {
dev_tools: ['read'],
},
spaces: ['*'],
},
],
},

//Kibana feature privilege isn't specific to advancedSetting. It can be anything. https://github.com/elastic/kibana/issues/35965
test_api_keys: {
elasticsearch: {
Expand Down