Skip to content

Commit

Permalink
Add more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Oct 15, 2021
1 parent 4e7c3da commit 0611158
Show file tree
Hide file tree
Showing 8 changed files with 374 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ApplicationRequiredCalloutComponent: React.FC<Props> = ({ message }) => {
<EuiCallOut
size="m"
iconType="alert"
data-test-subj="snDeprecatedCallout"
data-test-subj="snApplicationCallout"
color="danger"
title={i18n.translate(
'xpack.triggersActionsUI.components.builtinActionTypes.serviceNow.applicationRequiredCallout',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('DeprecatedCallout', () => {
wrapper: ({ children }) => <I18nProvider>{children}</I18nProvider>,
});

expect(screen.getByText('Deprecated connector type')).toBeInTheDocument();
expect(screen.getByText('This connector type is deprecated')).toBeInTheDocument();
});

test('it calls onMigrate when pressing the button', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ const DeprecatedCalloutComponent: React.FC<Props> = ({ onMigrate }) => {
id="xpack.triggersActionsUI.components.builtinActionTypes.servicenow.appInstallationInfo"
values={{
migrate: (
<EuiButtonEmpty onClick={onMigrate} flush="left">
<EuiButtonEmpty
onClick={onMigrate}
flush="left"
data-test-subj="update-connector-btn"
>
{i18n.translate(
'xpack.triggersActionsUI.components.builtinActionTypes.serviceNow.deprecatedCalloutMigrate',
{
Expand Down
Loading

0 comments on commit 0611158

Please sign in to comment.