File tree Expand file tree Collapse file tree 3 files changed +13
-20
lines changed
helpers/generic_object_helper
javascript/components/textual_summary
spec/helpers/generic_object_helper Expand file tree Collapse file tree 3 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def textual_updated
20
20
21
21
def textual_group_attribute_details_list
22
22
if @record . property_attributes . count . zero?
23
- TextualEmpty . new ( _ ( 'Attributes' ) , _ ( 'No Attributes defined' ) )
23
+ TextualEmpty . new ( _ ( 'Attributes' ) )
24
24
else
25
25
TextualMultilabel . new (
26
26
_ ( 'Attributes' ) ,
@@ -33,7 +33,7 @@ def textual_group_attribute_details_list
33
33
34
34
def textual_group_associations
35
35
if @record . property_associations . count . zero?
36
- TextualEmpty . new ( _ ( 'Associations' ) , _ ( 'No Associations defined' ) )
36
+ TextualEmpty . new ( _ ( 'Associations' ) )
37
37
else
38
38
TextualGroup . new ( _ ( "Associations" ) , associations )
39
39
end
@@ -62,7 +62,7 @@ def textual_group_methods
62
62
end
63
63
64
64
if methods . count . zero?
65
- TextualEmpty . new ( _ ( 'Methods' ) , _ ( 'No Methods defined' ) )
65
+ TextualEmpty . new ( _ ( 'Methods' ) )
66
66
else
67
67
TextualGroup . new ( _ ( 'Methods' ) , methods )
68
68
end
Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
+ import MiqStructuredList from '../miq-structured-list' ;
3
4
4
5
export default function EmptyGroup ( props ) {
5
- const { title, text } = props ;
6
+ const { title } = props ;
6
7
return (
7
- < table className = "table table-bordered table-striped table-summary-screen" >
8
- < thead >
9
- < tr >
10
- < th > { title } </ th >
11
- </ tr >
12
- </ thead >
13
- < tbody >
14
- < tr >
15
- < td > { text } </ td >
16
- </ tr >
17
- </ tbody >
18
- </ table >
8
+ < MiqStructuredList
9
+ rows = { [ ] }
10
+ title = { title }
11
+ mode = "generic_group"
12
+ />
19
13
) ;
20
14
}
21
15
22
16
EmptyGroup . propTypes = {
23
17
title : PropTypes . string . isRequired ,
24
- text : PropTypes . string . isRequired ,
25
18
} ;
Original file line number Diff line number Diff line change 37
37
it "displays 'No Attributes defined' when Attributes do not exist" do
38
38
@record = FactoryBot . create ( :generic_object , :generic_object_definition_id => @generic_obj_defn . id )
39
39
40
- expected = TextualEmpty . new ( 'Attributes' , 'No Attributes defined' )
40
+ expected = TextualEmpty . new ( 'Attributes' )
41
41
42
42
expect ( textual_group_attribute_details_list ) . to eq ( expected )
43
43
end
59
59
it "displays 'No Associations defined' when do not Associations exist" do
60
60
@record = FactoryBot . create ( :generic_object , :generic_object_definition_id => @generic_obj_defn_with_no_properties . id )
61
61
62
- expected = TextualEmpty . new ( 'Associations' , 'No Associations defined' )
62
+ expected = TextualEmpty . new ( 'Associations' )
63
63
64
64
expect ( textual_group_associations ) . to eq ( expected )
65
65
end
75
75
it "displays 'No Methods defined' when do not Methods exist" do
76
76
@record = FactoryBot . create ( :generic_object , :generic_object_definition_id => @generic_obj_defn_with_no_properties . id )
77
77
78
- expected = TextualEmpty . new ( 'Methods' , 'No Methods defined' )
78
+ expected = TextualEmpty . new ( 'Methods' )
79
79
80
80
expect ( textual_group_methods ) . to eq ( expected )
81
81
end
You can’t perform that action at this time.
0 commit comments