Skip to content

Commit

Permalink
added primary core value component
Browse files Browse the repository at this point in the history
  • Loading branch information
avinash-mane committed May 27, 2020
1 parent 64f7729 commit 335edb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions react-frontend/src/login/PreLoginPanelMobileComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Col } from "react-bootstrap";
import styled from "styled-components";
import PropTypes from "prop-types";
import LogoComponent from "shared-components/peerly-Logo/LogoComponent";
import LoginTextComponent from "shared-components/login-text-component/LoginTextComponent";
import PrimaryCoreValueComponent from "shared-components/primary-core-value-components/PrimaryCoreValueComponent";
import PreLoginImageComponent from "shared-components/prelogin-image-components/PreLoginImageComponent";

const Wrapper = styled.div`
Expand All @@ -22,7 +22,7 @@ const PreLoginPanelMobileComponent = ({
<PreLoginImageComponent className="img-fluid" />
</Col>
<Col className="d-flex justify-content-center align-items-center ">
<LoginTextComponent
<PrimaryCoreValueComponent
orgPrimaryCoreValue={orgPrimaryCoreValue}
encouragementThought={encouragementThought}
/>
Expand All @@ -35,4 +35,4 @@ PreLoginPanelMobileComponent.propTypes = {
encouragementThought: PropTypes.string,
};

export default PreLoginPanelMobileComponent;
export default React.memo(PreLoginPanelMobileComponent);
6 changes: 3 additions & 3 deletions react-frontend/src/login/PreLoginPanelMobileComponent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { render } from "@testing-library/react";

import LogoComponent from "shared-components/peerly-Logo/LogoComponent";
import PreLoginImageComponent from "shared-components/prelogin-image-components/PreLoginImageComponent";
import LoginTextComponent from "shared-components/login-text-component/LoginTextComponent";
import PrimaryCoreValueComponent from "shared-components/primary-core-value-components/PrimaryCoreValueComponent";

describe("Pre Login component test", () => {
test("renders image component with image", () => {
Expand All @@ -19,12 +19,12 @@ describe("Pre Login component test", () => {

test("login text component should equal to value", () => {
const { getByTestId } = render(
<LoginTextComponent
<PrimaryCoreValueComponent
orgPrimaryCoreValue="Lets Create the Office Positive"
encouragementThought="positive"
/>
);
expect(getByTestId("LoginTextComponent")).toHaveTextContent(
expect(getByTestId("PrimaryCoreValueComponent")).toHaveTextContent(
"Lets Create the Office Positive positive"
);
});
Expand Down

0 comments on commit 335edb1

Please sign in to comment.