Skip to content

Commit

Permalink
Update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
cColds committed Jul 7, 2023
1 parent 94df11d commit 1d5a5e5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 120 deletions.
112 changes: 4 additions & 108 deletions src/__tests__/__snapshots__/home.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,109 +1,5 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`renders home component and matches snapshot 1`] = `
<div>
<section
class="flex max-w-4xl flex-col items-center gap-5 p-12"
>
<h1
class="text-center"
>
Your one-stop destination for all your shopping needs
</h1>
<p
class="text-center text-lg"
>
Discover an unparalleled shopping experience with our extensive selection of products, unbeatable prices, and exceptional customer service. Shop now and transform your shopping journey with us.
</p>
<a
class="w-[150px] overflow-hidden truncate rounded-lg bg-primary-color p-3 text-center font-bold text-white"
href="/store"
>
Shop now
</a>
</section>
<section
class="m-12 flex w-full flex-col items-center bg-slate-50 p-8 shadow-lg"
>
<h2
class="text-center"
>
Featured Items
</h2>
<ul
class="m-8 flex w-full flex-wrap justify-center gap-12 p-8"
>
<li
class="flex cursor-pointer flex-col items-center"
>
<a
aria-label="Slides for $25"
class="w-[200px]"
href="/store/slides"
>
<img
alt="Slides"
class="rounded-tl-lg rounded-tr-lg"
draggable="false"
height="200px"
src="https://cdn.shopify.com/s/files/1/0688/1755/1382/products/slides.jpg?v=1675447358"
width="200px"
/>
<div
class="flex h-24 flex-col gap-1 rounded-bl-lg rounded-br-lg bg-white p-2.5 shadow-lg"
>
<h3
class="truncate"
>
Slides
</h3>
<p
class="truncate"
>
$
25
</p>
</div>
</a>
</li>
<li
class="flex cursor-pointer flex-col items-center"
>
<a
aria-label="Sweatpants for $35"
class="w-[200px]"
href="/store/sweatpants"
>
<img
alt="Sweatpants"
class="rounded-tl-lg rounded-tr-lg"
draggable="false"
height="200px"
src="https://cdn.shopify.com/s/files/1/0688/1755/1382/products/GreenSweatpants01.jpg?v=1675455387"
width="200px"
/>
<div
class="flex h-24 flex-col gap-1 rounded-bl-lg rounded-br-lg bg-white p-2.5 shadow-lg"
>
<h3
class="truncate"
>
Sweatpants
</h3>
<p
class="truncate"
>
$
35
</p>
</div>
</a>
</li>
</ul>
</section>
</div>
`;

