Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
142ec0a5
Commit
142ec0a5
authored
Aug 03, 2020
by
peterhegman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move error message props into `defaultProps`
parent
5e9afab4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
ee/spec/frontend/groups/settings/components/comma_separated_list_token_selector_spec.js
...gs/components/comma_separated_list_token_selector_spec.js
+2
-10
No files found.
ee/spec/frontend/groups/settings/components/comma_separated_list_token_selector_spec.js
View file @
142ec0a5
...
@@ -12,6 +12,8 @@ describe('CommaSeparatedListTokenSelector', () => {
...
@@ -12,6 +12,8 @@ describe('CommaSeparatedListTokenSelector', () => {
const
defaultProps
=
{
const
defaultProps
=
{
hiddenInputId
:
'
comma-separated-list
'
,
hiddenInputId
:
'
comma-separated-list
'
,
ariaLabelledby
:
'
comma-separated-list-label
'
,
ariaLabelledby
:
'
comma-separated-list-label
'
,
errorMessage
:
'
The value entered is invalid
'
,
disallowedValueErrorMessage
:
'
The value entered is not allowed
'
,
};
};
const
createComponent
=
options
=>
{
const
createComponent
=
options
=>
{
...
@@ -147,7 +149,6 @@ describe('CommaSeparatedListTokenSelector', () => {
...
@@ -147,7 +149,6 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent
({
createComponent
({
propsData
:
{
propsData
:
{
regexValidator
:
/baz/
,
regexValidator
:
/baz/
,
errorMessage
:
'
The value entered is invalid
'
,
},
},
});
});
...
@@ -164,7 +165,6 @@ describe('CommaSeparatedListTokenSelector', () => {
...
@@ -164,7 +165,6 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent
({
createComponent
({
propsData
:
{
propsData
:
{
disallowedValues
:
[
'
foo
'
,
'
bar
'
,
'
baz
'
],
disallowedValues
:
[
'
foo
'
,
'
bar
'
,
'
baz
'
],
disallowedValueErrorMessage
:
'
The value entered is not allowed
'
,
},
},
});
});
...
@@ -181,9 +181,7 @@ describe('CommaSeparatedListTokenSelector', () => {
...
@@ -181,9 +181,7 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent
({
createComponent
({
propsData
:
{
propsData
:
{
regexValidator
:
/baz/
,
regexValidator
:
/baz/
,
errorMessage
:
'
The value entered is invalid
'
,
disallowedValues
:
[
'
foo
'
,
'
bar
'
,
'
baz
'
],
disallowedValues
:
[
'
foo
'
,
'
bar
'
,
'
baz
'
],
disallowedValueErrorMessage
:
'
The value entered is not allowed
'
,
},
},
});
});
...
@@ -198,9 +196,7 @@ describe('CommaSeparatedListTokenSelector', () => {
...
@@ -198,9 +196,7 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent
({
createComponent
({
propsData
:
{
propsData
:
{
regexValidator
:
/foo/
,
regexValidator
:
/foo/
,
errorMessage
:
'
The value entered is invalid
'
,
disallowedValues
:
[
'
foo
'
,
'
bar
'
,
'
baz
'
],
disallowedValues
:
[
'
foo
'
,
'
bar
'
,
'
baz
'
],
disallowedValueErrorMessage
:
'
The value entered is not allowed
'
,
},
},
});
});
...
@@ -218,9 +214,7 @@ describe('CommaSeparatedListTokenSelector', () => {
...
@@ -218,9 +214,7 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent
({
createComponent
({
propsData
:
{
propsData
:
{
regexValidator
:
/foo/
,
regexValidator
:
/foo/
,
errorMessage
:
'
The value entered is invalid
'
,
disallowedValues
:
[
'
bar
'
,
'
baz
'
],
disallowedValues
:
[
'
bar
'
,
'
baz
'
],
disallowedValueErrorMessage
:
'
The value entered is not allowed
'
,
},
},
scopedSlots
:
{
scopedSlots
:
{
'
user-defined-token-content
'
:
'
<span>Add "{{props.inputText}}"</span>
'
,
'
user-defined-token-content
'
:
'
<span>Add "{{props.inputText}}"</span>
'
,
...
@@ -262,7 +256,6 @@ describe('CommaSeparatedListTokenSelector', () => {
...
@@ -262,7 +256,6 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent
({
createComponent
({
propsData
:
{
propsData
:
{
regexValidator
:
/baz/
,
regexValidator
:
/baz/
,
errorMessage
:
'
The value entered is invalid
'
,
},
},
});
});
...
@@ -285,7 +278,6 @@ describe('CommaSeparatedListTokenSelector', () => {
...
@@ -285,7 +278,6 @@ describe('CommaSeparatedListTokenSelector', () => {
createComponent
({
createComponent
({
propsData
:
{
propsData
:
{
regexValidator
:
/baz/
,
regexValidator
:
/baz/
,
errorMessage
:
'
The value entered is invalid
'
,
},
},
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment