Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
echaidemenos committed Aug 4, 2023
1 parent a6f8727 commit 9808d33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function DownloadCSVButton({
siteId: String(siteId),
})}`,
);
if (!(resp.status >= 200 && resp.status <= 399)) {
if (!(resp.status >= 200 && resp.status <= 299)) {
throw new Error(await resp.text());
}
const header = resp.headers.get('Content-Disposition');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ exports[`renders as expected 1`] = `
<span>
<a
class="makeStyles-downloadButton-1"
href="http://localhost:8080/api/time-series/sample-upload-files/hobo"
href="https://programize-dot-ocean-systems.uc.r.appspot.com/api//time-series/sample-upload-files/hobo"
rel="noopener noreferrer"
target="_blank"
>
Expand All @@ -68,7 +68,7 @@ exports[`renders as expected 1`] = `
<span>
<a
class="makeStyles-downloadButton-1"
href="http://localhost:8080/api/time-series/sample-upload-files/sonde"
href="https://programize-dot-ocean-systems.uc.r.appspot.com/api//time-series/sample-upload-files/sonde"
rel="noopener noreferrer"
target="_blank"
>
Expand All @@ -79,7 +79,7 @@ exports[`renders as expected 1`] = `
<span>
<a
class="makeStyles-downloadButton-1"
href="http://localhost:8080/api/time-series/sample-upload-files/metlog"
href="https://programize-dot-ocean-systems.uc.r.appspot.com/api//time-series/sample-upload-files/metlog"
rel="noopener noreferrer"
target="_blank"
>
Expand All @@ -90,7 +90,7 @@ exports[`renders as expected 1`] = `
<span>
<a
class="makeStyles-downloadButton-1"
href="http://localhost:8080/api/time-series/sample-upload-files/hui"
href="https://programize-dot-ocean-systems.uc.r.appspot.com/api//time-series/sample-upload-files/hui"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
4 changes: 4 additions & 0 deletions packages/website/src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ global.matchMedia =
};
};

// eslint-disable-next-line fp/no-mutation
process.env.REACT_APP_API_BASE_URL =
'https://programize-dot-ocean-systems.uc.r.appspot.com/api/';

stubMuiComponent('Typography');
stubMuiComponent('Button', {
styles: jest.requireActual('@material-ui/core/Button/Button').styles,
Expand Down

0 comments on commit 9808d33

Please sign in to comment.