From 397f0dd4b08fd30252eb722ed58e2f634d30a719 Mon Sep 17 00:00:00 2001 From: Mac Date: Fri, 3 Mar 2023 15:05:58 +0530 Subject: [PATCH] feat: use spacex api proxy --- .env | 2 +- .env.development | 2 +- .env.local | 2 +- .../tests/__snapshots__/index.test.tsx.snap | 4 +- .../tests/__snapshots__/index.test.js.snap | 4 +- .../tests/__snapshots__/index.test.tsx.snap | 6 +- .../tests/__snapshots__/index.test.tsx.snap | 36 ++-- .../tests/__snapshots__/index.test.tsx.snap | 8 +- .../tests/__snapshots__/index.test.tsx.snap | 10 +- .../tests/__snapshots__/index.test.tsx.snap | 2 +- .../T/tests/__snapshots__/index.test.tsx.snap | 2 +- .../tests/__snapshots__/index.test.tsx.snap | 162 +----------------- app/containers/App/tests/index.test.tsx | 2 +- .../tests/__snapshots__/index.test.tsx.snap | 12 +- .../tests/__snapshots__/index.test.tsx.snap | 10 +- .../tests/__snapshots__/index.test.tsx.snap | 8 +- app/utils/graphqlUtils.ts | 2 +- 17 files changed, 64 insertions(+), 210 deletions(-) diff --git a/.env b/.env index 42666509..81b2fa37 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -SPACEX_URL=https://api.spacex.land/graphql/ +SPACEX_URL=https://spacex-production.up.railway.app/ diff --git a/.env.development b/.env.development index 42666509..81b2fa37 100644 --- a/.env.development +++ b/.env.development @@ -1 +1 @@ -SPACEX_URL=https://api.spacex.land/graphql/ +SPACEX_URL=https://spacex-production.up.railway.app/ diff --git a/.env.local b/.env.local index 42666509..81b2fa37 100644 --- a/.env.local +++ b/.env.local @@ -1 +1 @@ -SPACEX_URL=https://api.spacex.land/graphql/ +SPACEX_URL=https://spacex-production.up.railway.app/ diff --git a/app/components/Clickable/tests/__snapshots__/index.test.tsx.snap b/app/components/Clickable/tests/__snapshots__/index.test.tsx.snap index df8603fb..a2c678b1 100644 --- a/app/components/Clickable/tests/__snapshots__/index.test.tsx.snap +++ b/app/components/Clickable/tests/__snapshots__/index.test.tsx.snap @@ -4,11 +4,11 @@ exports[` component tests should render and match the snapshot 1`]

List of launches diff --git a/app/components/ErrorHandler/tests/__snapshots__/index.test.js.snap b/app/components/ErrorHandler/tests/__snapshots__/index.test.js.snap index d872b38c..074b82b8 100644 --- a/app/components/ErrorHandler/tests/__snapshots__/index.test.js.snap +++ b/app/components/ErrorHandler/tests/__snapshots__/index.test.js.snap @@ -4,14 +4,14 @@ exports[` should render and match the snapshot 1`] = `

something_went_wrong diff --git a/app/components/Header/tests/__snapshots__/index.test.tsx.snap b/app/components/Header/tests/__snapshots__/index.test.tsx.snap index 7eff55fb..b7c12fb4 100644 --- a/app/components/Header/tests/__snapshots__/index.test.tsx.snap +++ b/app/components/Header/tests/__snapshots__/index.test.tsx.snap @@ -4,7 +4,7 @@ exports[`

should render and match the snapshot 1`] = `
should render and match the snapshot 1`] = ` > logo

Wednesday Solutions diff --git a/app/components/LaunchDetails/tests/__snapshots__/index.test.tsx.snap b/app/components/LaunchDetails/tests/__snapshots__/index.test.tsx.snap index 1f82ba8c..f113fd5e 100644 --- a/app/components/LaunchDetails/tests/__snapshots__/index.test.tsx.snap +++ b/app/components/LaunchDetails/tests/__snapshots__/index.test.tsx.snap @@ -4,62 +4,62 @@ exports[` tests should render and match the snapshot 1`] = `

CRS-21

Details SpaceX's 21st ISS resupply mission.

Rocket

Name Falcon 9

Type @@ -67,31 +67,31 @@ exports[` tests should render and match the snapshot 1`] = `

Ships

Name Ship 1

