mirror of
https://github.com/Haiti-Distributed-Healthcare-System/hdhs.git
synced 2026-10-26 17:35:23 +00:00
LandingPage Tests - Zoom
This commit is contained in:
1 parent
e3a426ce64
commit
b4c8eedeca
3 files changed
+22
-9
No files matched your search
+6
-6
@@ -1,15 +1,15 @@
|
||||
import React from 'react';
|
||||
import './scss/App.scss';
|
||||
import './antd-mobile.css';
|
||||
import React from "react";
|
||||
import "./scss/App.scss";
|
||||
import "./antd-mobile.css";
|
||||
|
||||
import Login from './components/Login'
|
||||
import Login from "./components/Login";
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
<>
|
||||
<Login/>
|
||||
<Login />
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1,11 @@
|
||||
import React from "react";
|
||||
import { render } from "@testing-library/react";
|
||||
import LandingPage from "./LandingPage";
|
||||
|
||||
test("renders learn react link", () => {
|
||||
const { getByText } = render(<LandingPage />);
|
||||
const lookupButtonElement = getByText(/Patient Lookup/i);
|
||||
const newPatientButtonElement = getByText(/New Patient/i);
|
||||
expect(lookupButtonElement).toBeInTheDocument();
|
||||
expect(newPatientButtonElement).toBeInTheDocument();
|
||||
});
|
||||
@@ -1,14 +1,16 @@
|
||||
import React, { ReactElement } from "react";
|
||||
import { WhiteSpace, Button } from "antd-mobile";
|
||||
import Icon, {UserAddOutlined} from "@ant-design/icons";
|
||||
import Icon, { UserAddOutlined } from "@ant-design/icons";
|
||||
|
||||
import "../scss/LandingPage.scss";
|
||||
|
||||
export default function Login(): ReactElement {
|
||||
export default function LandingPage(): ReactElement {
|
||||
/* istanbul ignore next */
|
||||
const patientLookup = () => {
|
||||
console.log("Clicked Patient Lookup");
|
||||
};
|
||||
|
||||
/* istanbul ignore next */
|
||||
const newPatient = () => {
|
||||
console.log("Clicked New Patient");
|
||||
};
|
||||
@@ -22,7 +24,7 @@ export default function Login(): ReactElement {
|
||||
</div>
|
||||
<br />
|
||||
<div id="buttonFlex">
|
||||
<Button icon={<UserAddOutlined/>}onClick={newPatient}>
|
||||
<Button icon={<UserAddOutlined />} onClick={newPatient}>
|
||||
New Patient
|
||||
</Button>
|
||||
<WhiteSpace />
|
||||
|
||||
Reference in new issue
Block a user