Skip to content

Commit

Permalink
fix: Fixed test URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Feb 15, 2024
1 parent ca6be06 commit 053923c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/group/components/GroupView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const groupViewMemberBase = async (
node: {
id: `shared-resource-id-${index}`,
shareAccess: 'MEMBERS',
shareUrl: 'https://test-url',
shareUrl: 'https://example.com',
source: {
id: `de-${index}`,
createdAt: '2022-05-20T16:25:21.536679+00:00',
Expand Down Expand Up @@ -209,7 +209,7 @@ test('GroupView: Share link manager', async () => {
sharedResource: {
id: `shared-resource-id-0`,
shareAccess: 'ALL',
shareUrl: 'https://test-url',
shareUrl: 'https://example.com',
source: {
id: `de-0`,
createdAt: '2022-05-20T16:25:21.536679+00:00',
Expand Down Expand Up @@ -279,7 +279,7 @@ test('GroupView: Share link manager', async () => {
fireEvent.click(within(dialog).getByRole('button', { name: 'Copy Link' }))
);
const copyCall = navigator.clipboard.writeText.mock.calls[0];
expect(copyCall[0].toString()).toStrictEqual('https://test-url');
expect(copyCall[0].toString()).toStrictEqual('https://example.com');
});

test('GroupView: Share link member', async () => {
Expand Down Expand Up @@ -313,5 +313,5 @@ test('GroupView: Share link member', async () => {
fireEvent.click(within(dialog).getByRole('button', { name: 'Copy Link' }))
);
const copyCall = navigator.clipboard.writeText.mock.calls[0];
expect(copyCall[0].toString()).toStrictEqual('https://test-url');
expect(copyCall[0].toString()).toStrictEqual('https://example.com');
});
4 changes: 2 additions & 2 deletions src/sharedData/components/SharedResourceDownload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ test('SharedResourceDownload: Has access', async () => {
)
.mockResolvedValue({
sharedResource: {
downloadUrl: 'https://test-url',
downloadUrl: 'https://example.com',
source: {
name: 'map',
resourceType: 'geojson',
Expand All @@ -78,7 +78,7 @@ test('SharedResourceDownload: Has access', async () => {
const downloadButton = screen.getByRole('button', { name: 'Download File' });
await act(async () => fireEvent.click(downloadButton));

expect(window.open).toHaveBeenCalledWith('https://test-url', '_blank');
expect(window.open).toHaveBeenCalledWith('https://example.com', '_blank');
});

test('SharedResourceDownload: No access', async () => {
Expand Down

0 comments on commit 053923c

Please sign in to comment.