Type diff --git a/app/components/LaunchItem/tests/__snapshots__/index.test.tsx.snap b/app/components/LaunchItem/tests/__snapshots__/index.test.tsx.snap index 74fc7a48..8097c58a 100644 --- a/app/components/LaunchItem/tests/__snapshots__/index.test.tsx.snap +++ b/app/components/LaunchItem/tests/__snapshots__/index.test.tsx.snap @@ -4,26 +4,26 @@ exports[` should render and match the snapshot 1`] = `

Thaicom 6

Mon, 6th January 2014, 06:06 PM

should render and match the snapshot 1`] = `

Thaicom 6

Mon, 6th January 2014, 06:06 PM

tests should render and match the snapshot 1`] = `
diff --git a/app/components/T/tests/__snapshots__/index.test.tsx.snap b/app/components/T/tests/__snapshots__/index.test.tsx.snap index a1ec4313..1751064e 100644 --- a/app/components/T/tests/__snapshots__/index.test.tsx.snap +++ b/app/components/T/tests/__snapshots__/index.test.tsx.snap @@ -4,7 +4,7 @@ exports[` component tests should render and match the snapshot 1`] = `

diff --git a/app/containers/App/tests/__snapshots__/index.test.tsx.snap b/app/containers/App/tests/__snapshots__/index.test.tsx.snap index 8fc5e748..f60ad153 100644 --- a/app/containers/App/tests/__snapshots__/index.test.tsx.snap +++ b/app/containers/App/tests/__snapshots__/index.test.tsx.snap @@ -3,7 +3,7 @@ exports[` container tests should render and match the snapshot 1`] = `
container tests should render and match the snapshot 1`] = ` > logo

Wednesday Solutions

container tests should render and match the snapshot 1`] = ` > rocket-icon @@ -47,153 +47,7 @@ exports[` container tests should render and match the snapshot 1`] = `
-
-
- - - - - - - - -
- -
-
- - - - - SORT BY DATE - -
- -
-
-
-
-
-

- No results found for the search term. -

-
-
-

-

- - -
-
-
+ />
`; diff --git a/app/containers/App/tests/index.test.tsx b/app/containers/App/tests/index.test.tsx index 5817797b..78793661 100644 --- a/app/containers/App/tests/index.test.tsx +++ b/app/containers/App/tests/index.test.tsx @@ -11,7 +11,7 @@ describe(' container tests', () => { ); - await waitFor(() => expect(container.textContent).toContain('SORT BY')); + await waitFor(() => expect(container.textContent).toContain('Wednesday Solutions')); await waitFor(() => expect(container).toMatchSnapshot()); }); }); diff --git a/app/containers/HomeContainer/tests/__snapshots__/index.test.tsx.snap b/app/containers/HomeContainer/tests/__snapshots__/index.test.tsx.snap index 89f4319a..279b9a37 100644 --- a/app/containers/HomeContainer/tests/__snapshots__/index.test.tsx.snap +++ b/app/containers/HomeContainer/tests/__snapshots__/index.test.tsx.snap @@ -4,13 +4,13 @@ exports[` tests should render and match the snapshot 1`] = `
tests should render and match the snapshot 1`] = ` />
tests should render and match the snapshot 1`] = `

diff --git a/app/containers/NotFoundPage/tests/__snapshots__/index.test.tsx.snap b/app/containers/NotFoundPage/tests/__snapshots__/index.test.tsx.snap index 95340519..c265fe6e 100644 --- a/app/containers/NotFoundPage/tests/__snapshots__/index.test.tsx.snap +++ b/app/containers/NotFoundPage/tests/__snapshots__/index.test.tsx.snap @@ -2,16 +2,16 @@ exports[` tests should render and match the snapshot 1`] = `

Oops you ran out of Oxygen!, dont worry, you can go back home and start exploring again!

diff --git a/app/utils/graphqlUtils.ts b/app/utils/graphqlUtils.ts index c346f037..b6a4d43b 100644 --- a/app/utils/graphqlUtils.ts +++ b/app/utils/graphqlUtils.ts @@ -3,7 +3,7 @@ import camelCase from 'lodash-es/camelCase'; import { mapKeysDeep } from '.'; export const client = new ApolloClient({ - uri: 'https://api.spacex.land/graphql', + uri: 'https://spacex-production.up.railway.app', cache: new InMemoryCache() });