Alerting: Rename contact point type to receiver in the user interface (#59589)

This commit renames contact point type to integration in the user interface
as "New contact point type" suggests that you are creating a new type,
when instead you are just creating a new integration of a pre-determined type,
such as email or Slack. You can also have two or more integrations of the same
type, something which is not apparent from the current text.

This change will also make it easier to explain the difference between
a contact point integration, and how to configure an integration of a certain type,
such as email.
This commit is contained in:
George Robinson
2022-12-14 20:50:36 +00:00
committed by GitHub
parent 9d3c1f0cbd
commit 342b0f3668
8 changed files with 11 additions and 11 deletions

View File

@@ -96,7 +96,7 @@ const dataSources = {
const ui = {
newContactPointButton: byRole('link', { name: /new contact point/i }),
saveContactButton: byRole('button', { name: /save contact point/i }),
newContactPointTypeButton: byRole('button', { name: /new contact point type/i }),
newContactPointIntegrationButton: byRole('button', { name: /new contact point integration/i }),
testContactPointButton: byRole('button', { name: /Test/ }),
testContactPointModal: byRole('heading', { name: /test contact point/i }),
customContactPointOption: byRole('radio', { name: /custom/i }),
@@ -403,7 +403,7 @@ describe('Receivers', () => {
await byText(/Fields \(1\)/i).get(slackContainer);
// add another channel
await userEvent.click(ui.newContactPointTypeButton.get());
await userEvent.click(ui.newContactPointIntegrationButton.get());
await clickSelectOption(await byTestId('items.2.type').find(), 'Webhook');
await userEvent.type(await ui.inputs.webhook.URL.find(), 'http://webhookurl');

View File

@@ -96,7 +96,7 @@ export function ChannelSubForm<R extends ChannelValues>({
<div className={styles.wrapper} data-testid="item-container">
<div className={styles.topRow}>
<div>
<Field label="Contact point type" htmlFor={contactPointTypeInputId} data-testid={`${pathPrefix}type`}>
<Field label="Integration" htmlFor={contactPointTypeInputId} data-testid={`${pathPrefix}type`}>
<InputControl
name={name('type')}
defaultValue={defaultValues.type}

View File

@@ -159,7 +159,7 @@ export function ReceiverForm<R extends ChannelValues>({
variant="secondary"
onClick={() => append({ ...defaultItem, __id: String(Math.random()) } as R)}
>
New contact point type
New contact point integration
</Button>
)}
<div className={styles.buttons}>