Skip to content

Commit

Permalink
[Discover] Fix "encoded URL params in context page" cloud test permis…
Browse files Browse the repository at this point in the history
…sions (#126470)

* [Discover] fix cloud test for encoded param in context

* [Discover] improve test description wording

* [Discover] apply suggestion

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
dimaanj and kibanamachine authored Mar 15, 2022
1 parent c060b9f commit 5533748
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
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');

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');

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

0 comments on commit 5533748

Please sign in to comment.