mirror of
https://github.com/vercel/commerce.git
synced 2025-06-07 16:56:59 +00:00
updated failing header test
This commit is contained in:
parent
4f3b9460f2
commit
b6177c440b
@ -1,5 +0,0 @@
|
||||
{
|
||||
"baseUrl": "http://localhost:3000",
|
||||
"viewportHeight": 1000,
|
||||
"viewportWidth": 1280
|
||||
}
|
@ -11,9 +11,7 @@
|
||||
"dev": "turbo run dev",
|
||||
"start": "turbo run start",
|
||||
"types": "turbo run types",
|
||||
"prettier-fix": "prettier --write .",
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:run": "cypress run"
|
||||
"prettier-fix": "prettier --write ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"cypress": "^9.6.0",
|
||||
|
@ -71,11 +71,11 @@ const ProductCard: FC<Props> = ({
|
||||
/>
|
||||
)}
|
||||
{!noNameTag && (
|
||||
<div className={s.header}>
|
||||
<div className={s.header} data-test="product-card">
|
||||
<h3 className={s.name}>
|
||||
<span>{product.name}</span>
|
||||
<span data-test="product-name">{product.name}</span>
|
||||
</h3>
|
||||
<div className={s.price}>
|
||||
<div className={s.price} data-test="product-price">
|
||||
{`${price} ${product.price?.currencyCode}`}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@ describe("Header", ()=>{
|
||||
it.only("the search bar returns the correct search results", ()=>{
|
||||
cy.getBySel("search-input").eq(0).type("purple{enter}")
|
||||
|
||||
cy.get('[data-test="product-tag"]').within(() => {
|
||||
cy.get('[data-test="product-card"]').within(() => {
|
||||
cy.get('[data-test="product-name"]').should("contain", "Purple dress")
|
||||
cy.get('[data-test="product-price"]').should("contain", "$95.00 AUD")
|
||||
})
|
||||
|
@ -9,7 +9,9 @@
|
||||
"analyze": "BUNDLE_ANALYZE=both next build",
|
||||
"lint": "next lint",
|
||||
"prettier-fix": "prettier --write .",
|
||||
"find:unused": "npx next-unused"
|
||||
"find:unused": "npx next-unused",
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:run": "cypress run"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
@ -29,6 +31,7 @@
|
||||
"autoprefixer": "^10.4.2",
|
||||
"body-scroll-lock": "^4.0.0-beta.0",
|
||||
"clsx": "^1.1.1",
|
||||
"cypress": "^9.6.1",
|
||||
"email-validator": "^2.0.4",
|
||||
"js-cookie": "^3.0.1",
|
||||
"keen-slider": "^6.6.3",
|
||||
|
Loading…
x
Reference in New Issue
Block a user