-
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] Automate Tines connector screenshots (#166313)
(cherry picked from commit 3df2c4f)
- Loading branch information
Showing
6 changed files
with
56 additions
and
11 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
Binary file not shown.
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.
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/tines_connector.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 { | ||
ExternalServiceSimulator, | ||
getExternalServiceSimulatorPath, | ||
} from '@kbn/actions-simulators-plugin/server/plugin'; | ||
import { FtrProviderContext } from '../../../ftr_provider_context'; | ||
|
||
export default function ({ getService, getPageObjects }: FtrProviderContext) { | ||
const commonScreenshots = getService('commonScreenshots'); | ||
const screenshotDirectories = ['response_ops_docs', 'stack_connectors']; | ||
const pageObjects = getPageObjects(['common', 'header']); | ||
const actions = getService('actions'); | ||
const kibanaServer = getService('kibanaServer'); | ||
const testSubjects = getService('testSubjects'); | ||
let simulatorUrl: string; | ||
let editSimulatorUrl: string; | ||
|
||
describe('tines connector', function () { | ||
before(async () => { | ||
simulatorUrl = kibanaServer.resolveUrl( | ||
getExternalServiceSimulatorPath(ExternalServiceSimulator.TINES) | ||
); | ||
editSimulatorUrl = simulatorUrl.replace('/elastic:changeme@', '/'); | ||
}); | ||
|
||
beforeEach(async () => { | ||
await pageObjects.common.navigateToApp('connectors'); | ||
await pageObjects.header.waitUntilLoadingHasFinished(); | ||
}); | ||
|
||
it('tines connector screenshots', async () => { | ||
await pageObjects.common.navigateToApp('connectors'); | ||
await pageObjects.header.waitUntilLoadingHasFinished(); | ||
await actions.common.openNewConnectorForm('tines'); | ||
await testSubjects.setValue('nameInput', 'Tines test connector'); | ||
await testSubjects.setValue('config.url-input', editSimulatorUrl); | ||
await testSubjects.setValue('secrets.email-input', '[email protected]'); | ||
await testSubjects.setValue('secrets.token-input', 'tester'); | ||
await commonScreenshots.takeScreenshot('tines-connector', screenshotDirectories); | ||
await testSubjects.click('create-connector-flyout-save-test-btn'); | ||
await pageObjects.common.clearAllToasts(); | ||
await commonScreenshots.takeScreenshot('tines-params-test', screenshotDirectories); | ||
await testSubjects.click('euiFlyoutCloseButton'); | ||
}); | ||
}); | ||
} |