mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* Adding back button to add connector flyout * Adding tests * Adding tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
d25c84f6f4
commit
4af7553ef6
3 changed files with 31 additions and 8 deletions
|
@ -75,6 +75,8 @@ describe('connector_add_flyout', () => {
|
|||
);
|
||||
expect(wrapper.find('ActionTypeMenu')).toHaveLength(1);
|
||||
expect(wrapper.find(`[data-test-subj="${actionType.id}-card"]`).exists()).toBeTruthy();
|
||||
expect(wrapper.find('[data-test-subj="cancelButton"]').exists()).toBeTruthy();
|
||||
expect(wrapper.find('[data-test-subj="backButton"]').exists()).toBeFalsy();
|
||||
});
|
||||
|
||||
it('renders banner with subscription links when gold features are disabled due to licensing ', () => {
|
||||
|
|
|
@ -251,14 +251,31 @@ export const ConnectorAddFlyout = ({
|
|||
<EuiFlyoutFooter>
|
||||
<EuiFlexGroup justifyContent="spaceBetween">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButtonEmpty onClick={closeFlyout}>
|
||||
{i18n.translate(
|
||||
'xpack.triggersActionsUI.sections.actionConnectorAdd.cancelButtonLabel',
|
||||
{
|
||||
defaultMessage: 'Cancel',
|
||||
}
|
||||
)}
|
||||
</EuiButtonEmpty>
|
||||
{!actionType ? (
|
||||
<EuiButtonEmpty data-test-subj="cancelButton" onClick={closeFlyout}>
|
||||
{i18n.translate(
|
||||
'xpack.triggersActionsUI.sections.actionConnectorAdd.cancelButtonLabel',
|
||||
{
|
||||
defaultMessage: 'Cancel',
|
||||
}
|
||||
)}
|
||||
</EuiButtonEmpty>
|
||||
) : (
|
||||
<EuiButtonEmpty
|
||||
data-test-subj="backButton"
|
||||
onClick={() => {
|
||||
setActionType(undefined);
|
||||
setConnector(initialConnector);
|
||||
}}
|
||||
>
|
||||
{i18n.translate(
|
||||
'xpack.triggersActionsUI.sections.actionConnectorAdd.backButtonLabel',
|
||||
{
|
||||
defaultMessage: 'Back',
|
||||
}
|
||||
)}
|
||||
</EuiButtonEmpty>
|
||||
)}
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiFlexGroup justifyContent="spaceBetween">
|
||||
|
|
|
@ -40,6 +40,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
|
||||
await pageObjects.triggersActionsUI.clickCreateConnectorButton();
|
||||
|
||||
await testSubjects.click('.index-card');
|
||||
|
||||
await find.clickByCssSelector('[data-test-subj="backButton"]');
|
||||
|
||||
await testSubjects.click('.slack-card');
|
||||
|
||||
await testSubjects.setValue('nameInput', connectorName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue