Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ beforeEach(() => {
store.clearActions()
})

const fromUrl = 'redisinsight://databases/connect?redisUrl=redis://default:password@localhost:6379&databaseAlias=My Name&redirect=workbench?guidePath=/quick-guides/document/introduction.md&cloudId=1232&subscriptionType=fixed&planMemoryLimit=30&memoryLimitMeasurementUnit=mb&free=true&target=_blank'
const fromUrl = 'redisinsight://databases/connect?redisUrl=redis://default:password@localhost:6379&databaseAlias=My Name&redirect=workbench?guidePath=/quick-guides/document/introduction.md&cloudBdbId=1232&subscriptionType=fixed&planMemoryLimit=30&memoryLimitMeasurementUnit=mb&free=true&target=_blank'

describe('GlobalUrlHandler', () => {
beforeEach(() => {
Expand Down Expand Up @@ -84,6 +84,8 @@ describe('GlobalUrlHandler', () => {
const fromParams = new URLSearchParams(actionUrl.search)
// @ts-ignore
const urlProperties = Object.fromEntries(fromParams) || {}
urlProperties.cloudId = urlProperties.cloudBdbId
delete urlProperties.cloudBdbId

expect(store.getActions()).toEqual([
setUrlProperties(urlProperties),
Expand Down Expand Up @@ -115,6 +117,8 @@ describe('GlobalUrlHandler', () => {
const fromParams = new URLSearchParams(actionUrl.search)
// @ts-ignore
const urlProperties = Object.fromEntries(fromParams) || {}
urlProperties.cloudId = urlProperties.cloudBdbId
delete urlProperties.cloudBdbId

const expectedActions = [
setUrlProperties(urlProperties),
Expand Down Expand Up @@ -159,6 +163,8 @@ describe('GlobalUrlHandler', () => {
const fromParams = new URLSearchParams(actionUrl.search)
// @ts-ignore
const urlProperties = Object.fromEntries(fromParams) || {}
urlProperties.cloudId = urlProperties.cloudBdbId
delete urlProperties.cloudBdbId

const expectedActions = [
setUrlProperties(urlProperties),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ const GlobalUrlHandler = () => {

// @ts-ignore
const urlProperties = Object.fromEntries(fromParams) || {}

// rename cloudBdbId to cloudId
urlProperties.cloudId = urlProperties.cloudBdbId
delete urlProperties.cloudBdbId

dispatch(setUrlProperties(urlProperties))
dispatch(setFromUrl(null))

Expand Down