File tree 3 files changed +13
-14
lines changed
java/ru/mystamps/web/feature/site
3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -98,12 +98,13 @@ class AddCommentFormView extends React.PureComponent {
98
98
aria-label = { l10n [ 't_add_comment' ] || 'Add a comment' }
99
99
className = { `form-horizontal ${ hasValidationErrors ? 'has-error' : '' } ` }
100
100
onSubmit = { handleSubmit } >
101
- < div
102
- id = "add-comment-failed-msg"
103
- role = "alert"
104
- className = { `alert alert-danger text-center col-sm-8 col-sm-offset-2 ${ hasServerError ? '' : 'hidden' } ` } >
105
- { l10n [ 't_server_error' ] || 'Server error' }
106
- </ div >
101
+ { hasServerError &&
102
+ < div id = "add-comment-failed-msg"
103
+ role = "alert"
104
+ className = "alert alert-danger text-center col-sm-8 col-sm-offset-2" >
105
+ { l10n [ 't_server_error' ] || 'Server error' }
106
+ </ div >
107
+ }
107
108
< div className = "form-group form-group-sm" >
108
109
< label htmlFor = "new-comment" className = "control-label col-sm-3 required-field" >
109
110
{ l10n [ 't_comment' ] || 'Comment' }
@@ -120,11 +121,11 @@ class AddCommentFormView extends React.PureComponent {
120
121
</ div >
121
122
</ div >
122
123
< div className = "col-sm-offset-3 col-sm-4" >
123
- < span
124
- id = "new-comment.errors"
125
- className = { `help-block ${ hasValidationErrors ? '' : 'hidden' } ` } >
126
- { validationErrors . join ( ', ' ) }
127
- </ span >
124
+ { hasValidationErrors &&
125
+ < span id = "new-comment.errors" className = "help-block" >
126
+ { validationErrors . join ( ', ' ) }
127
+ </ span >
128
+ }
128
129
< button
129
130
type = "submit"
130
131
className = "btn btn-primary btn-sm"
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ describe('AddCommentFormView', () => {
41
41
// then
42
42
const alert = screen . getByRole ( 'alert' ) ;
43
43
expect ( alert ) . toHaveTextContent ( 'Server error' ) ;
44
- expect ( alert ) . not . toHaveClass ( 'hidden' ) ;
45
44
} ) ;
46
45
47
46
it ( 'the comment field' , ( ) => {
@@ -58,7 +57,6 @@ describe('AddCommentFormView', () => {
58
57
// @todo #1489 Use toHaveErrorMessage() or toHaveDescription() for checking error messages
59
58
const fieldErrors = container . querySelector ( '#new-comment\\.errors' ) ;
60
59
expect ( fieldErrors ) . not . toBeNull ( ) ;
61
- expect ( fieldErrors ) . not . toHaveClass ( 'hidden' ) ;
62
60
expect ( fieldErrors ) . toHaveTextContent ( 'err1, err2' ) ;
63
61
} ) ;
64
62
} ) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public final class ResourceUrl {
32
32
public static final String STATIC_RESOURCES_URL = "https://stamps.filezz.ru" ;
33
33
34
34
// MUST be updated when any of our resources were modified
35
- public static final String RESOURCES_VERSION = "v0.4.5.3 " ;
35
+ public static final String RESOURCES_VERSION = "v0.4.5.4 " ;
36
36
37
37
// CheckStyle: ignore LineLength for next 16 lines
38
38
private static final String CATALOG_UTILS_JS = "/public/js/" + RESOURCES_VERSION + "/CatalogUtils.min.js" ;
You can’t perform that action at this time.
0 commit comments