diff --git a/src/app.css b/src/app.css index 539c021e..43bd2545 100644 --- a/src/app.css +++ b/src/app.css @@ -3,11 +3,14 @@ body { } #pageContainer { - min-height: 100vh; + min-height: 100dvh; position: relative; + display: flex; + flex-direction: column; } #contentContainer { /* padding bottom by footer height */ + flex: 1; padding: 0px 30px 29px 30px; } diff --git a/src/components/Logo.jsx b/src/components/Logo.jsx index b7c81977..f68f1e04 100644 --- a/src/components/Logo.jsx +++ b/src/components/Logo.jsx @@ -1,48 +1,139 @@ import React from 'react'; -const Logo = (props) => ( - +const RobokopLogo = (props) => ( + - - - - - - + + + + + + - - - - - - + + + + + + - + - + - + - + - + - + @@ -51,4 +142,161 @@ const Logo = (props) => ( ); -export default Logo; +const YobokopLogo = (props) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); + +export default process.env.DEPLOYMENT === 'YOBOKOP' ? YobokopLogo : RobokopLogo; diff --git a/src/components/footer/footer.css b/src/components/footer/footer.css index 6a8f1d67..4d9afbad 100644 --- a/src/components/footer/footer.css +++ b/src/components/footer/footer.css @@ -1,8 +1,4 @@ footer { - position: absolute; - bottom: 0; - width: 100%; - height: auto; color: #5e5e5e; background-color: #f5f7fa; } diff --git a/tests/integration/ask_question.test.jsx b/tests/integration/ask_question.test.jsx deleted file mode 100644 index c29c71f1..00000000 --- a/tests/integration/ask_question.test.jsx +++ /dev/null @@ -1,49 +0,0 @@ -import React from 'react'; -import userEvent from '@testing-library/user-event'; -import { - render, waitFor, screen, -} from '&/test_utils'; -import { api } from '~/API/baseUrlProxy'; - -import App from '~/App'; - -// needed for web worker import -jest.mock('~/pages/answer/fullKg/simulation.worker.js'); -// https://jestjs.io/docs/timer-mocks#run-pending-timers -jest.mock('idb-keyval', () => { - const saved_message = require('&/test_message.json'); - return { - set: jest.fn() - .mockImplementationOnce(() => Promise.resolve()), - get: jest.fn() - .mockImplementation(() => Promise.resolve(JSON.stringify(saved_message))), - }; -}); - -describe('Full question workflow', () => { - beforeEach(() => { - // We have to override some svg functions: https://stackoverflow.com/a/66248540/8250415 - SVGElement.prototype.getComputedTextLength = () => 40; - window.open = () => ({ - document: { - write: jest.fn(), - }, - }); - }); - afterEach(() => { - jest.clearAllMocks(); - }); - it('successfully asks a question', async () => { - const spyPost = jest.spyOn(api, 'post'); - render(); - - // submit question - userEvent.click(screen.getByText('Submit')); - await waitFor(() => expect(spyPost).toHaveBeenCalledTimes(1)); - - // answer page loaded, check that things showed up - await screen.findByRole('button', { name: 'Bubble Chart' }); - expect(await screen.queryByRole('cell', { name: 'Ebola Hemorrhagic Fever' })).toBeTruthy(); - expect(await screen.queryByRole('cell', { name: 'NPC1' })).toBeTruthy(); - }); -});