-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Refresh and automate screenshots for connector logs (#153510)
- Loading branch information
Showing
12 changed files
with
116 additions
and
14 deletions.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-229 KB
(37%)
docs/management/connectors/images/connector-filter-by-type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-142 KB
(40%)
docs/management/connectors/images/connectors-with-missing-secrets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+22.8 KB
(120%)
docs/management/connectors/images/preconfigured-connectors-managing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
52 changes: 52 additions & 0 deletions
52
x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/connectors.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,52 @@ | ||
/* | ||
* 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 browser = getService('browser'); | ||
const find = getService('find'); | ||
const testSubjects = getService('testSubjects'); | ||
const screenshotDirectories = ['response_ops_docs', 'stack_connectors']; | ||
const pageObjects = getPageObjects(['common', 'header']); | ||
|
||
describe('connectors', function () { | ||
it('connectors list screenshot', async () => { | ||
await pageObjects.common.navigateToApp('connectors'); | ||
await pageObjects.header.waitUntilLoadingHasFinished(); | ||
await commonScreenshots.takeScreenshot( | ||
'connector-listing', | ||
screenshotDirectories, | ||
1400, | ||
1024 | ||
); | ||
|
||
const searchBox = await find.byCssSelector('[data-test-subj="actionsList"] .euiFieldSearch'); | ||
await searchBox.click(); | ||
await searchBox.clearValue(); | ||
await searchBox.type('my actionTypeId:(.index)'); | ||
await searchBox.pressKeys(browser.keys.ENTER); | ||
const typeFilter = await find.byCssSelector( | ||
'[data-test-subj="actionsList"] .euiFilterButton' | ||
); | ||
await typeFilter.click(); | ||
await commonScreenshots.takeScreenshot( | ||
'connector-filter-by-type', | ||
screenshotDirectories, | ||
1400, | ||
1024 | ||
); | ||
|
||
const clearSearchButton = await testSubjects.find('clearSearchButton'); | ||
await clearSearchButton.click(); | ||
const checkAllButton = await testSubjects.find('checkboxSelectAll'); | ||
await checkAllButton.click(); | ||
await commonScreenshots.takeScreenshot('connector-delete', screenshotDirectories, 1400, 1024); | ||
}); | ||
}); | ||
} |
59 changes: 59 additions & 0 deletions
59
x-pack/test/screenshot_creation/apps/response_ops_docs/stack_connectors/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,59 @@ | ||
/* | ||
* 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, getService }: FtrProviderContext) { | ||
const actions = getService('actions'); | ||
const browser = getService('browser'); | ||
const es = getService('es'); | ||
const rules = getService('rules'); | ||
const testIndex = `test-index`; | ||
|
||
describe('stack connectors', function () { | ||
before(async () => { | ||
await browser.setWindowSize(1920, 1080); | ||
await actions.api.createConnector({ | ||
name: 'server-log-connector', | ||
config: {}, | ||
secrets: {}, | ||
connectorTypeId: '.server-log', | ||
}); | ||
|
||
await es.indices.create({ | ||
index: testIndex, | ||
body: { | ||
mappings: { | ||
properties: { | ||
date_updated: { | ||
type: 'date', | ||
format: 'epoch_millis', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
await actions.api.createConnector({ | ||
name: 'my-index-connector', | ||
config: { | ||
index: testIndex, | ||
}, | ||
secrets: {}, | ||
connectorTypeId: '.index', | ||
}); | ||
}); | ||
|
||
after(async () => { | ||
await rules.api.deleteAllRules(); | ||
await actions.api.deleteAllConnectors(); | ||
await es.indices.delete({ index: testIndex }); | ||
}); | ||
|
||
loadTestFile(require.resolve('./connectors')); | ||
loadTestFile(require.resolve('./connector_types')); | ||
}); | ||
} |