Skip to content

Commit 42d122b

Browse files
authored
Change button text from New Report to Analyze, and the empty reports message accordingly (#4681)
1 parent 319ddd7 commit 42d122b

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

redisinsight/ui/src/pages/database-analysis/components/empty-analysis-message/EmptyAnalysisMessage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface Props {
1515
const 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',

redisinsight/ui/src/pages/database-analysis/components/header/Header.spec.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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

redisinsight/ui/src/pages/database-analysis/components/header/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 }}>

0 commit comments

Comments
 (0)