* Reenabled _mb suffixed stack monitoring func tests These tests were disabled temporarily in #98238 because of intermittent failures in master. * use test_user instead of basic_monitoring_user * remove security service * remove logout and cleanup Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: neptunian <sandra.gonzales@elastic.co> Co-authored-by: Jason Rhodes <jason.rhodes@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
4af061060a
commit
0a3e83aa10
|
@ -8,12 +8,15 @@
|
|||
export const getLifecycleMethods = (getService, getPageObjects) => {
|
||||
const esArchiver = getService('esArchiver');
|
||||
const security = getService('security');
|
||||
const PageObjects = getPageObjects(['monitoring', 'timePicker', 'security']);
|
||||
const PageObjects = getPageObjects(['monitoring', 'timePicker', 'security', 'common']);
|
||||
let _archive;
|
||||
|
||||
return {
|
||||
async setup(archive, { from, to, useSuperUser = false }) {
|
||||
_archive = archive;
|
||||
if (!useSuperUser) {
|
||||
await security.testUser.setRoles(['monitoring_user', 'kibana_admin']);
|
||||
}
|
||||
|
||||
const kibanaServer = getService('kibanaServer');
|
||||
const browser = getService('browser');
|
||||
|
@ -24,7 +27,7 @@ export const getLifecycleMethods = (getService, getPageObjects) => {
|
|||
await esArchiver.load(archive);
|
||||
await kibanaServer.uiSettings.replace({});
|
||||
|
||||
await PageObjects.monitoring.navigateTo(useSuperUser);
|
||||
await PageObjects.common.navigateToApp('monitoring');
|
||||
|
||||
// pause autorefresh in the time filter because we don't wait any ticks,
|
||||
// and we don't want ES to log a warning when data gets wiped out
|
||||
|
@ -34,8 +37,7 @@ export const getLifecycleMethods = (getService, getPageObjects) => {
|
|||
},
|
||||
|
||||
async tearDown() {
|
||||
await PageObjects.security.forceLogout();
|
||||
await security.user.delete('basic_monitoring_user');
|
||||
await security.testUser.restoreDefaults();
|
||||
return esArchiver.unload(_archive);
|
||||
},
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
before(async () => {
|
||||
const browser = getService('browser');
|
||||
await browser.setWindowSize(1600, 1000);
|
||||
await PageObjects.monitoring.navigateTo(true);
|
||||
await PageObjects.common.navigateToApp('monitoring');
|
||||
await noData.isOnNoDataPage();
|
||||
});
|
||||
|
||||
|
|
|
@ -8,41 +8,38 @@
|
|||
export default function ({ loadTestFile }) {
|
||||
describe('Monitoring app', function () {
|
||||
this.tags('ciGroup1');
|
||||
|
||||
loadTestFile(require.resolve('./feature_controls'));
|
||||
|
||||
loadTestFile(require.resolve('./cluster/list'));
|
||||
loadTestFile(require.resolve('./cluster/overview'));
|
||||
// loadTestFile(require.resolve('./cluster/license'));
|
||||
|
||||
// NOTE: All _mb tests skipped because of various failures: https://github.com/elastic/kibana/issues/98239
|
||||
|
||||
loadTestFile(require.resolve('./elasticsearch/overview'));
|
||||
// loadTestFile(require.resolve('./elasticsearch/overview_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/overview_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/nodes'));
|
||||
// loadTestFile(require.resolve('./elasticsearch/nodes_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/nodes_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/node_detail'));
|
||||
// loadTestFile(require.resolve('./elasticsearch/node_detail_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/node_detail_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/indices'));
|
||||
// loadTestFile(require.resolve('./elasticsearch/indices_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/indices_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/index_detail'));
|
||||
// loadTestFile(require.resolve('./elasticsearch/index_detail_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/index_detail_mb'));
|
||||
loadTestFile(require.resolve('./elasticsearch/shards'));
|
||||
// loadTestFile(require.resolve('./elasticsearch/shard_activity'));
|
||||
|
||||
loadTestFile(require.resolve('./kibana/overview'));
|
||||
// loadTestFile(require.resolve('./kibana/overview_mb'));
|
||||
loadTestFile(require.resolve('./kibana/overview_mb'));
|
||||
loadTestFile(require.resolve('./kibana/instances'));
|
||||
// loadTestFile(require.resolve('./kibana/instances_mb'));
|
||||
loadTestFile(require.resolve('./kibana/instances_mb'));
|
||||
loadTestFile(require.resolve('./kibana/instance'));
|
||||
// loadTestFile(require.resolve('./kibana/instance_mb'));
|
||||
loadTestFile(require.resolve('./kibana/instance_mb'));
|
||||
|
||||
// loadTestFile(require.resolve('./logstash/overview'));
|
||||
// loadTestFile(require.resolve('./logstash/nodes'));
|
||||
// loadTestFile(require.resolve('./logstash/node'));
|
||||
|
||||
loadTestFile(require.resolve('./logstash/pipelines'));
|
||||
// loadTestFile(require.resolve('./logstash/pipelines_mb'));
|
||||
loadTestFile(require.resolve('./logstash/pipelines_mb'));
|
||||
|
||||
loadTestFile(require.resolve('./beats/cluster'));
|
||||
loadTestFile(require.resolve('./beats/overview'));
|
||||
|
@ -53,6 +50,6 @@ export default function ({ loadTestFile }) {
|
|||
loadTestFile(require.resolve('./enable_monitoring'));
|
||||
|
||||
loadTestFile(require.resolve('./setup/metricbeat_migration'));
|
||||
// loadTestFile(require.resolve('./setup/metricbeat_migration_mb'));
|
||||
loadTestFile(require.resolve('./setup/metricbeat_migration_mb'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -10,24 +10,7 @@ import { FtrProviderContext } from '../ftr_provider_context';
|
|||
export function MonitoringPageProvider({ getPageObjects, getService }: FtrProviderContext) {
|
||||
const PageObjects = getPageObjects(['common', 'header', 'security', 'login']);
|
||||
const testSubjects = getService('testSubjects');
|
||||
const security = getService('security');
|
||||
|
||||
return new (class MonitoringPage {
|
||||
async navigateTo(useSuperUser = false) {
|
||||
// always create this because our tear down tries to delete it
|
||||
await security.user.create('basic_monitoring_user', {
|
||||
password: 'monitoring_user_password',
|
||||
roles: ['monitoring_user', 'kibana_admin'],
|
||||
full_name: 'basic monitoring',
|
||||
});
|
||||
|
||||
if (!useSuperUser) {
|
||||
await PageObjects.security.forceLogout();
|
||||
await PageObjects.login.login('basic_monitoring_user', 'monitoring_user_password');
|
||||
}
|
||||
await PageObjects.common.navigateToApp('monitoring');
|
||||
}
|
||||
|
||||
async getAccessDeniedMessage() {
|
||||
return testSubjects.getVisibleText('accessDeniedTitle');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue