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 {
1515const emptyMessageContent : { [ key in EmptyMessage ] : Content } = {
1616 [ EmptyMessage . Reports ] : {
1717 title : 'No Reports found' ,
18- text : ( ) => 'Run "New Analysis " to generate first report.' ,
18+ text : ( ) => 'Click "Analyze " to generate the first report.' ,
1919 } ,
2020 [ EmptyMessage . Keys ] : {
2121 title : 'No keys to display' ,
Original file line number Diff line number Diff line change @@ -103,13 +103,15 @@ describe('DatabaseAnalysisHeader', () => {
103103
104104 expect ( screen . getByTestId ( 'analysis-progress' ) ) . toBeInTheDocument ( )
105105 } )
106+
106107 it ( 'should call "getDBAnalysis" action be called after click "start-database-analysis-btn"' , ( ) => {
107108 render ( < Header { ...instance ( mockedProps ) } /> )
108109 fireEvent . click ( screen . getByTestId ( 'start-database-analysis-btn' ) )
109110
110111 const expectedActions = [ getDBAnalysis ( ) ]
111112 expect ( store . getActions ( ) ) . toEqual ( expectedActions )
112113 } )
114+
113115 it ( 'should send telemetry event after click "new analysis" btn' , async ( ) => {
114116 const sendEventTelemetryMock = jest . fn ( )
115117
@@ -131,6 +133,16 @@ describe('DatabaseAnalysisHeader', () => {
131133 ; ( sendEventTelemetry as jest . Mock ) . mockRestore ( )
132134 } )
133135
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+
134146 it . skip ( 'should call onChangeSelectedAnalysis after change selector' , async ( ) => {
135147 const onChangeSelectedAnalysis = jest . fn ( )
136148
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ const Header = (props: Props) => {
161161 onClick = { handleClick }
162162 size = "s"
163163 >
164- New Report
164+ Analyze
165165 </ EuiButton >
166166 </ FlexItem >
167167 < FlexItem style = { { paddingLeft : 6 } } >
You can’t perform that action at this time.
0 commit comments