Skip to content

Commit 305a24d

Browse files
committed
#RI-4843 - Inform users that a new version is available
1 parent c20c85d commit 305a24d

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

redisinsight/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "redisinsight",
33
"productName": "RedisInsight",
44
"private": true,
5-
"version": "2.31.0",
5+
"version": "2.32.0",
66
"description": "RedisInsight",
77
"main": "./dist/main/main.js",
88
"author": {

redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.spec.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,23 @@ describe('INFINITE_MESSAGES', () => {
9797
expect(render(<>{Inner}</>)).toBeTruthy()
9898
})
9999
})
100+
101+
describe('APP_UPDATE_AVAILABLE', () => {
102+
it('should render message', () => {
103+
const { Inner } = INFINITE_MESSAGES.APP_UPDATE_AVAILABLE('1', jest.fn())
104+
expect(render(<>{Inner}</>)).toBeTruthy()
105+
})
106+
107+
it('should call onSuccess', () => {
108+
const onSuccess = jest.fn()
109+
const { Inner } = INFINITE_MESSAGES.APP_UPDATE_AVAILABLE('1', onSuccess)
110+
render(<>{Inner}</>)
111+
112+
fireEvent.click(screen.getByTestId('app-restart-btn'))
113+
fireEvent.mouseUp(screen.getByTestId('app-update-available-notification'))
114+
fireEvent.mouseDown(screen.getByTestId('app-update-available-notification'))
115+
116+
expect(onSuccess).toBeCalled()
117+
})
118+
})
100119
})

0 commit comments

Comments
 (0)