diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-03-20 14:13:18 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-03-20 14:13:18 -0400 |
| commit | 217cfed064989816fbffcb1e285134c8e03ef5c7 (patch) | |
| tree | 0e9a3e43641ad839f5c141c32a3375d7d305022c /frontend/__tests__/__snapshots__ | |
| parent | 43890f9940326702dac1769eb0ded8651db6bad6 (diff) | |
tests
Diffstat (limited to 'frontend/__tests__/__snapshots__')
5 files changed, 125 insertions, 33 deletions
diff --git a/frontend/__tests__/__snapshots__/CartList.test.js.snap b/frontend/__tests__/__snapshots__/CartList.test.js.snap deleted file mode 100644 index 1f3cca5..0000000 --- a/frontend/__tests__/__snapshots__/CartList.test.js.snap +++ /dev/null @@ -1,33 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`<CartItem> renders and matches snapshot 1`] = ` -<styled.li - key="abc123" -> - <img - alt="Fake Item" - src="dog.jpg" - width="100" - /> - <div - className="cart-item-details" - > - <h3> - Fake Item - </h3> - <p> - $1,000 - — - <em> - 20 - × - $50 - each - </em> - </p> - </div> - <Apollo(RemoveFromCart) - id="abc123" - /> -</styled.li> -`; diff --git a/frontend/__tests__/__snapshots__/EditUser.test.js.snap b/frontend/__tests__/__snapshots__/EditUser.test.js.snap new file mode 100644 index 0000000..de5df25 --- /dev/null +++ b/frontend/__tests__/__snapshots__/EditUser.test.js.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`<EditUser/> asks you to log in when you arent logged in 1`] = ` +<p> + You must be logged in +</p> +`; + +exports[`<EditUser/> renders 1`] = ` +<Form + onSubmit={[Function]} +> + <label + htmlFor="name" + > + Name: + <input + defaultValue="Wes Bos" + name="name" + onChange={[Function]} + type="text" + /> + </label> + <button + type="submit" + > + Update + </button> + <strong> + me: + </strong> + <pre> + "Wes Bos" + </pre> + <strong> + Change: + </strong> + <pre + data-test="change" + > + {} + </pre> +</Form> +`; diff --git a/frontend/__tests__/__snapshots__/RemoveFromCart.test.js.snap b/frontend/__tests__/__snapshots__/RemoveFromCart.test.js.snap new file mode 100644 index 0000000..b25bcc9 --- /dev/null +++ b/frontend/__tests__/__snapshots__/RemoveFromCart.test.js.snap @@ -0,0 +1,10 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`<RemoveFromCart/> renders and matches snapshot 1`] = ` +<styled.button + onClick={[Function]} + title="Remove From Cart" +> + × +</styled.button> +`; diff --git a/frontend/__tests__/__snapshots__/ResetRequest.test.js.snap b/frontend/__tests__/__snapshots__/ResetRequest.test.js.snap new file mode 100644 index 0000000..ef7e9f9 --- /dev/null +++ b/frontend/__tests__/__snapshots__/ResetRequest.test.js.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`<ResetRequest/> displays errors 1`] = ` +<Form + onSubmit={[Function]} +> + <p + key="0" + > + Error!!! + </p> + <label + htmlFor="email" + > + Email + <input + name="email" + onChange={[Function]} + placeholder="email" + type="text" + value="wesbos@gmail.com" + /> + </label> + <button + type="submit" + > + Request Reset! + </button> +</Form> +`; + +exports[`<ResetRequest/> renders and matches snapshot 1`] = ` +<Form + onSubmit={[Function]} +> + <label + htmlFor="email" + > + Email + <input + name="email" + onChange={[Function]} + placeholder="email" + type="text" + value="" + /> + </label> + <button + type="submit" + > + Request Reset! + </button> +</Form> +`; diff --git a/frontend/__tests__/__snapshots__/SingleItem.test.js.snap b/frontend/__tests__/__snapshots__/SingleItem.test.js.snap new file mode 100644 index 0000000..173fb95 --- /dev/null +++ b/frontend/__tests__/__snapshots__/SingleItem.test.js.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`<SingleItem/> renders 1`] = ` +<div> + <img + alt="Sneakers" + src="dog.jpg" + /> + <h2> + Viewing + Sneakers + </h2> + <p> + A cool set of shoes + </p> +</div> +`; |
