Skip to content

Commit

Permalink
Removing placeholders. Updating validation messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed Nov 5, 2020
1 parent ea0736e commit c00eef4
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ const JiraConnectorFields: React.FC<ActionConnectorFieldsProps<JiraActionConnect
readOnly={readOnly}
value={apiUrl || ''} // Needed to prevent uncontrolled input error when value is undefined
data-test-subj="apiUrlFromInput"
placeholder="https://<site-url>"
onChange={(evt) => handleOnChangeActionConfig('apiUrl', evt.target.value)}
onBlur={() => {
if (!apiUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const API_URL_REQUIRED = i18n.translate(
export const API_URL_INVALID = i18n.translate(
'xpack.triggersActionsUI.components.builtinActionTypes.jira.invalidApiUrlTextField',
{
defaultMessage: 'URL is invalid.',
defaultMessage: 'URL is invalid. URL must start with https://',
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ const ResilientConnectorFields: React.FC<ActionConnectorFieldsProps<ResilientAct
readOnly={readOnly}
value={apiUrl || ''} // Needed to prevent uncontrolled input error when value is undefined
data-test-subj="apiUrlFromInput"
placeholder="https://<site-url>"
onChange={(evt) => handleOnChangeActionConfig('apiUrl', evt.target.value)}
onBlur={() => {
if (!apiUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const API_URL_REQUIRED = i18n.translate(
export const API_URL_INVALID = i18n.translate(
'xpack.triggersActionsUI.components.builtinActionTypes.resilient.invalidApiUrlTextField',
{
defaultMessage: 'URL is invalid.',
defaultMessage: 'URL is invalid. URL must start with https://',
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ const ServiceNowConnectorFields: React.FC<ActionConnectorFieldsProps<
readOnly={readOnly}
value={apiUrl || ''} // Needed to prevent uncontrolled input error when value is undefined
data-test-subj="apiUrlFromInput"
placeholder="https://<site-url>"
onChange={(evt) => handleOnChangeActionConfig('apiUrl', evt.target.value)}
onBlur={() => {
if (!apiUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const API_URL_REQUIRED = i18n.translate(
export const API_URL_INVALID = i18n.translate(
'xpack.triggersActionsUI.components.builtinActionTypes.servicenow.invalidApiUrlTextField',
{
defaultMessage: 'URL is invalid.',
defaultMessage: 'URL is invalid. URL must start with https://',
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const SlackActionFields: React.FunctionComponent<ActionConnectorFieldsProps<
isInvalid={errors.webhookUrl.length > 0 && webhookUrl !== undefined}
name="webhookUrl"
readOnly={readOnly}
placeholder="Example: https://hooks.slack.com/services"
value={webhookUrl || ''}
data-test-subj="slackWebhookUrlInput"
onChange={(e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('webhook connector validation', () => {

expect(actionTypeModel.validateConnector(actionConnector)).toEqual({
errors: {
url: ['URL is invalid.'],
url: ['URL is invalid. URL must start with http:// or https://'],
method: [],
user: [],
password: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function getActionType(): ActionTypeModel<
i18n.translate(
'xpack.triggersActionsUI.components.builtinActionTypes.webhookAction.error.invalidUrlTextField',
{
defaultMessage: 'URL is invalid.',
defaultMessage: 'URL is invalid. URL must start with http:// or https://',
}
),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ const WebhookActionConnectorFields: React.FunctionComponent<ActionConnectorField
fullWidth
readOnly={readOnly}
value={url || ''}
placeholder="https://<site-url> or http://<site-url>"
data-test-subj="webhookUrlText"
onChange={(e) => {
editActionConfig('url', e.target.value);
Expand Down

0 comments on commit c00eef4

Please sign in to comment.