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

Spencer's changes #15

Prev Previous commit
Next Next commit
Fix cloud test failures for 8.4 (elastic#139155)
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
liza-mae and kibanamachine authored Aug 22, 2022
commit 6e87b01f850d9e4a26bc1d1e93b36438c124d3f0
3 changes: 3 additions & 0 deletions test/functional/apps/dashboard/group1/url_field_formatter.ts
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const fieldName = 'clientip';
const deployment = getService('deployment');
const retry = getService('retry');
const security = getService('security');

const clickFieldAndCheckUrl = async (fieldLink: WebElementWrapper) => {
const fieldValue = await fieldLink.getVisibleText();
@@ -38,6 +39,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

describe('Changing field formatter to Url', () => {
before(async function () {
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']);
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load(
'test/functional/fixtures/kbn_archiver/dashboard/current/kibana'
@@ -57,6 +59,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

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

it('applied on dashboard', async () => {
3 changes: 3 additions & 0 deletions test/functional/apps/dashboard/group6/dashboard_query_bar.ts
Original file line number Diff line number Diff line change
@@ -16,10 +16,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const pieChart = getService('pieChart');
const queryBar = getService('queryBar');
const retry = getService('retry');
const security = getService('security');
const PageObjects = getPageObjects(['common', 'dashboard', 'discover']);

describe('dashboard query bar', () => {
before(async () => {
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']);
await kibanaServer.savedObjects.cleanStandardList();
await kibanaServer.importExport.load(
'test/functional/fixtures/kbn_archiver/dashboard/current/kibana'
@@ -34,6 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

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

it('causes panels to reload when refresh is clicked', async () => {
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const retry = getService('retry');
const security = getService('security');
const { dashboardControls, common, dashboard, timePicker } = getPageObjects([
'dashboardControls',
'timePicker',
@@ -32,6 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
};

before(async () => {
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']);
await common.navigateToApp('dashboard');
await dashboard.gotoDashboardLandingPage();
await dashboard.clickNewDashboard();
@@ -62,6 +64,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
controlIds = await dashboardControls.getAllControlIds();
});

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

it('Shows all available options in first Options List control', async () => {
await dashboardControls.optionsListOpenPopover(controlIds[0]);
await retry.try(async () => {
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const retry = getService('retry');
const queryBar = getService('queryBar');
const pieChart = getService('pieChart');
const security = getService('security');
const elasticChart = getService('elasticChart');
const filterBar = getService('filterBar');
const testSubjects = getService('testSubjects');
@@ -32,6 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

describe('Dashboard options list integration', () => {
before(async () => {
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']);
await common.navigateToApp('dashboard');
await dashboard.gotoDashboardLandingPage();
await dashboard.clickNewDashboard();
@@ -422,6 +424,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await filterBar.removeAllFilters();
await queryBar.clickQuerySubmitButton();
await dashboardControls.clearAllControls();
await security.testUser.restoreDefaults();
});
});
});
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const retry = getService('retry');
const security = getService('security');

const { dashboardControls, timePicker, common, dashboard } = getPageObjects([
'dashboardControls',
@@ -59,12 +60,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

before(async () => {
await common.navigateToApp('dashboard');
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader', 'animals']);
await dashboard.gotoDashboardLandingPage();
await dashboard.clickNewDashboard();
await timePicker.setDefaultDataRange();
await dashboard.saveDashboard(DASHBOARD_NAME, { exitFromEditMode: false });
});

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

describe('Replace options list', async () => {
beforeEach(async () => {
await dashboardControls.clearAllControls();
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.settings.clickKibanaIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.settings.clickRelationshipsTab();
await PageObjects.header.waitUntilLoadingHasFinished();
expect(parseInt(await PageObjects.settings.getRelationshipsTabCount(), 10)).to.be(1);
});
});
Original file line number Diff line number Diff line change
@@ -29,11 +29,14 @@ export default function ({ getService }: FtrProviderContext) {
await reportingAPI.teardownEcommerce();
});

it('configuration settings of the tests_server', async () => {
const usage = await usageAPI.getUsageStats();
expect(usage.kibana_config_usage.xpack_reporting_capture_max_attempts).to.be(1);
expect(usage.kibana_config_usage.xpack_reporting_csv_max_size_bytes).to.be(6000);
expect(usage.kibana_config_usage.xpack_reporting_roles_enabled).to.be(false);
describe('server', function () {
this.tags('skipCloud');
it('configuration settings of the tests_server', async () => {
const usage = await usageAPI.getUsageStats();
expect(usage.kibana_config_usage.xpack_reporting_capture_max_attempts).to.be(1);
expect(usage.kibana_config_usage.xpack_reporting_csv_max_size_bytes).to.be(6000);
expect(usage.kibana_config_usage.xpack_reporting_roles_enabled).to.be(false);
});
});

describe('API counters: management', () => {
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ export default function ({ getService }: FtrProviderContext) {
{ jobParams: createPdfV2Params(1541.5999755859375) }
);

await retry.tryForTime(48000, async () => {
await retry.tryForTime(60000, async () => {
const response: supertest.Response = await supertestSvc
.get(downloadReportPath)
.responseType('blob')