Skip to content

Commit 35770b2

Browse files
committed
fix(ui): rework the actions button on the browser page
re #RI-7554
1 parent c41c10c commit 35770b2

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

redisinsight/ui/src/pages/browser/components/actions/Actions.spec.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ const mockedProps: Props = {
1717
describe('Actions', () => {
1818
it('should render', () => {
1919
expect(render(<Actions {...mockedProps} />)).toBeTruthy()
20+
21+
// Verify the buttons are present
22+
const bulkActionsButton = screen.getByTestId('btn-bulk-actions')
23+
const addKeyButton = screen.getByTestId('btn-add-key')
24+
25+
expect(bulkActionsButton).toBeInTheDocument()
26+
expect(addKeyButton).toBeInTheDocument()
2027
})
2128

2229
it('should show feature dependent items when feature flag is off', async () => {

redisinsight/ui/src/pages/browser/components/actions/Actions.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
TelemetryEvent,
77
} from 'uiSrc/telemetry'
88
import {
9+
EmptyButton,
910
SecondaryButton,
1011
} from 'uiSrc/components/base/forms/buttons'
11-
import styles from 'uiSrc/pages/browser/components/browser-search-panel/styles.module.scss'
1212
import { setBulkActionType } from 'uiSrc/slices/browser/bulkActions'
1313
import { BulkActionsType, FeatureFlags } from 'uiSrc/constants'
1414
import { SubscriptionsIcon } from 'uiSrc/components/base/icons'
@@ -46,23 +46,23 @@ const Actions = ({ handleAddKeyPanel, handleBulkActionsPanel }: Props) => {
4646
onClick={openAddKeyPanel}
4747
data-testid="btn-add-key"
4848
>
49-
+ <span className={styles.addKeyText}>Key</span>
49+
Add key
5050
</SecondaryButton>
5151
)
5252
const openBulkActions = () => {
5353
dispatch(setBulkActionType(BulkActionsType.Delete))
5454
handleBulkActionsPanel(true)
5555
}
5656
const BulkActionsBtn = (
57-
<SecondaryButton
57+
<EmptyButton
5858
color="secondary"
5959
icon={SubscriptionsIcon}
6060
onClick={openBulkActions}
6161
data-testid="btn-bulk-actions"
6262
aria-label="bulk actions"
6363
>
64-
Bulk Actions
65-
</SecondaryButton>
64+
Bulk actions
65+
</EmptyButton>
6666
)
6767
return (
6868
<Row

0 commit comments

Comments
 (0)