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

* [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>
(cherry picked from commit 5533748162)
This commit is contained in:
Dmitry Tomashevich 2022-03-18 16:53:09 +05:00 committed by GitHub
parent 26a40dcfa7
commit 00e62443f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 5 deletions

View file

@ -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

View file

@ -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: [],