mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[DOCS] Automate maintenance window screenshot (#157816)
This commit is contained in:
parent
8761e5057c
commit
877e2ac51c
5 changed files with 54 additions and 1 deletions
|
@ -250,7 +250,7 @@ export const CreateMaintenanceWindowForm = React.memo<CreateMaintenanceWindowFor
|
|||
responsive={false}
|
||||
>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButtonEmpty onClick={onCancel} size="s">
|
||||
<EuiButtonEmpty onClick={onCancel} size="s" data-test-subj="cancelMaintenanceWindow">
|
||||
{i18n.CANCEL}
|
||||
</EuiButtonEmpty>
|
||||
</EuiFlexItem>
|
||||
|
|
|
@ -178,6 +178,9 @@ export default async function ({ readConfigFile }) {
|
|||
triggersActions: {
|
||||
pathname: '/app/management/insightsAndAlerting/triggersActions',
|
||||
},
|
||||
maintenanceWindows: {
|
||||
pathname: '/app/management/insightsAndAlerting/maintenanceWindows',
|
||||
},
|
||||
},
|
||||
|
||||
// choose where screenshots should be saved
|
||||
|
|
|
@ -42,6 +42,7 @@ export default function ({ getPageObject, getService, loadTestFile }: FtrProvide
|
|||
loadTestFile(require.resolve('./stack_alerting'));
|
||||
loadTestFile(require.resolve('./stack_cases'));
|
||||
loadTestFile(require.resolve('./stack_connectors'));
|
||||
loadTestFile(require.resolve('./maintenance_windows'));
|
||||
loadTestFile(require.resolve('./observability_cases'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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 { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
||||
const commonScreenshots = getService('commonScreenshots');
|
||||
const find = getService('find');
|
||||
const pageObjects = getPageObjects(['common', 'header']);
|
||||
const screenshotDirectories = ['response_ops_docs', 'maintenance_windows'];
|
||||
const testSubjects = getService('testSubjects');
|
||||
|
||||
describe('create maintenance window', function () {
|
||||
it('create window screenshot', async () => {
|
||||
await pageObjects.common.navigateToApp('maintenanceWindows');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
const createButton = await find.byCssSelector(
|
||||
'[data-test-subj="mw-empty-prompt"] .euiButton'
|
||||
);
|
||||
await createButton.click();
|
||||
await commonScreenshots.takeScreenshot(
|
||||
'create-maintenance-window',
|
||||
screenshotDirectories,
|
||||
1400,
|
||||
1024
|
||||
);
|
||||
const cancelButton = await testSubjects.find('cancelMaintenanceWindow');
|
||||
await cancelButton.click();
|
||||
});
|
||||
});
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* 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 { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
export default function ({ loadTestFile }: FtrProviderContext) {
|
||||
describe('maintenance windows', function () {
|
||||
loadTestFile(require.resolve('./create_window'));
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue