File tree Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,8 @@ import classNames from 'classnames';
44import { isAbsoluteUrl } from '@availity/resolve-url' ;
55
66// if absolute or loadApp is disabled, return url. otherwise loadappify the url
7- export const getUrl = ( url = '' , loadApp = false , absolute = false ) => {
8- const isEssentials = / ( t e s t | q a ( p ? ) - ) ? e s s e n t i a l s \. a v a i l i t y \. c o m / . test ( url ) ;
9-
10- if ( ( absolute || ! loadApp ) && ! isEssentials ) return url ;
7+ export const getUrl = ( url = '' , loadApp , absolute ) => {
8+ if ( absolute || ! loadApp ) return url ;
119
1210 return `/public/apps/home/#!/loadApp?appUrl=${ encodeURIComponent ( url ) } ` ;
1311} ;
Original file line number Diff line number Diff line change @@ -114,25 +114,4 @@ describe('AvLink', () => {
114114 expect ( link ) . toHaveAttribute ( 'class' , 'link card-link' ) ;
115115 expect ( link ) . toHaveAttribute ( 'style' , 'font-weight: bold;' ) ;
116116 } ) ;
117-
118- test ( 'should render urls from the test-essentials.availity.com domain correctly' , ( ) => {
119- const exampleHref = 'https://test-essentials.availity.com/static/avonly/post/cs/enhanced-claim-status-ui/' ;
120-
121- const { getByTestId } = render ( < AvLink href = { exampleHref } > My App</ AvLink > ) ;
122-
123- const tag = getByTestId ( 'av-link-tag' ) ;
124- const expected = `/public/apps/home/#!/loadApp?appUrl=${ encodeURIComponent ( exampleHref ) } ` ;
125-
126- expect ( tag . getAttribute ( 'href' ) ) . toBe ( expected ) ;
127- } ) ;
128- test ( 'should render urls from the qa-essentials.availity.com domain correctly' , ( ) => {
129- const exampleHref = 'https://qa-essentials.availity.com/static/avonly/post/cs/enhanced-claim-status-ui/' ;
130-
131- const { getByTestId } = render ( < AvLink href = { exampleHref } > My App</ AvLink > ) ;
132-
133- const tag = getByTestId ( 'av-link-tag' ) ;
134- const expected = `/public/apps/home/#!/loadApp?appUrl=${ encodeURIComponent ( exampleHref ) } ` ;
135-
136- expect ( tag . getAttribute ( 'href' ) ) . toBe ( expected ) ;
137- } ) ;
138117} ) ;
You can’t perform that action at this time.
0 commit comments