kibana/x-pack/test/licensing_plugin/public/updates.ts

98 lines
3.5 KiB
TypeScript
Raw Normal View History

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import expect from '@kbn/expect';
import { FtrProviderContext } from '../services';
import { LicensingPluginSetup } from '../../../plugins/licensing/public';
import { createScenario } from '../scenario';
import '../../../../test/plugin_functional/plugins/core_provider_plugin/types';
// eslint-disable-next-line import/no-default-export
2020-05-22 09:08:58 +02:00
export default function (ftrContext: FtrProviderContext) {
const { getService } = ftrContext;
const testSubjects = getService('testSubjects');
const browser = getService('browser');
const scenario = createScenario(ftrContext);
2021-04-21 14:38:14 +02:00
// FLAKY: https://github.com/elastic/kibana/issues/53575
describe.skip('changes in license types', () => {
after(async () => {
await scenario.teardown();
});
it('provides changes in license types', async () => {
await scenario.setup();
await scenario.waitForPluginToDetectLicenseUpdate();
expect(
await browser.executeAsync(async (cb) => {
const { setup, testUtils } = window._coreProvider;
// this call enforces signature check to detect license update
// and causes license re-fetch
await setup.core.http.get('/');
[Reporting] Kibana Application Privileges for Reporting (#94966) * Implement Reporting features as subfeatures of applications * add setting to the docker list * update doc images * finish docs * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * typo fix * "PDF / PNG Reports" => "Reporting" * Update x-pack/plugins/reporting/server/config/index.ts Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * Update x-pack/test/functional/apps/security/secure_roles_perm.js Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * update ids of report privileges * combine dashboard privileges into 1 group * update jest snapshot * fix tests * fix tests * updates from feedback * add note * update screenshot * fix grammer * fix bad link breaks in doc * update doc heading * Apply suggestions documentation feedback Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * simplify * use const assertions * Apply text change suggestion from code review Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * more test for oss_features and reporting subFeatures * reduce loc diff * fix snapshot * fix flakiness in licensing plugin public functional tests Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> Co-authored-by: Larry Gregory <lgregorydev@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-04-21 05:44:24 +02:00
await testUtils.delay(1000);
const licensing: LicensingPluginSetup = setup.plugins.licensing;
2020-05-22 09:08:58 +02:00
licensing.license$.subscribe((license) => cb(license.type));
})
).to.be('basic');
// license hasn't changed
await scenario.waitForPluginToDetectLicenseUpdate();
expect(
await browser.executeAsync(async (cb) => {
const { setup, testUtils } = window._coreProvider;
// this call enforces signature check to detect license update
// and causes license re-fetch
await setup.core.http.get('/');
[Reporting] Kibana Application Privileges for Reporting (#94966) * Implement Reporting features as subfeatures of applications * add setting to the docker list * update doc images * finish docs * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * typo fix * "PDF / PNG Reports" => "Reporting" * Update x-pack/plugins/reporting/server/config/index.ts Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * Update x-pack/test/functional/apps/security/secure_roles_perm.js Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * update ids of report privileges * combine dashboard privileges into 1 group * update jest snapshot * fix tests * fix tests * updates from feedback * add note * update screenshot * fix grammer * fix bad link breaks in doc * update doc heading * Apply suggestions documentation feedback Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * simplify * use const assertions * Apply text change suggestion from code review Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * more test for oss_features and reporting subFeatures * reduce loc diff * fix snapshot * fix flakiness in licensing plugin public functional tests Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> Co-authored-by: Larry Gregory <lgregorydev@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-04-21 05:44:24 +02:00
await testUtils.delay(1000);
const licensing: LicensingPluginSetup = setup.plugins.licensing;
2020-05-22 09:08:58 +02:00
licensing.license$.subscribe((license) => cb(license.type));
})
).to.be('basic');
await scenario.startTrial();
await scenario.waitForPluginToDetectLicenseUpdate();
expect(
await browser.executeAsync(async (cb) => {
const { setup, testUtils } = window._coreProvider;
// this call enforces signature check to detect license update
// and causes license re-fetch
await setup.core.http.get('/');
[Reporting] Kibana Application Privileges for Reporting (#94966) * Implement Reporting features as subfeatures of applications * add setting to the docker list * update doc images * finish docs * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * typo fix * "PDF / PNG Reports" => "Reporting" * Update x-pack/plugins/reporting/server/config/index.ts Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * Update x-pack/test/functional/apps/security/secure_roles_perm.js Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * update ids of report privileges * combine dashboard privileges into 1 group * update jest snapshot * fix tests * fix tests * updates from feedback * add note * update screenshot * fix grammer * fix bad link breaks in doc * update doc heading * Apply suggestions documentation feedback Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * simplify * use const assertions * Apply text change suggestion from code review Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * more test for oss_features and reporting subFeatures * reduce loc diff * fix snapshot * fix flakiness in licensing plugin public functional tests Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> Co-authored-by: Larry Gregory <lgregorydev@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-04-21 05:44:24 +02:00
await testUtils.delay(1000);
const licensing: LicensingPluginSetup = setup.plugins.licensing;
2020-05-22 09:08:58 +02:00
licensing.license$.subscribe((license) => cb(license.type));
})
).to.be('trial');
await scenario.startBasic();
await scenario.waitForPluginToDetectLicenseUpdate();
expect(
await browser.executeAsync(async (cb) => {
const { setup, testUtils } = window._coreProvider;
// this call enforces signature check to detect license update
// and causes license re-fetch
await setup.core.http.get('/');
[Reporting] Kibana Application Privileges for Reporting (#94966) * Implement Reporting features as subfeatures of applications * add setting to the docker list * update doc images * finish docs * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * Apply suggestions from code review Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> * typo fix * "PDF / PNG Reports" => "Reporting" * Update x-pack/plugins/reporting/server/config/index.ts Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * Update x-pack/test/functional/apps/security/secure_roles_perm.js Co-authored-by: Larry Gregory <lgregorydev@gmail.com> * update ids of report privileges * combine dashboard privileges into 1 group * update jest snapshot * fix tests * fix tests * updates from feedback * add note * update screenshot * fix grammer * fix bad link breaks in doc * update doc heading * Apply suggestions documentation feedback Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * simplify * use const assertions * Apply text change suggestion from code review Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> * more test for oss_features and reporting subFeatures * reduce loc diff * fix snapshot * fix flakiness in licensing plugin public functional tests Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co> Co-authored-by: Larry Gregory <lgregorydev@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-04-21 05:44:24 +02:00
await testUtils.delay(1000);
const licensing: LicensingPluginSetup = setup.plugins.licensing;
2020-05-22 09:08:58 +02:00
licensing.license$.subscribe((license) => cb(license.type));
})
).to.be('basic');
// banner shown only when license expired not just deleted
await testSubjects.missingOrFail('licenseExpiredBanner');
});
});
}