mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 13:27:40 -02:30
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:
@@ -58,7 +58,7 @@ function WorkflowJobTemplateDetail({ template, i18n, webhook_key }) {
|
|||||||
)}
|
)}
|
||||||
{template.webhook_service && (
|
{template.webhook_service && (
|
||||||
<TextListItem component={TextListItemVariants.li}>
|
<TextListItem component={TextListItemVariants.li}>
|
||||||
{i18n._(t`- Enable Webhook`)}
|
{i18n._(t`- Enable Webhooks`)}
|
||||||
</TextListItem>
|
</TextListItem>
|
||||||
)}
|
)}
|
||||||
</TextList>
|
</TextList>
|
||||||
|
|||||||
@@ -338,14 +338,14 @@ function WorkflowJobTemplateForm({
|
|||||||
<Field id="wfjt-webhooks" name="hasWebhooks">
|
<Field id="wfjt-webhooks" name="hasWebhooks">
|
||||||
{({ form }) => (
|
{({ form }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
aria-label={i18n._(t`Enable Webhook`)}
|
aria-label={i18n._(t`Enable Webhooks`)}
|
||||||
label={
|
label={
|
||||||
<span>
|
<span>
|
||||||
{i18n._(t`Enable Webhook`)}
|
{i18n._(t`Enable Webhooks`)}
|
||||||
|
|
||||||
<FieldTooltip
|
<FieldTooltip
|
||||||
content={i18n._(
|
content={i18n._(
|
||||||
t`Enable webhook for this workflow job template.`
|
t`Enable webhooks for this workflow job template.`
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ describe('<WorkflowJobTemplateForm/>', () => {
|
|||||||
|
|
||||||
test('webhooks and enable concurrent jobs functions properly', async () => {
|
test('webhooks and enable concurrent jobs functions properly', async () => {
|
||||||
act(() => {
|
act(() => {
|
||||||
wrapper.find('Checkbox[aria-label="Enable Webhook"]').invoke('onChange')(
|
wrapper.find('Checkbox[aria-label="Enable Webhooks"]').invoke('onChange')(
|
||||||
true,
|
true,
|
||||||
{
|
{
|
||||||
currentTarget: { value: true, type: 'change', checked: true },
|
currentTarget: { value: true, type: 'change', checked: true },
|
||||||
@@ -180,7 +180,7 @@ describe('<WorkflowJobTemplateForm/>', () => {
|
|||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(
|
expect(
|
||||||
wrapper.find('Checkbox[aria-label="Enable Webhook"]').prop('isChecked')
|
wrapper.find('Checkbox[aria-label="Enable Webhooks"]').prop('isChecked')
|
||||||
).toBe(true);
|
).toBe(true);
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
|
|||||||
Reference in New Issue
Block a user