forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Automate maintenance window screenshot (elastic#157816)
- Loading branch information
Showing
5 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
x-pack/test/screenshot_creation/apps/response_ops_docs/maintenance_windows/create_window.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
}); | ||
}); | ||
} |
14 changes: 14 additions & 0 deletions
14
x-pack/test/screenshot_creation/apps/response_ops_docs/maintenance_windows/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')); | ||
}); | ||
} |