From 5786ec4b2fbe7ceaeb33f8cfa67d67768b006409 Mon Sep 17 00:00:00 2001
From: Jessie Zhang
Date: Thu, 13 Dec 2018 18:48:55 -0800
Subject: [PATCH 1/5] complete the card & board components
---
src/components/Board.js | 15 +++++++++++++--
src/components/Card.js | 20 ++++++++++++++++----
src/data/card-data.json | 2 +-
3 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/src/components/Board.js b/src/components/Board.js
index 9222fd88..1fb9d15c 100644
--- a/src/components/Board.js
+++ b/src/components/Board.js
@@ -16,10 +16,21 @@ class Board extends Component {
};
}
+
render() {
+ const cardList = CARD_DATA.cards.map((card, i)=>{
+ return
+ });
+
return (
)
}
@@ -27,7 +38,7 @@ class Board extends Component {
}
Board.propTypes = {
-
+ cards: PropTypes.array,
};
export default Board;
diff --git a/src/components/Card.js b/src/components/Card.js
index 6788cc03..2a34bd14 100644
--- a/src/components/Card.js
+++ b/src/components/Card.js
@@ -5,17 +5,29 @@ import emoji from 'emoji-dictionary';
import './Card.css';
class Card extends Component {
+
+ // constructor(props){
+ // super(props);
+ //
+ // }
+
+
render() {
+ name=JSON.stringify(emojiName);
return (
- Card
+
+ {this.props.text}
+ {emoji.getUnicode("heart_eyes")}
+
- )
+ );
}
}
Card.propTypes = {
-
-};
+ text: PropTypes.string.isRequired,
+ emoji1: PropTypes.string,
+}
export default Card;
diff --git a/src/data/card-data.json b/src/data/card-data.json
index 1f9793ec..068e019d 100644
--- a/src/data/card-data.json
+++ b/src/data/card-data.json
@@ -6,7 +6,7 @@
},
{
"text": "",
- "Emoji": "heart_eyes"
+ "emoji": "heart_eyes"
},
{
"text": "REST is part of work"
From b23fd8a10ec1b53a27b2ce6e259fd32979142d31 Mon Sep 17 00:00:00 2001
From: Jessie Zhang
Date: Fri, 14 Dec 2018 08:46:44 -0800
Subject: [PATCH 2/5] fixed the emoji showup
---
src/components/Board.js | 3 ++-
src/components/Card.js | 17 +++++++++--------
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/components/Board.js b/src/components/Board.js
index 1fb9d15c..ef9ffb53 100644
--- a/src/components/Board.js
+++ b/src/components/Board.js
@@ -19,10 +19,11 @@ class Board extends Component {
render() {
const cardList = CARD_DATA.cards.map((card, i)=>{
+
return
});
diff --git a/src/components/Card.js b/src/components/Card.js
index 2a34bd14..aeeac1cb 100644
--- a/src/components/Card.js
+++ b/src/components/Card.js
@@ -6,19 +6,20 @@ import './Card.css';
class Card extends Component {
- // constructor(props){
- // super(props);
- //
- // }
-
-
render() {
- name=JSON.stringify(emojiName);
+
return (
{this.props.text}
- {emoji.getUnicode("heart_eyes")}
+
+ {this.props.emoji && (
+
+ {emoji.getUnicode(this.props.emoji)
+ ? emoji.getUnicode(this.props.emoji)
+ : this.props.emoji}
+
+ )}
);
From 37f39c8b7edf9efb08ad2ce4a44ce61bfd3ab992 Mon Sep 17 00:00:00 2001
From: Jessie Zhang
Date: Fri, 14 Dec 2018 10:41:47 -0800
Subject: [PATCH 3/5] set up card data retrieved using axios
---
src/App.js | 4 +++-
src/components/Board.js | 28 ++++++++++++++++++++++++++--
2 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/src/App.js b/src/App.js
index c4854e15..0ead63eb 100644
--- a/src/App.js
+++ b/src/App.js
@@ -3,6 +3,8 @@ import './App.css';
import Board from './components/Board';
class App extends Component {
+
+
render() {
return (
@@ -11,7 +13,7 @@ class App extends Component {
);
diff --git a/src/components/Board.js b/src/components/Board.js
index ef9ffb53..e8ab970f 100644
--- a/src/components/Board.js
+++ b/src/components/Board.js
@@ -7,6 +7,8 @@ import Card from './Card';
import NewCardForm from './NewCardForm';
import CARD_DATA from '../data/card-data.json';
+
+
class Board extends Component {
constructor() {
super();
@@ -17,11 +19,33 @@ class Board extends Component {
}
+ componentDidMount(){
+
+ axios.get(`${this.props.url}${this.props.boardName}`+"/cards")
+ .then((response)=>{
+ const cards = response.data.map((cardObj)=>{
+ const newCard = {
+ ...cardObj.card,
+ };
+ return newCard;
+ }).filter((card, index)=> index < 5);
+ this.setState({
+ cards:cards,
+ });
+ })
+ .catch((error)=>{
+ this.setState({
+ errorMessage: error.message,
+ });
+ });
+ }
+
+
render() {
- const cardList = CARD_DATA.cards.map((card, i)=>{
+ const cardList = this.state.cards.map((card)=>{
return
From 8917e90e6b7b1de0cc0cca5c1897b74ced6f3f6e Mon Sep 17 00:00:00 2001
From: Jessie Zhang
Date: Fri, 14 Dec 2018 16:14:02 -0800
Subject: [PATCH 4/5] complete the card addition and delete
---
src/App.test.js | 5 +
src/__snapshots__/App.test.js.snap | 211 ++++++++++++++++++
src/components/Board.js | 84 ++++++-
src/components/Card.js | 8 +
src/components/NewCardForm.js | 64 ++++++
src/components/{ => test}/Board.test.js | 0
src/components/test/Card.test.js | 19 ++
src/components/{ => test}/NewCardForm.test.js | 0
.../test/__snapshots__/Card.test.js.snap | 182 +++++++++++++++
9 files changed, 562 insertions(+), 11 deletions(-)
create mode 100644 src/__snapshots__/App.test.js.snap
rename src/components/{ => test}/Board.test.js (100%)
create mode 100644 src/components/test/Card.test.js
rename src/components/{ => test}/NewCardForm.test.js (100%)
create mode 100644 src/components/test/__snapshots__/Card.test.js.snap
diff --git a/src/App.test.js b/src/App.test.js
index 5a29f6cb..7de26eb8 100644
--- a/src/App.test.js
+++ b/src/App.test.js
@@ -12,3 +12,8 @@ describe('App', () => {
});
});
+
+it('matches the snapshot', ()=>{
+ const wrapper = shallow();
+ expect(wrapper).toMatchSnapshot();
+});
diff --git a/src/__snapshots__/App.test.js.snap b/src/__snapshots__/App.test.js.snap
new file mode 100644
index 00000000..fc4238f4
--- /dev/null
+++ b/src/__snapshots__/App.test.js.snap
@@ -0,0 +1,211 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`matches the snapshot 1`] = `
+ShallowWrapper {
+ Symbol(enzyme.__root__): [Circular],
+ Symbol(enzyme.__unrendered__): ,
+ Symbol(enzyme.__renderer__): Object {
+ "batchedUpdates": [Function],
+ "getNode": [Function],
+ "render": [Function],
+ "simulateError": [Function],
+ "simulateEvent": [Function],
+ "unmount": [Function],
+ },
+ Symbol(enzyme.__node__): Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+
+
+
+ Inspiration Board
+
+
+ ,
+ ,
+ ],
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children":
+
+ Inspiration Board
+
+
,
+ "className": "header",
+ },
+ "ref": null,
+ "rendered": Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children":
+ Inspiration Board
+ ,
+ "className": "header__h1",
+ },
+ "ref": null,
+ "rendered": Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "Inspiration Board",
+ "className": "header__text",
+ },
+ "ref": null,
+ "rendered": "Inspiration Board",
+ "type": "span",
+ },
+ "type": "h1",
+ },
+ "type": "header",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "class",
+ "props": Object {
+ "boardName": "Jessie Zhang",
+ "url": "https://inspiration-board.herokuapp.com/boards/",
+ },
+ "ref": null,
+ "rendered": null,
+ "type": [Function],
+ },
+ ],
+ "type": "section",
+ },
+ Symbol(enzyme.__nodes__): Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+
+
+
+ Inspiration Board
+
+
+ ,
+ ,
+ ],
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children":
+
+ Inspiration Board
+
+
,
+ "className": "header",
+ },
+ "ref": null,
+ "rendered": Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children":
+ Inspiration Board
+ ,
+ "className": "header__h1",
+ },
+ "ref": null,
+ "rendered": Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "Inspiration Board",
+ "className": "header__text",
+ },
+ "ref": null,
+ "rendered": "Inspiration Board",
+ "type": "span",
+ },
+ "type": "h1",
+ },
+ "type": "header",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "class",
+ "props": Object {
+ "boardName": "Jessie Zhang",
+ "url": "https://inspiration-board.herokuapp.com/boards/",
+ },
+ "ref": null,
+ "rendered": null,
+ "type": [Function],
+ },
+ ],
+ "type": "section",
+ },
+ ],
+ Symbol(enzyme.__options__): Object {
+ "adapter": ReactSixteenAdapter {
+ "options": Object {
+ "enableComponentDidUpdateOnSetState": true,
+ "lifecycles": Object {
+ "componentDidUpdate": Object {
+ "onSetState": true,
+ },
+ "getDerivedStateFromProps": true,
+ "getSnapshotBeforeUpdate": true,
+ "setState": Object {
+ "skipsComponentDidUpdateOnNullish": true,
+ },
+ },
+ },
+ },
+ },
+}
+`;
diff --git a/src/components/Board.js b/src/components/Board.js
index e8ab970f..cf868165 100644
--- a/src/components/Board.js
+++ b/src/components/Board.js
@@ -16,8 +16,7 @@ class Board extends Component {
this.state = {
cards: [],
};
- }
-
+ };
componentDidMount(){
@@ -28,7 +27,7 @@ class Board extends Component {
...cardObj.card,
};
return newCard;
- }).filter((card, index)=> index < 5);
+ });
this.setState({
cards:cards,
});
@@ -38,32 +37,95 @@ class Board extends Component {
errorMessage: error.message,
});
});
- }
+ };
+
+ deleteCard = (cardId) => {
+ axios.delete("https://inspiration-board.herokuapp.com/cards/"+`${cardId}`)
+ .then(response =>{
+ const cardList =[...this.state.cards];
+ let deleteIndex = undefined;
+
+ cardList.forEach((card, index) => {
+ if (cardId === card.id) {
+ deleteIndex = index;
+ }
+ });
+
+ cardList.splice(deleteIndex, 1);
+
+ this.setState({
+ cards: cardList,
+
+ });
+ }).catch(error => {
+ console.log(error.message);
+ this.setState({
+ errorMessage: error.message
+ });
+ });
+
+
+ };
+ addCard = (newCard) => {
+ console.log("add card method");
+ const url = 'https://inspiration-board.herokuapp.com/boards/Jessie Zhang/cards';
+ axios.post(url, newCard)
+ .then((response)=>{
+ console.log("added");
+ const {cards} =this.state;
+
+ cards.push(newCard);
+
+ this.setState({
+ cards: cards,
+
+ });
+ })
+ .catch((error)=>{
+ this.setState({
+ errorMessage:`Failure ${error.message}`,
+ })
+ console.log(error)
+ });
+
+ };
render() {
const cardList = this.state.cards.map((card)=>{
return
});
+
+
return (
+
-
+
+ { this.state.errorMessage}
+
+
- )
- }
+ );
-}
+ }
+};
Board.propTypes = {
- cards: PropTypes.array,
+ url: PropTypes.string.isRequired,
+ boardName: PropTypes.string.isRequired,
};
export default Board;
diff --git a/src/components/Card.js b/src/components/Card.js
index aeeac1cb..3b90a1f0 100644
--- a/src/components/Card.js
+++ b/src/components/Card.js
@@ -20,6 +20,14 @@ class Card extends Component {
: this.props.emoji}
)}
+
);
diff --git a/src/components/NewCardForm.js b/src/components/NewCardForm.js
index 47331423..8d49753f 100644
--- a/src/components/NewCardForm.js
+++ b/src/components/NewCardForm.js
@@ -4,3 +4,67 @@ import emoji from 'emoji-dictionary';
import './NewCardForm.css';
const EMOJI_LIST = ["", "heart_eyes", "beer", "clap", "sparkling_heart", "heart_eyes_cat", "dog"]
+
+class NewCardForm extends Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ text: '',
+ emoji: '',
+ };
+ }
+
+ resetState = () => {
+ this.setState({
+ text: '',
+ emoji: '',
+
+ });
+ }
+
+ onFormChange = (event) => {
+ const field = event.target.name;
+ const value = event.target.value;
+
+ const updatedState = {};
+ updatedState[field] = value;
+ this.setState(updatedState);
+ }
+
+ onSubmit = (event) => {
+ console.log(event);
+ event.preventDefault();
+ const {text, emoji} = this.state;
+
+ if (text === '') return;
+
+ console.log(event);
+ this.props.addCardCallback(this.state);
+ this.resetState();
+ }
+
+ render() {
+ return (
+
+ );
+ }
+
+}
+
+NewCardForm.propTypes = {
+ addCardCallback: PropTypes.func.isRequired,
+};
+
+export default NewCardForm;
diff --git a/src/components/Board.test.js b/src/components/test/Board.test.js
similarity index 100%
rename from src/components/Board.test.js
rename to src/components/test/Board.test.js
diff --git a/src/components/test/Card.test.js b/src/components/test/Card.test.js
new file mode 100644
index 00000000..2e04f0e2
--- /dev/null
+++ b/src/components/test/Card.test.js
@@ -0,0 +1,19 @@
+import React from 'react';
+import Card from '../Card';
+import {shallow} from 'enzyme';
+// import App from './App';
+
+describe('card',()=>{
+ it('will match the Card Snapshot', ()=>{
+ const wrapper = shallow({}}
+ // selectPetCallback ={()=>{}}
+ />);
+ expect(wrapper).toMatchSnapshot();
+ });
+
+
+});
diff --git a/src/components/NewCardForm.test.js b/src/components/test/NewCardForm.test.js
similarity index 100%
rename from src/components/NewCardForm.test.js
rename to src/components/test/NewCardForm.test.js
diff --git a/src/components/test/__snapshots__/Card.test.js.snap b/src/components/test/__snapshots__/Card.test.js.snap
new file mode 100644
index 00000000..b7c2038d
--- /dev/null
+++ b/src/components/test/__snapshots__/Card.test.js.snap
@@ -0,0 +1,182 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`card will match the Card Snapshot 1`] = `
+ShallowWrapper {
+ Symbol(enzyme.__root__): [Circular],
+ Symbol(enzyme.__unrendered__): ,
+ Symbol(enzyme.__renderer__): Object {
+ "batchedUpdates": [Function],
+ "getNode": [Function],
+ "render": [Function],
+ "simulateError": [Function],
+ "simulateEvent": [Function],
+ "unmount": [Function],
+ },
+ Symbol(enzyme.__node__): Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": ,
+ "className": "card",
+ },
+ "ref": null,
+ "rendered": Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+
+ go
+
,
+
+ 😍
+
,
+ ],
+ "className": "card__content",
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "go",
+ "className": "card__content-text",
+ },
+ "ref": null,
+ "rendered": "go",
+ "type": "p",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "😍",
+ "className": "card__content-emoji",
+ },
+ "ref": null,
+ "rendered": "😍",
+ "type": "p",
+ },
+ ],
+ "type": "section",
+ },
+ "type": "div",
+ },
+ Symbol(enzyme.__nodes__): Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": ,
+ "className": "card",
+ },
+ "ref": null,
+ "rendered": Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+
+ go
+
,
+
+ 😍
+
,
+ ],
+ "className": "card__content",
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "go",
+ "className": "card__content-text",
+ },
+ "ref": null,
+ "rendered": "go",
+ "type": "p",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "😍",
+ "className": "card__content-emoji",
+ },
+ "ref": null,
+ "rendered": "😍",
+ "type": "p",
+ },
+ ],
+ "type": "section",
+ },
+ "type": "div",
+ },
+ ],
+ Symbol(enzyme.__options__): Object {
+ "adapter": ReactSixteenAdapter {
+ "options": Object {
+ "enableComponentDidUpdateOnSetState": true,
+ "lifecycles": Object {
+ "componentDidUpdate": Object {
+ "onSetState": true,
+ },
+ "getDerivedStateFromProps": true,
+ "getSnapshotBeforeUpdate": true,
+ "setState": Object {
+ "skipsComponentDidUpdateOnNullish": true,
+ },
+ },
+ },
+ },
+ },
+}
+`;
From 6dab3c2b5cea60706e4e64164432504323772281 Mon Sep 17 00:00:00 2001
From: Jessie Zhang
Date: Sun, 16 Dec 2018 20:44:48 -0800
Subject: [PATCH 5/5] udpated the snapshot text
---
src/components/Card.js | 2 +
src/components/test/Card.test.js | 5 +-
src/components/test/NewCardForm.test.js | 16 +
.../test/__snapshots__/Card.test.js.snap | 64 +++
.../__snapshots__/NewCardForm.test.js.snap | 363 ++++++++++++++++++
5 files changed, 448 insertions(+), 2 deletions(-)
create mode 100644 src/components/test/__snapshots__/NewCardForm.test.js.snap
diff --git a/src/components/Card.js b/src/components/Card.js
index 3b90a1f0..c197da42 100644
--- a/src/components/Card.js
+++ b/src/components/Card.js
@@ -37,6 +37,8 @@ class Card extends Component {
Card.propTypes = {
text: PropTypes.string.isRequired,
emoji1: PropTypes.string,
+ id: PropTypes.number,
+ deleteCardCallback: PropTypes.func.isRequired
}
export default Card;
diff --git a/src/components/test/Card.test.js b/src/components/test/Card.test.js
index 2e04f0e2..1fedfd6e 100644
--- a/src/components/test/Card.test.js
+++ b/src/components/test/Card.test.js
@@ -9,8 +9,9 @@ describe('card',()=>{
text="go"
emoji="heart_eyes"
key={1}
- // deletePetCallback ={()=>{}}
- // selectPetCallback ={()=>{}}
+ id={1}
+ deleteCardCallback={()=>{}}
+
/>);
expect(wrapper).toMatchSnapshot();
});
diff --git a/src/components/test/NewCardForm.test.js b/src/components/test/NewCardForm.test.js
index e69de29b..461f3d39 100644
--- a/src/components/test/NewCardForm.test.js
+++ b/src/components/test/NewCardForm.test.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import NewCardForm from '../NewCardForm';
+import {shallow} from 'enzyme';
+
+
+describe('newcardform',()=>{
+ it('will match the newcardform Snapshot', ()=>{
+ const wrapper = shallow({}}
+
+ />);
+ expect(wrapper).toMatchSnapshot();
+ });
+
+
+});
diff --git a/src/components/test/__snapshots__/Card.test.js.snap b/src/components/test/__snapshots__/Card.test.js.snap
index b7c2038d..fda6e3a9 100644
--- a/src/components/test/__snapshots__/Card.test.js.snap
+++ b/src/components/test/__snapshots__/Card.test.js.snap
@@ -4,7 +4,9 @@ exports[`card will match the Card Snapshot 1`] = `
ShallowWrapper {
Symbol(enzyme.__root__): [Circular],
Symbol(enzyme.__unrendered__): ,
Symbol(enzyme.__renderer__): Object {
@@ -33,6 +35,14 @@ ShallowWrapper {
>
😍
+
,
"className": "card",
},
@@ -53,6 +63,14 @@ ShallowWrapper {
>
😍
,
+ ,
],
"className": "card__content",
},
@@ -82,6 +100,21 @@ ShallowWrapper {
"rendered": "😍",
"type": "p",
},
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "aria-label": "Close",
+ "children": "Delete",
+ "className": "card__content-delete-btn",
+ "onClick": [Function],
+ "type": "button",
+ },
+ "ref": null,
+ "rendered": "Delete",
+ "type": "button",
+ },
],
"type": "section",
},
@@ -106,6 +139,14 @@ ShallowWrapper {
>
😍
+
,
"className": "card",
},
@@ -126,6 +167,14 @@ ShallowWrapper {
>
😍
,
+ ,
],
"className": "card__content",
},
@@ -155,6 +204,21 @@ ShallowWrapper {
"rendered": "😍",
"type": "p",
},
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "aria-label": "Close",
+ "children": "Delete",
+ "className": "card__content-delete-btn",
+ "onClick": [Function],
+ "type": "button",
+ },
+ "ref": null,
+ "rendered": "Delete",
+ "type": "button",
+ },
],
"type": "section",
},
diff --git a/src/components/test/__snapshots__/NewCardForm.test.js.snap b/src/components/test/__snapshots__/NewCardForm.test.js.snap
new file mode 100644
index 00000000..2c039bf0
--- /dev/null
+++ b/src/components/test/__snapshots__/NewCardForm.test.js.snap
@@ -0,0 +1,363 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`newcardform will match the newcardform Snapshot 1`] = `
+ShallowWrapper {
+ Symbol(enzyme.__root__): [Circular],
+ Symbol(enzyme.__unrendered__): ,
+ Symbol(enzyme.__renderer__): Object {
+ "batchedUpdates": [Function],
+ "getNode": [Function],
+ "render": [Function],
+ "simulateError": [Function],
+ "simulateEvent": [Function],
+ "unmount": [Function],
+ },
+ Symbol(enzyme.__node__): Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+
+
+
+
,
+
+
+
+
,
+ ,
+ ],
+ "className": "new-card-form",
+ "id": "new-card-form",
+ "name": "new-card-form",
+ "onSubmit": [Function],
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+ ,
+ ,
+ ],
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "Text",
+ "className": "new-card-form__form-label",
+ "htmlFor": "text",
+ },
+ "ref": null,
+ "rendered": "Text",
+ "type": "label",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "name": "text",
+ "onChange": [Function],
+ "value": "",
+ },
+ "ref": null,
+ "rendered": null,
+ "type": "input",
+ },
+ ],
+ "type": "div",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+ ,
+ ,
+ ],
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "Emoji",
+ "className": "new-card-form__form-label ",
+ "htmlFor": "emoji",
+ },
+ "ref": null,
+ "rendered": "Emoji",
+ "type": "label",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "name": "emoji",
+ "onChange": [Function],
+ "value": "",
+ },
+ "ref": null,
+ "rendered": null,
+ "type": "input",
+ },
+ ],
+ "type": "div",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "className": "new-card-form__form-button ",
+ "name": "submit",
+ "type": "submit",
+ "value": "Add a Card",
+ },
+ "ref": null,
+ "rendered": null,
+ "type": "input",
+ },
+ ],
+ "type": "form",
+ },
+ Symbol(enzyme.__nodes__): Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+
+
+
+
,
+
+
+
+
,
+ ,
+ ],
+ "className": "new-card-form",
+ "id": "new-card-form",
+ "name": "new-card-form",
+ "onSubmit": [Function],
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+ ,
+ ,
+ ],
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "Text",
+ "className": "new-card-form__form-label",
+ "htmlFor": "text",
+ },
+ "ref": null,
+ "rendered": "Text",
+ "type": "label",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "name": "text",
+ "onChange": [Function],
+ "value": "",
+ },
+ "ref": null,
+ "rendered": null,
+ "type": "input",
+ },
+ ],
+ "type": "div",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": Array [
+ ,
+ ,
+ ],
+ },
+ "ref": null,
+ "rendered": Array [
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "children": "Emoji",
+ "className": "new-card-form__form-label ",
+ "htmlFor": "emoji",
+ },
+ "ref": null,
+ "rendered": "Emoji",
+ "type": "label",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "name": "emoji",
+ "onChange": [Function],
+ "value": "",
+ },
+ "ref": null,
+ "rendered": null,
+ "type": "input",
+ },
+ ],
+ "type": "div",
+ },
+ Object {
+ "instance": null,
+ "key": undefined,
+ "nodeType": "host",
+ "props": Object {
+ "className": "new-card-form__form-button ",
+ "name": "submit",
+ "type": "submit",
+ "value": "Add a Card",
+ },
+ "ref": null,
+ "rendered": null,
+ "type": "input",
+ },
+ ],
+ "type": "form",
+ },
+ ],
+ Symbol(enzyme.__options__): Object {
+ "adapter": ReactSixteenAdapter {
+ "options": Object {
+ "enableComponentDidUpdateOnSetState": true,
+ "lifecycles": Object {
+ "componentDidUpdate": Object {
+ "onSetState": true,
+ },
+ "getDerivedStateFromProps": true,
+ "getSnapshotBeforeUpdate": true,
+ "setState": Object {
+ "skipsComponentDidUpdateOnNullish": true,
+ },
+ },
+ },
+ },
+ },
+}
+`;