@@ -55,6 +55,7 @@ type ContentCardProps = {
55
55
56
56
const hasDocumentation = [ 'Portal' , 'OAuth' , 'DocumentPreview' , 'OfficeOnline' , 'Indexing' , 'Sharing' ]
57
57
const isSystemSettings = [
58
+ 'DocumentPreview' ,
58
59
'OAuth' ,
59
60
'OfficeOnline' ,
60
61
'Indexing' ,
@@ -75,9 +76,10 @@ export const ContentCard = ({ settings, onContextMenu }: ContentCardProps) => {
75
76
const uiSettings = useContext ( ResponsivePersonalSettings )
76
77
const history = useHistory ( )
77
78
const classes = useStyles ( )
79
+ const { openDialog } = useDialog ( )
78
80
const settingsName = settings . DisplayName || settings . Name
79
81
const settingsTitle = settingsName . replace ( / \. s e t t i n g s / gi, '' )
80
- const { openDialog } = useDialog ( )
82
+ const dataTestName = settingsTitle . replace ( / \s + / g , '-' ) . toLowerCase ( )
81
83
82
84
return (
83
85
< Card
@@ -102,7 +104,7 @@ export const ContentCard = ({ settings, onContextMenu }: ContentCardProps) => {
102
104
< CardActions style = { { justifyContent : 'flex-end' } } >
103
105
{ ! isSystemSettings . includes ( settingsTitle ) && (
104
106
< IconButton
105
- data-test = "batch -delete"
107
+ data-test = { ` ${ dataTestName } -delete-button` }
106
108
aria-label = "delete"
107
109
onClick = { ( ) => {
108
110
openDialog ( {
@@ -121,8 +123,7 @@ export const ContentCard = ({ settings, onContextMenu }: ContentCardProps) => {
121
123
aria-label = { localization . edit }
122
124
size = "small"
123
125
className = { classes . button }
124
- //style={{ marginRight: '35px' }}
125
- data-test = { `${ settings . Name . replace ( / \s + / g, '-' ) . toLowerCase ( ) } -edit-button` } >
126
+ data-test = { `${ dataTestName } -edit-button` } >
126
127
{ localization . edit }
127
128
</ Button >
128
129
</ Link >
@@ -136,7 +137,7 @@ export const ContentCard = ({ settings, onContextMenu }: ContentCardProps) => {
136
137
aria-label = { localization . learnMore }
137
138
size = "small"
138
139
className = { classes . button }
139
- data-test = "content-card- learnmore-button" >
140
+ data-test = { ` ${ dataTestName } - learnmore-button` } >
140
141
{ localization . learnMore }
141
142
</ Button >
142
143
</ a >
0 commit comments