diff options
| author | Randy Ridge <randyridge@gmail.com> | 2018-09-14 20:01:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-14 20:01:25 -0400 |
| commit | 908180c77cd38011eeedcae949613da2a3391e5e (patch) | |
| tree | b59bf1aae819a04d453cde72f6e601f5561a740f /finished-application/frontend/__tests__/__snapshots__ | |
| parent | 1f6667d233a4a2e9df977204d83a8f749c050c75 (diff) | |
| parent | b3bebda57ba187b7fa10398054b54c05d3fd3555 (diff) | |
Merge branch 'master' into randyridge/our
Diffstat (limited to 'finished-application/frontend/__tests__/__snapshots__')
15 files changed, 154 insertions, 374 deletions
diff --git a/finished-application/frontend/__tests__/__snapshots__/AddToCart.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/AddToCart.test.js.snap index e3f8229..2f489d4 100644 --- a/finished-application/frontend/__tests__/__snapshots__/AddToCart.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/AddToCart.test.js.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<AddtoCart/> renders and matches snapshot 1`] = ` +exports[`<AddToCart/> renders and matches the snap shot 1`] = ` <button disabled={false} onClick={[Function]} > - π Add - To Cart + Add + To Cart π </button> `; diff --git a/finished-application/frontend/__tests__/__snapshots__/Cart.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/Cart.test.js.snap index 9aeedfd..d5c0d92 100644 --- a/finished-application/frontend/__tests__/__snapshots__/Cart.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/Cart.test.js.snap @@ -1,31 +1,31 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<Cart/> renders 1`] = ` +exports[`<Cart/> renders and matches snappy 1`] = ` <header> - <styled.button + <CloseButton onClick={[Function]} title="close" > <button - className="sc-EHOje jytiuo" + className="CloseButton-sc-1seb878-0 lbNKfp" onClick={[Function]} title="close" > Γ </button> - </styled.button> - <styled.h3> + </CloseButton> + <Supreme> <h3 - className="sc-ifAKCX imryuh" + className="Supreme-xv30qb-0 hpaXsq" > Miss Coleman Berge - 's Cart. + 's Cart </h3> - </styled.h3> + </Supreme> <p> - You have + You Have 1 - item + Item in your cart. </p> </header> diff --git a/finished-application/frontend/__tests__/__snapshots__/CartCount.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/CartCount.test.js.snap index 224141b..92ee89a 100644 --- a/finished-application/frontend/__tests__/__snapshots__/CartCount.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/CartCount.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<CartCount></CartCount> matches snapshot 1`] = ` -<styled.span> +exports[`<CartCount/> matches the snapshot 1`] = ` +<CartCount__AnimationStyles> <TransitionGroup childFactory={[Function]} component="div" @@ -9,7 +9,7 @@ exports[`<CartCount></CartCount> matches snapshot 1`] = ` <CSSTransition className="count" classNames="count" - key="10" + key="11" timeout={ Object { "enter": 400, @@ -18,188 +18,62 @@ exports[`<CartCount></CartCount> matches snapshot 1`] = ` } unmountOnExit={true} > - <styled.div> - 10 - </styled.div> + <CartCount__Dot> + 11 + </CartCount__Dot> </CSSTransition> </TransitionGroup> -</styled.span> +</CartCount__AnimationStyles> `; -exports[`<CartCount></CartCount> updates via props 1`] = ` -<CartCount - count={50} -> - <styled.span> - <span - className="sc-bwzfXH fWZfOZ" +exports[`<CartCount/> updates via props 1`] = ` +<CartCount__AnimationStyles> + <TransitionGroup + childFactory={[Function]} + component="div" + > + <CSSTransition + className="count" + classNames="count" + key="50" + timeout={ + Object { + "enter": 400, + "exit": 400, + } + } + unmountOnExit={true} > - <TransitionGroup - childFactory={[Function]} - component="div" - > - <div> - <CSSTransition - className="count" - classNames="count" - in={true} - key=".$50" - onExited={[Function]} - timeout={ - Object { - "enter": 400, - "exit": 400, - } - } - unmountOnExit={true} - > - <Transition - appear={false} - className="count" - enter={true} - exit={true} - in={true} - mountOnEnter={false} - onEnter={[Function]} - onEntered={[Function]} - onEntering={[Function]} - onExit={[Function]} - onExited={[Function]} - onExiting={[Function]} - timeout={ - Object { - "enter": 400, - "exit": 400, - } - } - unmountOnExit={true} - > - <styled.div - className="count" - > - <div - className="count sc-bdVaJa ldHGxH" - > - 50 - </div> - </styled.div> - </Transition> - </CSSTransition> - </div> - </TransitionGroup> - </span> - </styled.span> -</CartCount> + <CartCount__Dot> + 50 + </CartCount__Dot> + </CSSTransition> + </TransitionGroup> +</CartCount__AnimationStyles> `; -exports[`<CartCount></CartCount> updates via props 2`] = ` -<CartCount - count={10} -> - <styled.span> - <span - className="sc-bwzfXH fWZfOZ" +exports[`<CartCount/> updates via props 2`] = ` +<CartCount__AnimationStyles> + <TransitionGroup + childFactory={[Function]} + component="div" + > + <CSSTransition + className="count" + classNames="count" + key="10" + timeout={ + Object { + "enter": 400, + "exit": 400, + } + } + unmountOnExit={true} > - <TransitionGroup - childFactory={[Function]} - component="div" - > - <div> - <CSSTransition - className="count" - classNames="count" - in={true} - key=".$10" - onExited={[Function]} - timeout={ - Object { - "enter": 400, - "exit": 400, - } - } - unmountOnExit={true} - > - <Transition - appear={false} - className="count" - enter={true} - exit={true} - in={true} - mountOnEnter={false} - onEnter={[Function]} - onEntered={[Function]} - onEntering={[Function]} - onExit={[Function]} - onExited={[Function]} - onExiting={[Function]} - timeout={ - Object { - "enter": 400, - "exit": 400, - } - } - unmountOnExit={true} - > - <styled.div - className="count" - > - <div - className="count sc-bdVaJa ldHGxH" - > - 10 - </div> - </styled.div> - </Transition> - </CSSTransition> - <CSSTransition - className="count" - classNames="count" - in={false} - key=".$50" - onExited={[Function]} - timeout={ - Object { - "enter": 400, - "exit": 400, - } - } - unmountOnExit={true} - > - <Transition - appear={false} - className="count" - enter={true} - exit={true} - in={false} - mountOnEnter={false} - onEnter={[Function]} - onEntered={[Function]} - onEntering={[Function]} - onExit={[Function]} - onExited={[Function]} - onExiting={[Function]} - timeout={ - Object { - "enter": 400, - "exit": 400, - } - } - unmountOnExit={true} - > - <styled.div - className="count" - > - <div - className="count sc-bdVaJa ldHGxH" - > - 50 - </div> - </styled.div> - </Transition> - </CSSTransition> - </div> - </TransitionGroup> - </span> - </styled.span> -</CartCount> + <CartCount__Dot> + 10 + </CartCount__Dot> + </CSSTransition> + </TransitionGroup> +</CartCount__AnimationStyles> `; diff --git a/finished-application/frontend/__tests__/__snapshots__/CartItem.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/CartItem.test.js.snap deleted file mode 100644 index b8f5ad3..0000000 --- a/finished-application/frontend/__tests__/__snapshots__/CartItem.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> - <RemoveFromCart - id="abc123" - /> -</styled.li> -`; diff --git a/finished-application/frontend/__tests__/__snapshots__/CreateItem.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/CreateItem.test.js.snap index 89dbcd2..59d8557 100644 --- a/finished-application/frontend/__tests__/__snapshots__/CreateItem.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/CreateItem.test.js.snap @@ -1,14 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<Createitem/> renders and matches snapshot 1`] = ` +exports[`<CreateItem/> renders and matches snapshot 1`] = ` <form - className="sc-bwzfXH ikCwBB" - data-test={true} + className="Form-sc-1xszr8q-0 krRxky" + data-test="form" onSubmit={[Function]} > - <h2> - Sell an Item. - </h2> <DisplayError error={Object {}} /> @@ -21,9 +18,10 @@ exports[`<Createitem/> renders and matches snapshot 1`] = ` > Image <input - accept=".png, .jpg, .jpeg" id="file" + name="file" onChange={[Function]} + placeholder="Upload an image" required={true} type="file" /> @@ -45,26 +43,30 @@ exports[`<Createitem/> renders and matches snapshot 1`] = ` <label htmlFor="price" > - Price - 0 + Price <input id="price" - min="0" name="price" onChange={[Function]} + placeholder="Price" required={true} type="number" value={0} /> </label> - <textarea - id="description" - name="description" - onChange={[Function]} - placeholder="The desc for this item" - required={true} - value="" - /> + <label + htmlFor="description" + > + Description + <textarea + id="description" + name="description" + onChange={[Function]} + placeholder="Enter A Description" + required={true} + value="" + /> + </label> <button type="submit" > diff --git a/finished-application/frontend/__tests__/__snapshots__/EditUser.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/EditUser.test.js.snap deleted file mode 100644 index bbb672d..0000000 --- a/finished-application/frontend/__tests__/__snapshots__/EditUser.test.js.snap +++ /dev/null @@ -1,47 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`<EditUser/> renders 1`] = ` -<form - className="sc-bdVaJa LHejR" - onSubmit={[Function]} -> - <DisplayError - error={Object {}} - /> - <fieldset - aria-busy={false} - disabled={false} - > - <label - htmlFor="name" - > - Name: - <input - defaultValue="Miss Coleman Berge" - name="name" - onChange={[Function]} - type="text" - /> - </label> - <button - type="submit" - > - Update - </button> - <strong> - me: - </strong> - <pre> - "Miss Coleman Berge" - </pre> - <strong> - Change: - </strong> - <pre - data-test="change" - > - {} - </pre> - </fieldset> -</form> -`; diff --git a/finished-application/frontend/__tests__/__snapshots__/Item.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/Item.test.js.snap index 930c7a9..70e4aa8 100644 --- a/finished-application/frontend/__tests__/__snapshots__/Item.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/Item.test.js.snap @@ -1,14 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<Item/> Renders and matches snapshot 1`] = ` -<styled.div - key="ABC123" -> +exports[`<Item/> renders and matches the snapshot 1`] = ` +<ItemStyles__Item> <img alt="A Cool Item" src="dog.jpg" /> - <styled.h3> + <Title> <Link href={ Object { @@ -23,10 +21,10 @@ exports[`<Item/> Renders and matches snapshot 1`] = ` A Cool Item </a> </Link> - </styled.h3> - <styled.span> - $50 - </styled.span> + </Title> + <PriceTag> + $40 + </PriceTag> <p> This item is really cool! </p> @@ -36,7 +34,7 @@ exports[`<Item/> Renders and matches snapshot 1`] = ` <Link href={ Object { - "pathname": "/update", + "pathname": "update", "query": Object { "id": "ABC123", }, @@ -52,7 +50,9 @@ exports[`<Item/> Renders and matches snapshot 1`] = ` /> <DeleteItem id="ABC123" - /> + > + Delete This Item + </DeleteItem> </div> -</styled.div> +</ItemStyles__Item> `; diff --git a/finished-application/frontend/__tests__/__snapshots__/Nav.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/Nav.test.js.snap index 354fbc1..c3155a9 100644 --- a/finished-application/frontend/__tests__/__snapshots__/Nav.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/Nav.test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<Nav></Nav> Renders minimal nav when logged out 1`] = ` +exports[`<Nav/> renders a minimal nav when signed out 1`] = ` <ul - className="sc-dnqmqq kxZizK" + className="NavStyles-sc-11c0d2g-0 YVEeD" data-test="nav" > <Link @@ -16,16 +16,6 @@ exports[`<Nav></Nav> Renders minimal nav when logged out 1`] = ` </a> </Link> <Link - href="/sell" - > - <a - href="/sell" - onClick={[Function]} - > - Sell - </a> - </Link> - <Link href="/signup" > <a @@ -37,3 +27,11 @@ exports[`<Nav></Nav> Renders minimal nav when logged out 1`] = ` </Link> </ul> `; + +exports[`<Nav/> renders the amount of items in the cart 1`] = ` +<div + className="count CartCount__Dot-xxvp4g-1 fJsVOg" +> + 9 +</div> +`; diff --git a/finished-application/frontend/__tests__/__snapshots__/Order.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/Order.test.js.snap index 8e76546..9dce80b 100644 --- a/finished-application/frontend/__tests__/__snapshots__/Order.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/Order.test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<Order/> Renders the order 1`] = ` +exports[`<Order/> renders the order 1`] = ` <div - className="sc-bwzfXH wJijb" + className="OrderStyles-sc-4oqalm-0 eDzsVm" data-test="order" > <SideEffect(Head)> @@ -10,7 +10,7 @@ exports[`<Order/> Renders the order 1`] = ` </SideEffect(Head)> <p> <span> - Order Id: + Order ID: </span> <span> ord123 @@ -29,7 +29,7 @@ exports[`<Order/> Renders the order 1`] = ` Date </span> <span> - March 90, 2018 8:00 A + March 31, 2018 8:00 PM </span> </p> <p> @@ -63,9 +63,7 @@ exports[`<Order/> Renders the order 1`] = ` className="item-details" > <h2> - soluta non omnis consequatur enim quia autem - </h2> <p> Qty: @@ -76,12 +74,8 @@ exports[`<Order/> Renders the order 1`] = ` $42.34 </p> <p> - Subtotal: - $42.34 - </p> - <p> SubTotal: - et modi tenetur amet modi reprehenderit omnis + $42.34 </p> <p> et modi tenetur amet modi reprehenderit omnis @@ -100,9 +94,7 @@ exports[`<Order/> Renders the order 1`] = ` className="item-details" > <h2> - quia sed exercitationem omnis laborum exercitationem est - </h2> <p> Qty: @@ -113,12 +105,8 @@ exports[`<Order/> Renders the order 1`] = ` $42.34 </p> <p> - Subtotal: - $42.34 - </p> - <p> SubTotal: - sapiente laudantium molestias assumenda quasi adipisci mollitia + $42.34 </p> <p> sapiente laudantium molestias assumenda quasi adipisci mollitia diff --git a/finished-application/frontend/__tests__/__snapshots__/Pagination.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/Pagination.test.js.snap index c757968..110f59d 100644 --- a/finished-application/frontend/__tests__/__snapshots__/Pagination.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/Pagination.test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<Pagination/> displays loading message 1`] = ` +exports[`<Pagination/> renders pagination for 18 items 1`] = ` <div - className="sc-bdVaJa ijYKGd" + className="PaginationStyles-aduuar-0 ewJsCc" data-test="pagination" > <SideEffect(Head)> @@ -25,26 +25,22 @@ exports[`<Pagination/> displays loading message 1`] = ` href="items?page=0" onClick={[Function]} > - βPrev + β Prev </a> </Link> <p> Page - <strong> - 1 - - </strong> - of - <strong + 1 + of + <span className="totalPages" > - 1 - </strong> + 5 + </span> + ! </p> <p> - <strong> - 1 - </strong> + 18 Items Total </p> <Link @@ -59,7 +55,7 @@ exports[`<Pagination/> displays loading message 1`] = ` prefetch={true} > <a - aria-disabled={true} + aria-disabled={false} className="next" href="items?page=2" onClick={[Function]} diff --git a/finished-application/frontend/__tests__/__snapshots__/RemoveFromCart.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/RemoveFromCart.test.js.snap index a80b678..db8687b 100644 --- a/finished-application/frontend/__tests__/__snapshots__/RemoveFromCart.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/RemoveFromCart.test.js.snap @@ -2,10 +2,10 @@ exports[`<RemoveFromCart/> renders and matches snapshot 1`] = ` <button - className="sc-bdVaJa fXnNqM" + className="RemoveFromCart__BigButton-emvtd6-0 gPWNSn" disabled={false} onClick={[Function]} - title="Remove From Cart" + title="Delete Item" > Γ </button> diff --git a/finished-application/frontend/__tests__/__snapshots__/ResetRequest.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/RequestReset.test.js.snap index a6a0375..c0de705 100644 --- a/finished-application/frontend/__tests__/__snapshots__/ResetRequest.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/RequestReset.test.js.snap @@ -1,18 +1,22 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<ResetRequest/> renders and matches snapshot 1`] = ` +exports[`<RequestReset/> renders and matches snapshot 1`] = ` <form - className="sc-bdVaJa LHejR" - data-test="ResetRequest" + className="Form-sc-1xszr8q-0 krRxky" + data-test="form" + method="post" onSubmit={[Function]} > - <DisplayError - error={Object {}} - /> <fieldset aria-busy={false} disabled={false} > + <h2> + Request a password reset + </h2> + <DisplayError + error={Object {}} + /> <label htmlFor="email" > @@ -21,7 +25,7 @@ exports[`<ResetRequest/> renders and matches snapshot 1`] = ` name="email" onChange={[Function]} placeholder="email" - type="text" + type="email" value="" /> </label> diff --git a/finished-application/frontend/__tests__/__snapshots__/Signup.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/Signup.test.js.snap index b3c057e..bb61ff1 100644 --- a/finished-application/frontend/__tests__/__snapshots__/Signup.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/Signup.test.js.snap @@ -2,7 +2,7 @@ exports[`<Signup/> renders and matches snapshot 1`] = ` <form - className="sc-bdVaJa LHejR" + className="Form-sc-1xszr8q-0 krRxky" method="post" onSubmit={[Function]} > @@ -10,12 +10,12 @@ exports[`<Signup/> renders and matches snapshot 1`] = ` aria-busy={false} disabled={false} > + <h2> + Sign Up for An Account + </h2> <DisplayError error={Object {}} /> - <h2> - Sign Up for an Account - </h2> <label htmlFor="email" > @@ -24,7 +24,7 @@ exports[`<Signup/> renders and matches snapshot 1`] = ` name="email" onChange={[Function]} placeholder="email" - type="text" + type="email" value="" /> </label> @@ -41,12 +41,10 @@ exports[`<Signup/> renders and matches snapshot 1`] = ` /> </label> <label - htmlFor="signupPassword" + htmlFor="password" > Password <input - className="password" - id="signupPassword" name="password" onChange={[Function]} placeholder="password" @@ -57,7 +55,7 @@ exports[`<Signup/> renders and matches snapshot 1`] = ` <button type="submit" > - Submit + Sign Up! </button> </fieldset> </form> diff --git a/finished-application/frontend/__tests__/__snapshots__/SingleItem.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/SingleItem.test.js.snap index 28e9174..2f41d4c 100644 --- a/finished-application/frontend/__tests__/__snapshots__/SingleItem.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/SingleItem.test.js.snap @@ -1,31 +1,31 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<SingleItem/> Errors with a not found Item 1`] = ` +exports[`<SingleItem/> Errors with a not found item 1`] = ` <p data-test="graphql-error" > <strong> Shoot! </strong> - Item not found! + Items Not Found! </p> `; -exports[`<SingleItem/> Renders with Proper Data 1`] = ` +exports[`<SingleItem/> renders with proper data 1`] = ` <h2> Viewing dogs are best </h2> `; -exports[`<SingleItem/> Renders with Proper Data 2`] = ` +exports[`<SingleItem/> renders with proper data 2`] = ` <img alt="dogs are best" src="dog.jpg" /> `; -exports[`<SingleItem/> Renders with Proper Data 3`] = ` +exports[`<SingleItem/> renders with proper data 3`] = ` <p> dogs </p> diff --git a/finished-application/frontend/__tests__/__snapshots__/TakeMyMoney.test.js.snap b/finished-application/frontend/__tests__/__snapshots__/TakeMyMoney.test.js.snap index 00863d3..02a112e 100644 --- a/finished-application/frontend/__tests__/__snapshots__/TakeMyMoney.test.js.snap +++ b/finished-application/frontend/__tests__/__snapshots__/TakeMyMoney.test.js.snap @@ -1,19 +1,19 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`<TakeMyMoney /> renders 1`] = ` +exports[`<TakeMyMoney/> renders and matches snapshot 1`] = ` <ReactStripeCheckout ComponentClass="span" amount={15000} className="StripeCheckout" currency="USD" - description="Order of 3 Items From Sick Fits" + description="Order of 3 items!" email="Delmer.Smith@yahoo.com" image="dog-small.jpg" label="Pay With Card" locale="auto" - name="Sick Fits Haul" + name="Sick Fits" reconfigureOnUpdate={false} - stripeKey="pk_lclTtThFp8CnO3QtEZSd8HA9mFUps" + stripeKey="pk_test_Vtknn6vSdcZWSG2JWvEiWSqC" token={[Function]} triggerEvent="onClick" > |
