From 043eed0e7234984ec6e259ab84fd89f7785d73f5 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 7 Mar 2022 21:17:43 +0200 Subject: [PATCH 1/2] 404 page --- __tests__/shared/components/Error404.jsx | 27 -------------- .../__snapshots__/Error404.jsx.snap | 35 ------------------- src/shared/components/Error404/index.jsx | 10 +++--- src/shared/components/Error404/style.scss | 1 - 4 files changed, 4 insertions(+), 69 deletions(-) delete mode 100644 __tests__/shared/components/Error404.jsx delete mode 100644 __tests__/shared/components/__snapshots__/Error404.jsx.snap diff --git a/__tests__/shared/components/Error404.jsx b/__tests__/shared/components/Error404.jsx deleted file mode 100644 index c62b9aa560..0000000000 --- a/__tests__/shared/components/Error404.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import Error404 from 'components/Error404'; -import React from 'react'; -import { BrowserRouter, StaticRouter } from 'react-router-dom'; -import renderer from 'react-test-renderer'; - -function render(context) { - return renderer.create(( - - - - )).toJSON(); -} - -test('renders correctly with context', () => expect(render({})).toMatchSnapshot()); - -test('renders correctly without context', () => expect(renderer.create(( - - - -)).toJSON()).toMatchSnapshot()); - -test('writes error to the context, if provided', () => { - const context = {}; - render(context); - const { status } = context; - expect(status).toBe(404); -}); diff --git a/__tests__/shared/components/__snapshots__/Error404.jsx.snap b/__tests__/shared/components/__snapshots__/Error404.jsx.snap deleted file mode 100644 index 7e7e7b30d5..0000000000 --- a/__tests__/shared/components/__snapshots__/Error404.jsx.snap +++ /dev/null @@ -1,35 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`renders correctly with context 1`] = ` -
-

- 404 HTTP Error -

-

- The resource you are looking for does not exist in Topcoder community App :( -

-
-`; - -exports[`renders correctly without context 1`] = ` -
-

- 404 HTTP Error -

-

- The resource you are looking for does not exist in Topcoder community App :( -

-
-`; diff --git a/src/shared/components/Error404/index.jsx b/src/shared/components/Error404/index.jsx index 986ce462d7..8503c54b6a 100644 --- a/src/shared/components/Error404/index.jsx +++ b/src/shared/components/Error404/index.jsx @@ -5,6 +5,7 @@ import _ from 'lodash'; import React from 'react'; import { Route } from 'react-router-dom'; +import Viewport from 'components/Contentful/Viewport'; import './style.scss'; export default function Page404() { @@ -16,12 +17,9 @@ export default function Page404() { return null; }} /> -

- 404 HTTP Error -

-

- The resource you are looking for does not exist in Topcoder community App :( -

+ ); } diff --git a/src/shared/components/Error404/style.scss b/src/shared/components/Error404/style.scss index 3df5f3ee44..68b1a7ba92 100644 --- a/src/shared/components/Error404/style.scss +++ b/src/shared/components/Error404/style.scss @@ -7,7 +7,6 @@ flex-direction: column; min-height: 400px; text-align: center; - padding: 150px 0; } .details { From 3401fab5b078709bf9f00293241f1856c841a59b Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 7 Mar 2022 21:18:58 +0200 Subject: [PATCH 2/2] ci: on beta --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9bb0a50e15..addf6b4a22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -364,7 +364,7 @@ workflows: filters: branches: only: - - jan-updates-2 + - 404-page # This is stage env for production QA releases - "build-prod-staging": context : org-global