Testing GridItem + AddFruit components
This commit is contained in:
23
tests/unit/__snapshots__/AddFruit.spec.js.snap
Normal file
23
tests/unit/__snapshots__/AddFruit.spec.js.snap
Normal file
@@ -0,0 +1,23 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Test AddFruit component. takes a snapshot of the component. 1`] = `
|
||||
<div class="modal">
|
||||
<h2>New Fruit</h2>
|
||||
<form id="new-fruit">
|
||||
<div class="form-field"><label for="fruit-name">Name</label> <input id="fruit-name" type="text" placeholder="Ex: Banana" required="required"></div>
|
||||
<imageunsplash-stub containerclass="form-field" label="Image" placeholder="Search: strawberry, apple ..." required="true"></imageunsplash-stub>
|
||||
<div class="form-group">
|
||||
<div class="form-field"><label for="fruit-taste">Taste</label> <input id="fruit-taste" type="text" placeholder="Ex: sweet" required="required"></div>
|
||||
<div class="form-field"><label for="fruit-color">Color</label> <input id="fruit-color" type="color" placeholder="Color" required="required"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-field"><label for="fruit-price">Price ($)</label> <input id="fruit-price" type="number" placeholder="Ex: $13" required="required" min="0"></div>
|
||||
<div class="form-field"><label for="fruit-expires">Expiration Date</label> <input id="fruit-expires" type="date" required="required"></div>
|
||||
</div>
|
||||
<div class="form-field"><label for="fruit-description">Description</label> <textarea id="fruit-description" placeholder="Ex: malesuada pellentesque elit eget ..." required="required"></textarea></div>
|
||||
<div class="actions"><button type="button" class="btn btn--cancel">
|
||||
Cancel
|
||||
</button> <button type="submit" class="btn btn--success">Save</button></div>
|
||||
</form>
|
||||
</div>
|
||||
`;
|
||||
18
tests/unit/__snapshots__/GridItem.spec.js.snap
Normal file
18
tests/unit/__snapshots__/GridItem.spec.js.snap
Normal file
@@ -0,0 +1,18 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Test GridItem component. takes a snapshot of the component. 1`] = `
|
||||
<article class="grid-item">
|
||||
<!---->
|
||||
<router-link-stub to="/fruit/3">
|
||||
<div class="thumbnail"><img src="/image/path.jpg" alt="banana"></div>
|
||||
<section>
|
||||
<h3>
|
||||
banana
|
||||
<span class="tag" style="background-color: rgb(118, 62, 68);">Handcrafted</span>
|
||||
</h3>
|
||||
<hr>
|
||||
<p class="price">$907</p>
|
||||
</section>
|
||||
</router-link-stub>
|
||||
</article>
|
||||
`;
|
||||
Reference in New Issue
Block a user