Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 ', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down