File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
redisinsight/ui/src/pages/database-analysis/components Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ interface Props {
15
15
const emptyMessageContent : { [ key in EmptyMessage ] : Content } = {
16
16
[ EmptyMessage . Reports ] : {
17
17
title : 'No Reports found' ,
18
- text : ( ) => 'Run "New Analysis " to generate first report.' ,
18
+ text : ( ) => 'Click "Analyze " to generate the first report.' ,
19
19
} ,
20
20
[ EmptyMessage . Keys ] : {
21
21
title : 'No keys to display' ,
Original file line number Diff line number Diff line change @@ -103,13 +103,15 @@ describe('DatabaseAnalysisHeader', () => {
103
103
104
104
expect ( screen . getByTestId ( 'analysis-progress' ) ) . toBeInTheDocument ( )
105
105
} )
106
+
106
107
it ( 'should call "getDBAnalysis" action be called after click "start-database-analysis-btn"' , ( ) => {
107
108
render ( < Header { ...instance ( mockedProps ) } /> )
108
109
fireEvent . click ( screen . getByTestId ( 'start-database-analysis-btn' ) )
109
110
110
111
const expectedActions = [ getDBAnalysis ( ) ]
111
112
expect ( store . getActions ( ) ) . toEqual ( expectedActions )
112
113
} )
114
+
113
115
it ( 'should send telemetry event after click "new analysis" btn' , async ( ) => {
114
116
const sendEventTelemetryMock = jest . fn ( )
115
117
@@ -131,6 +133,16 @@ describe('DatabaseAnalysisHeader', () => {
131
133
; ( sendEventTelemetry as jest . Mock ) . mockRestore ( )
132
134
} )
133
135
136
+ it ( 'should show "Analyze" text on the start analysis button' , async ( ) => {
137
+ render (
138
+ < Header { ...instance ( mockedProps ) } items = { mockReports } progress = { mockProgress } /> ,
139
+ )
140
+
141
+ const analizeButtonId = screen . getByTestId ( 'start-database-analysis-btn' )
142
+ expect ( analizeButtonId ) . toBeInTheDocument ( )
143
+ expect ( analizeButtonId ) . toHaveTextContent ( 'Analyze' )
144
+ } )
145
+
134
146
it . skip ( 'should call onChangeSelectedAnalysis after change selector' , async ( ) => {
135
147
const onChangeSelectedAnalysis = jest . fn ( )
136
148
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ const Header = (props: Props) => {
161
161
onClick = { handleClick }
162
162
size = "s"
163
163
>
164
- New Report
164
+ Analyze
165
165
</ EuiButton >
166
166
</ FlexItem >
167
167
< FlexItem style = { { paddingLeft : 6 } } >
You can’t perform that action at this time.
0 commit comments