From abc6014d4d45d834308d9ef908cf144457995e35 Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Fri, 7 Jul 2023 18:54:00 +0300 Subject: [PATCH] Fix tests --- x-pack/plugins/actions/server/actions_client.test.ts | 2 +- x-pack/plugins/actions/server/actions_client.ts | 2 +- .../security_and_spaces/group2/tests/actions/create.ts | 3 ++- .../security_and_spaces/group2/tests/actions/update.ts | 5 ++--- .../spaces_only/tests/actions/create.ts | 2 +- .../spaces_only/tests/actions/update.ts | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/actions/server/actions_client.test.ts b/x-pack/plugins/actions/server/actions_client.test.ts index d553a6080dfd3..a18a8adada424 100644 --- a/x-pack/plugins/actions/server/actions_client.test.ts +++ b/x-pack/plugins/actions/server/actions_client.test.ts @@ -2675,7 +2675,7 @@ describe('update()', () => { }, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Preconfigured action testPreconfigured is not allowed to update."` + `"Preconfigured action testPreconfigured can not be updated."` ); }); diff --git a/x-pack/plugins/actions/server/actions_client.ts b/x-pack/plugins/actions/server/actions_client.ts index 9a4349601216a..db25e302a4ac0 100644 --- a/x-pack/plugins/actions/server/actions_client.ts +++ b/x-pack/plugins/actions/server/actions_client.ts @@ -306,7 +306,7 @@ export class ActionsClient { if (foundInMemoryConnector?.isPreconfigured) { throw new PreconfiguredActionDisabledModificationError( i18n.translate('xpack.actions.serverSideErrors.predefinedActionUpdateDisabled', { - defaultMessage: 'Preconfigured action {id} is not allowed to update.', + defaultMessage: 'Preconfigured action {id} can not be updated.', values: { id, }, diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/create.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/create.ts index 6be435b569a97..017fd3e45999b 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/create.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/create.ts @@ -350,7 +350,8 @@ export default function createActionTests({ getService }: FtrProviderContext) { expect(response.body).to.eql({ statusCode: 400, error: 'Bad Request', - message: 'This custom-system-abc-connector already exist in preconfigured action.', + message: + 'This custom-system-abc-connector already exists in a preconfigured action.', }); break; default: diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/update.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/update.ts index c27208860fcfa..7c3c00534f11d 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/update.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/update.ts @@ -345,7 +345,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { expect(response.body).to.eql({ statusCode: 400, error: 'Bad Request', - message: `Preconfigured action custom-system-abc-connector is not allowed to update.`, + message: `Preconfigured action custom-system-abc-connector can not be updated.`, }); break; default: @@ -423,8 +423,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { expect(response.body).to.eql({ statusCode: 400, error: 'Bad Request', - message: - 'System action system-connector-test.system-action is not allowed to update.', + message: 'System action system-connector-test.system-action can not be updated.', }); break; default: diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/create.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/create.ts index 614c130cc7120..6941aa6f18025 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/create.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/create.ts @@ -93,7 +93,7 @@ export default function createActionTests({ getService }: FtrProviderContext) { .expect(400, { statusCode: 400, error: 'Bad Request', - message: 'This custom-system-abc-connector already exist in preconfigured action.', + message: 'This custom-system-abc-connector already exists in a preconfigured action.', }); }); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/update.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/update.ts index 5dd515395994c..d64ccc15c4999 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/update.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/update.ts @@ -122,7 +122,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { .expect(400, { statusCode: 400, error: 'Bad Request', - message: `Preconfigured action custom-system-abc-connector is not allowed to update.`, + message: `Preconfigured action custom-system-abc-connector can not be updated.`, }); }); @@ -146,7 +146,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { .expect(400, { statusCode: 400, error: 'Bad Request', - message: 'System action system-connector-test.system-action is not allowed to update.', + message: 'System action system-connector-test.system-action can not be updated.', }); }); @@ -310,7 +310,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { .expect(400, { statusCode: 400, error: 'Bad Request', - message: `Preconfigured action custom-system-abc-connector is not allowed to update.`, + message: `Preconfigured action custom-system-abc-connector can not be updated.`, }); }); @@ -334,7 +334,7 @@ export default function updateActionTests({ getService }: FtrProviderContext) { .expect(400, { statusCode: 400, error: 'Bad Request', - message: 'System action system-connector-test.system-action is not allowed to update.', + message: 'System action system-connector-test.system-action can not be updated.', }); });