Merge pull request #6623 from nixocio/ui_issue_6133

Update "Enable Webhooks" option in WFJT

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-04-07 01:05:03 +00:00 committed by GitHub
commit 58160b9eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -58,7 +58,7 @@ function WorkflowJobTemplateDetail({ template, i18n, webhook_key }) {
)}
{template.webhook_service && (
<TextListItem component={TextListItemVariants.li}>
{i18n._(t`- Enable Webhook`)}
{i18n._(t`- Enable Webhooks`)}
</TextListItem>
)}
</TextList>

View File

@ -338,14 +338,14 @@ function WorkflowJobTemplateForm({
<Field id="wfjt-webhooks" name="hasWebhooks">
{({ form }) => (
<Checkbox
aria-label={i18n._(t`Enable Webhook`)}
aria-label={i18n._(t`Enable Webhooks`)}
label={
<span>
{i18n._(t`Enable Webhook`)}
{i18n._(t`Enable Webhooks`)}
&nbsp;
<FieldTooltip
content={i18n._(
t`Enable webhook for this workflow job template.`
t`Enable webhooks for this workflow job template.`
)}
/>
</span>

View File

@ -171,7 +171,7 @@ describe('<WorkflowJobTemplateForm/>', () => {
test('webhooks and enable concurrent jobs functions properly', async () => {
act(() => {
wrapper.find('Checkbox[aria-label="Enable Webhook"]').invoke('onChange')(
wrapper.find('Checkbox[aria-label="Enable Webhooks"]').invoke('onChange')(
true,
{
currentTarget: { value: true, type: 'change', checked: true },
@ -180,7 +180,7 @@ describe('<WorkflowJobTemplateForm/>', () => {
});
wrapper.update();
expect(
wrapper.find('Checkbox[aria-label="Enable Webhook"]').prop('isChecked')
wrapper.find('Checkbox[aria-label="Enable Webhooks"]').prop('isChecked')
).toBe(true);
expect(