Skip to content

Commit

Permalink
added mock response for recognition list test
Browse files Browse the repository at this point in the history
  • Loading branch information
avinash-mane committed Jun 10, 2020
1 parent f652b62 commit ff4b0e7
Show file tree
Hide file tree
Showing 8 changed files with 416 additions and 14 deletions.
53 changes: 53 additions & 0 deletions mock-responses/recognition-listning/recognitionList.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"recognitionList":[
{
"id":1,
"text":
"i give high five to avinash for writing block on react strap document",
"givenFor": {
"id": 1,
"first_name": "avinash",
"last_name": "mane",
"profile_image_url":"https://i.picsum.photos/id/2/200/200.jpg"
},
"givenBy": {
"id": 2,
"first_name": "onkar",
"last_name": "hasabe",
"profile_image_url": "https://i.picsum.photos/id/2/200/200.jpg"
},
"given_at": 1234567890,
"coreValue": {
"id": 3,
"text": "core value text",
"description": "desc",
"thumbnail": "https://i.picsum.photos/id/654/300/200.jpg"
}
},

{
"id":1,
"text":"give high five to avinash writing block on react strap document",
"givenFor": {
"id": 1,
"first_name": "avinash",
"last_name": "mane",
"profile_image_url":"https://i.picsum.photos/id/2/200/200.jpg"
},
"givenBy": {
"id": 2,
"first_name": "onkar",
"last_name": "hasabe",
"profile_image_url": "https://i.picsum.photos/id/2/200/200.jpg"
},
"given_at": 1234567890,
"coreValue": {
"id": 3,
"text": "core value text",
"description": "desc",
"thumbnail": "https://i.picsum.photos/id/654/300/200.jpg"
}
}

]
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ const HighFive = styled.div`
const CardComponent = styled(Card)`
border-radius: 20px;
margin: 20px 20px;
box-shadow: 0px 5px 20px #505c623b;
box-shadow: 0px 5px 20px var(--box-shadow-color);
opacity: 1;
background: #ffffff 0% 0% no-repeat padding-box;
background: var(--white) 0% 0% no-repeat padding-box;
`;

const RecognitionCardComponent = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import styled from "styled-components";
import RecognitionCardComponent from "recognition-list-components/RecognitionCardComponent";

const Wrapper = styled.div`
border: 1px solid lightgrey;
background: #ffffff 0% 0% no-repeat padding-box;
border: 1px solid var(--grey);
background: var(--white) 0% 0% no-repeat padding-box;
border-radius: 36px;
opacity: 1;
`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from "react";
import { render } from "@testing-library/react";

import RecognitionListComponent from "recognition-list-components/RecognitionListComponent";
import recognitionList from "../../../mock-responses/recognition-listning/recognitionList.json";

describe("Recognition list Component test", () => {
test("should equal snapshot", () => {
const { asFragment } = render(
<RecognitionListComponent recognitionList={[]} />
<RecognitionListComponent
recognitionList={recognitionList.recognitionList}
/>
);
expect(asFragment()).toMatchSnapshot();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Form } from "core-components/form/FormComponent";
import ImageComponent from "core-components/image/ImageComponent";

const Border = styled.fieldset`
border: 1px solid lightgrey;
border: 1px solid var(--grey);
border-radius: 11px;
opacity: 1;
margin-left: 5%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`Recognition Card Component test should equal snapshot 1`] = `
}
.c3 {
border: 1px solid lightgrey;
border: 1px solid var(--grey);
border-radius: 11px;
opacity: 1;
margin-left: 5%;
Expand Down Expand Up @@ -37,9 +37,9 @@ exports[`Recognition Card Component test should equal snapshot 1`] = `
.c0 {
border-radius: 20px;
margin: 20px 20px;
box-shadow: 0px 5px 20px #505c623b;
box-shadow: 0px 5px 20px var(--box-shadow-color);
opacity: 1;
background: #ffffff 0% 0% no-repeat padding-box;
background: var(--white) 0% 0% no-repeat padding-box;
}
<div
Expand Down
Loading

0 comments on commit ff4b0e7

Please sign in to comment.