Skip to content

Commit

Permalink
[ResponseOps][Connectors] Remove feature flag for ServiceNow addition…
Browse files Browse the repository at this point in the history
…al fields (#186949)

## Summary

In #184023, we introduced the
"additional fields" field for ServiceNow ITSM and SecOps. The field was
under a feature flag to follow the intermediate release process. This PR
reverts commit 6a593e9 to remove the
feature flag.

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
  • Loading branch information
cnasikas authored Jun 26, 2024
1 parent feef37d commit 08dc25b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,16 @@ describe('Credentials', () => {
expect(await screen.findByText(value)).toBeInTheDocument();
});

/**
* Test for the intermediate release process
*/
it('does not show the component if the value is undefined', async () => {
render(
<IntlProvider locale="en">
<AdditionalFields {...props} value={undefined} />
</IntlProvider>
);

expect(screen.queryByTestId('additional_fieldsJsonEditor')).not.toBeInTheDocument();
});

it('changes the value correctly', async () => {
const newValue = JSON.stringify({ bar: 'test' });

render(
<IntlProvider locale="en">
<AdditionalFields {...props} />
<AdditionalFields {...props} value={undefined} />
</IntlProvider>
);

const editor = await screen.findByTestId('additional_fieldsJsonEditor');

userEvent.clear(editor);
userEvent.paste(editor, newValue);
userEvent.paste(await screen.findByTestId('additional_fieldsJsonEditor'), newValue);

await waitFor(() => {
expect(onChange).toHaveBeenCalledWith(newValue);
Expand All @@ -75,7 +59,7 @@ describe('Credentials', () => {

render(
<IntlProvider locale="en">
<AdditionalFields {...props} />
<AdditionalFields {...props} value={undefined} />
</IntlProvider>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ export const AdditionalFieldsComponent: React.FC<AdditionalFieldsProps> = ({
messageVariables,
onChange,
}) => {
/**
* Hide the component if the value is not defined.
* This is needed for the intermediate release process.
* Users will not be able to use the field if they have never set it.
* On the next Serverless release the check will be removed.
*/
if (value === undefined) {
return null;
}

return (
<JsonEditorWithMessageVariables
messageVariables={messageVariables}
Expand Down

0 comments on commit 08dc25b

Please sign in to comment.