Skip to content

Commit b00b020

Browse files
committed
Revert "feat(link): update link to encode essentials urls"
This reverts commit 65484e8.
1 parent 29da78b commit b00b020

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

packages/link/src/Link.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import classNames from 'classnames';
44
import { 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 = /(test|qa(p?)-)?essentials\.availity\.com/.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
};

packages/link/tests/Link.test.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)