File tree Expand file tree Collapse file tree
src/libs/Navigation/linkingConfig Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ const oldRoutes: Record<string, string> = {
1717 '/workspaces/*/accounting/quickbooks-desktop/export/company-card-expense-account-select' : '/workspaces/$1/accounting/quickbooks-desktop/export/qbd-company-card-expense-account-select' ,
1818 '/workspaces/*/accounting/quickbooks-desktop/export/company-card-expense-account/account-select' :
1919 '/workspaces/$1/accounting/quickbooks-desktop/export/qbd-company-card-expense-account-select' ,
20- '/workspaces/*/accounting/quickbooks-desktop/export/out-of-pocket-expense/account-select' : '/workspaces/$1/accounting/quickbooks-desktop/export/out-of-pocket-expense/qbd-account-select' ,
21- '/workspaces/*/accounting/quickbooks-desktop/export/out-of-pocket-expense/entity-select' : '/workspaces/$1/accounting/quickbooks-desktop/export/out-of-pocket-expense/qbd-entity-select' ,
20+ '/workspaces/*/accounting/quickbooks-desktop/export/out-of-pocket-expense/account-select' :
21+ '/workspaces/$1/accounting/quickbooks-desktop/export/qbd-out-of-pocket-expense/qbd-account-select' ,
22+ '/workspaces/*/accounting/quickbooks-desktop/export/out-of-pocket-expense/entity-select' :
23+ '/workspaces/$1/accounting/quickbooks-desktop/export/qbd-out-of-pocket-expense/qbd-entity-select' ,
2224 '/flag/*/*' : '/r/$1/flag/$1/$2' ,
2325 '/home-page' : '/home' ,
2426 /* eslint-enable @typescript-eslint/naming-convention */
Original file line number Diff line number Diff line change @@ -50,6 +50,21 @@ describe('getBestMatchingPath', () => {
5050 ) ;
5151 } ) ;
5252
53+ it ( 'redirects old QuickBooks Desktop out-of-pocket selector paths to new dynamic routes' , ( ) => {
54+ expect ( getMatchingNewRoute ( '/workspaces/p123/accounting/quickbooks-desktop/export/out-of-pocket-expense/account-select' ) ) . toBe (
55+ '/workspaces/p123/accounting/quickbooks-desktop/export/qbd-out-of-pocket-expense/qbd-account-select' ,
56+ ) ;
57+ expect ( getMatchingNewRoute ( '/workspaces/p123/accounting/quickbooks-desktop/export/out-of-pocket-expense/entity-select' ) ) . toBe (
58+ '/workspaces/p123/accounting/quickbooks-desktop/export/qbd-out-of-pocket-expense/qbd-entity-select' ,
59+ ) ;
60+ } ) ;
61+
62+ it ( 'preserves query params when redirecting old QuickBooks Desktop out-of-pocket selector paths' , ( ) => {
63+ expect ( getMatchingNewRoute ( '/workspaces/p123/accounting/quickbooks-desktop/export/out-of-pocket-expense/entity-select?backTo=/home' ) ) . toBe (
64+ '/workspaces/p123/accounting/quickbooks-desktop/export/qbd-out-of-pocket-expense/qbd-entity-select?backTo=/home' ,
65+ ) ;
66+ } ) ;
67+
5368 it ( 'preserves query params when redirecting old NetSuite invoice item preference path' , ( ) => {
5469 expect ( getMatchingNewRoute ( '/workspaces/abc/connections/netsuite/export/invoice-item-preference/invoice-item/select?backTo=/home' ) ) . toBe (
5570 '/workspaces/abc/connections/netsuite/export/invoice-item-preference/select/invoice-item/select?backTo=/home' ,
You can’t perform that action at this time.
0 commit comments