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

[Discover] Fix "encoded URL params in context page" cloud test permissions #126470

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
12 changes: 7 additions & 5 deletions test/functional/apps/discover/_context_encoded_url_param.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,32 @@ import { FtrProviderContext } from '../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const dataGrid = getService('dataGrid');
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'settings', 'header']);
const testSubjects = getService('testSubjects');
const es = getService('es');

dimaanj marked this conversation as resolved.
Show resolved Hide resolved
describe('context encoded id param', () => {
describe('encoded URL params in context page', () => {
before(async function () {
await security.testUser.setRoles(['kibana_admin', 'context_encoded_param']);
await PageObjects.common.navigateToApp('settings');
await es.transport.request({
path: '/includes-plus-symbol-doc-id/_doc/1+1=2',
path: '/context-encoded-param/_doc/1+1=2',
method: 'PUT',
body: {
username: 'Dmitry',
'@timestamp': '2015-09-21T09:30:23',
},
});
await PageObjects.settings.createIndexPattern('includes-plus-symbol-doc-id');
await PageObjects.settings.createIndexPattern('context-encoded-param');

dimaanj marked this conversation as resolved.
Show resolved Hide resolved
await kibanaServer.uiSettings.update({ 'doc_table:legacy': false });
await PageObjects.timePicker.setDefaultAbsoluteRangeViaUiSettings();
await PageObjects.common.navigateToApp('discover');
});

it('should navigate to context page correctly', async () => {
await PageObjects.discover.selectIndexPattern('includes-plus-symbol-doc-id');
it('should navigate correctly', async () => {
await PageObjects.discover.selectIndexPattern('context-encoded-param');
await PageObjects.header.waitUntilLoadingHasFinished();

// navigate to the context view
Expand Down
15 changes: 15 additions & 0 deletions test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,21 @@ export default async function ({ readConfigFile }) {
kibana: [],
},

context_encoded_param: {
elasticsearch: {
cluster: [],
indices: [
{
names: ['context-encoded-param'],
privileges: ['read', 'view_index_metadata', 'manage', 'create_index', 'index'],
field_security: { grant: ['*'], except: [] },
},
],
run_as: [],
},
kibana: [],
},

kibana_sample_read: {
elasticsearch: {
cluster: [],
Expand Down