exports[`should render home and match snapshot 1`] = `
<div>
<section
Expand All @@ -120,14 +16,14 @@ exports[`should render home and match snapshot 1`] = `
Discover an unparalleled shopping experience with our extensive selection of products, unbeatable prices, and exceptional customer service. Shop now and transform your shopping journey with us.
</p>
<a
class="w-[150px] overflow-hidden truncate rounded-lg bg-primary-color p-3 text-center font-bold text-white"
class="w-[150px] overflow-hidden truncate rounded-lg bg-primary-color p-3 text-center font-bold text-white transition duration-150 ease-in-out active:scale-95"
href="/store"
>
Shop now
</a>
</section>
<section
class="m-12 flex w-full flex-col items-center bg-slate-50 p-8 shadow-lg"
class="flex w-full flex-col items-center bg-slate-50 p-8 shadow-lg"
>
<h2
class="text-center"
Expand All @@ -138,7 +34,7 @@ exports[`should render home and match snapshot 1`] = `
class="m-8 flex w-full flex-wrap justify-center gap-12 p-8"
>
<li
class="flex cursor-pointer flex-col items-center"
class="flex cursor-pointer flex-col items-center transition duration-150 ease-in-out active:scale-95"
>
<a
aria-label="Slides for $25"
Expand Down Expand Up @@ -171,7 +67,7 @@ exports[`should render home and match snapshot 1`] = `
</a>
</li>
<li
class="flex cursor-pointer flex-col items-center"
class="flex cursor-pointer flex-col items-center transition duration-150 ease-in-out active:scale-95"
>
<a
aria-label="Sweatpants for $35"
Expand Down
5 changes: 3 additions & 2 deletions src/__tests__/__snapshots__/item.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ exports[`should render item page and match snapshot 1`] = `
>
<button
aria-label="decrease quantity"
class="transition duration-150 ease-in-out active:scale-95"
disabled=""
>
<svg
Expand All @@ -62,7 +63,7 @@ exports[`should render item page and match snapshot 1`] = `
/>
<button
aria-label="increase quantity"
class="text-2xl"
class="text-2xl transition duration-150 ease-in-out active:scale-95"
>
<svg
fill="currentColor"
Expand All @@ -80,7 +81,7 @@ exports[`should render item page and match snapshot 1`] = `
</button>
</div>
<button
class="w-full overflow-hidden truncate rounded-lg bg-primary-color p-2 text-center text-sm font-bold text-white"
class="w-full overflow-hidden truncate rounded-lg bg-primary-color p-2 text-center text-sm font-bold text-white transition duration-150 ease-in-out active:scale-95"
>
Add to cart
</button>
Expand Down
16 changes: 8 additions & 8 deletions src/__tests__/__snapshots__/nav.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`should render nav and match snapshot 1`] = `
>
<a
aria-label="home page"
class="shrink-0"
class="shrink-0 transition duration-150 ease-in-out active:scale-95"
href="/"
>
<img
Expand All @@ -17,7 +17,7 @@ exports[`should render nav and match snapshot 1`] = `
/>
</a>
<button
class="hidden h-[40px] w-[300px] items-center gap-2 rounded-lg border-[1px] border-slate-200 sm:flex"
class="hidden h-[40px] w-[300px] items-center gap-2 rounded-lg border-[1px] border-slate-200 transition duration-150 ease-in-out active:scale-95 sm:flex"
type="button"
>
<svg
Expand Down Expand Up @@ -48,12 +48,12 @@ exports[`should render nav and match snapshot 1`] = `
class="flex items-center sm:hidden"
>
<button
class="h-[40px] items-center justify-center rounded-lg"
class="transition duration-150 ease-in-out active:scale-95"
type="button"
>
<svg
aria-hidden="true"
class="m-2 mr-0 text-slate-500"
class=" text-slate-500"
fill="currentColor"
height="1em"
stroke="currentColor"
Expand All @@ -69,7 +69,7 @@ exports[`should render nav and match snapshot 1`] = `
</button>
</li>
<li
class="hidden items-center sm:flex"
class="hidden transition duration-150 ease-in-out active:scale-95 sm:flex"
>
<a
href="/"
Expand All @@ -78,7 +78,7 @@ exports[`should render nav and match snapshot 1`] = `
</a>
</li>
<li
class="hidden items-center sm:flex"
class="hidden transition duration-150 ease-in-out active:scale-95 sm:flex"
>
<a
href="/store"
Expand All @@ -90,7 +90,7 @@ exports[`should render nav and match snapshot 1`] = `
class="flex items-center"
>
<button
class="relative"
class="relative transition duration-150 ease-in-out active:scale-95"
>
<svg
class="h-5 w-5"
Expand All @@ -117,7 +117,7 @@ exports[`should render nav and match snapshot 1`] = `
class="flex items-center sm:hidden"
>
<button
class="relative"
class="relative transition duration-150 ease-in-out active:scale-95"
>
<svg
class="h-6 w-6"
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/__snapshots__/store.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`should render store and match snapshot 1`] = `
class="m-8 flex w-full flex-wrap justify-center gap-12 p-8"
>
<li
class="flex cursor-pointer flex-col items-center"
class="flex cursor-pointer flex-col items-center transition duration-150 ease-in-out active:scale-95"
>
<a
aria-label="Slides for $25"
Expand Down Expand Up @@ -42,7 +42,7 @@ exports[`should render store and match snapshot 1`] = `
</a>
</li>
<li
class="flex cursor-pointer flex-col items-center"
class="flex cursor-pointer flex-col items-center transition duration-150 ease-in-out active:scale-95"
>
<a
aria-label="Sweatpants for $35"
Expand Down

0 comments on commit 1d5a5e5

Please sign in to comment.