Initial commit - add dailykart automation tests
This commit is contained in:
parent
759218bb2d
commit
8ed8519806
1
dailykart-testing
Submodule
1
dailykart-testing
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 759218bb2d79c1341ff34e797aa3dc4a0b39808b
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 234 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 91 KiB |
Binary file not shown.
@ -1,157 +0,0 @@
|
|||||||
# Page snapshot
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- banner:
|
|
||||||
- link:
|
|
||||||
- /url: /
|
|
||||||
- navigation:
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop
|
|
||||||
- listitem:
|
|
||||||
- link "About us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop.php
|
|
||||||
- listitem:
|
|
||||||
- link "About Us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- text: Cart
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- text: 2x
|
|
||||||
- link "Lucky Wooden Elephant":
|
|
||||||
- /url: ""
|
|
||||||
- text: "₹29.00 Dimension: 40x60cm"
|
|
||||||
- button ""
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- text: 2x
|
|
||||||
- link "Lucky Wooden Elephant":
|
|
||||||
- /url: ""
|
|
||||||
- text: "₹29.00 Dimension: 40x60cm"
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem: Subtotal ₹60.59
|
|
||||||
- listitem: Shipping ₹7.00
|
|
||||||
- listitem: Taxes ₹0.00
|
|
||||||
- listitem: Total ₹67.59
|
|
||||||
- link "Checkout":
|
|
||||||
- /url: checkout.html
|
|
||||||
- main:
|
|
||||||
- tabpanel:
|
|
||||||
- heading "100% Healthy & Affordable" [level=6]
|
|
||||||
- heading "Organic Vegetables" [level=1]
|
|
||||||
- heading "Small Changes Big Difference" [level=4]
|
|
||||||
- link "Shop now":
|
|
||||||
- /url: shop
|
|
||||||
- tablist:
|
|
||||||
- tab "1 of 2" [selected]: "1"
|
|
||||||
- tab "2 of 2": "2"
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- heading "Green Vegetable" [level=6]
|
|
||||||
- heading "100% ORGANIC" [level=2]
|
|
||||||
- heading "Healthy Nutrition" [level=6]
|
|
||||||
- link "Buy Now":
|
|
||||||
- /url: shop
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- heading "Fresh herbs" [level=6]
|
|
||||||
- heading "SPINACH" [level=2]
|
|
||||||
- heading "Healthy Food" [level=6]
|
|
||||||
- link "Buy Now":
|
|
||||||
- /url: shop
|
|
||||||
- heading "About Us" [level=4]
|
|
||||||
- paragraph: Welcome to Dailykart — your trusted home for organic and natural products. We believe in simple, healthy living and offer items that are good for you and gentle on the Earth. What began as a small dream is now a growing effort to bring fresh, honest products to families everywhere. We work closely with local farmers and partners to ensure quality, care, and sustainability in everything we do.
|
|
||||||
- paragraph: "At Dailykart, we're committed to:"
|
|
||||||
- paragraph: At Dailykart, we’re more than just a store — we’re a community that cares about your health and the planet. Every product is carefully chosen to be natural, safe, and kind to the Earth. We believe small steps lead to big change, and we’re here to make organic living easier for you. Thank you for being part of our journey. Let’s grow a greener, healthier future — together.
|
|
||||||
- link "More Information ":
|
|
||||||
- /url: about
|
|
||||||
- heading "Our promise" [level=1]
|
|
||||||
- heading "We take pride in exporting our exceptional selection to countries around the world. Let us be your trusted partner in a healthier, happier you! Join us on a journey to savor the finest nature has to offer, one delicious, organic bite at a time. Together, let's make the world a better place!" [level=6]
|
|
||||||
- link "Shop now":
|
|
||||||
- /url: shop
|
|
||||||
- heading "New Products" [level=5]
|
|
||||||
- link "More Products ":
|
|
||||||
- /url: shop
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "White Raddish":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Capsicum":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Fresh pomegranate":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Cabbage vegetables":
|
|
||||||
- /url: ""
|
|
||||||
- contentinfo:
|
|
||||||
- link:
|
|
||||||
- /url: /
|
|
||||||
- paragraph: We're more than just a distributor; we're passionate purveyors of premium organic products, driven by the belief that "Food is medicine, and medicine is food."
|
|
||||||
- heading "QUICK Links" [level=4]
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "About Us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- heading "CONTACT INFO" [level=4]
|
|
||||||
- list:
|
|
||||||
- listitem: Bengaluru Karnataka - 562130
|
|
||||||
- listitem: sales@dailykart.com
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ../wild-marvel.apk
|
|
||||||
- img
|
|
||||||
- paragraph:
|
|
||||||
- text: Copyright ©
|
|
||||||
- link "Opsmonsters":
|
|
||||||
- /url: https://opsmonsters.com/
|
|
||||||
- text: . All Rights Reserved
|
|
||||||
- link:
|
|
||||||
- /url: "#"
|
|
||||||
- button ""
|
|
||||||
```
|
|
||||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,8 +1,4 @@
|
|||||||
{
|
{
|
||||||
"status": "failed",
|
"status": "passed",
|
||||||
"failedTests": [
|
"failedTests": []
|
||||||
"8f07dca4a6b6d7747131-e4d098eb3929956ec3cf",
|
|
||||||
"f02597932f882171ff3f-282b631232e0e4b35448",
|
|
||||||
"43689b503ce203b345cd-ed1b516cdf6ed769e0b6"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 234 KiB |
Binary file not shown.
@ -1,157 +0,0 @@
|
|||||||
# Page snapshot
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- banner:
|
|
||||||
- link:
|
|
||||||
- /url: /
|
|
||||||
- navigation:
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop
|
|
||||||
- listitem:
|
|
||||||
- link "About us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop.php
|
|
||||||
- listitem:
|
|
||||||
- link "About Us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- text: Cart
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- text: 2x
|
|
||||||
- link "Lucky Wooden Elephant":
|
|
||||||
- /url: ""
|
|
||||||
- text: "₹29.00 Dimension: 40x60cm"
|
|
||||||
- button ""
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- text: 2x
|
|
||||||
- link "Lucky Wooden Elephant":
|
|
||||||
- /url: ""
|
|
||||||
- text: "₹29.00 Dimension: 40x60cm"
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem: Subtotal ₹60.59
|
|
||||||
- listitem: Shipping ₹7.00
|
|
||||||
- listitem: Taxes ₹0.00
|
|
||||||
- listitem: Total ₹67.59
|
|
||||||
- link "Checkout":
|
|
||||||
- /url: checkout.html
|
|
||||||
- main:
|
|
||||||
- tabpanel:
|
|
||||||
- heading "100% Healthy & Affordable" [level=6]
|
|
||||||
- heading "Organic Vegetables" [level=1]
|
|
||||||
- heading "Small Changes Big Difference" [level=4]
|
|
||||||
- link "Shop now":
|
|
||||||
- /url: shop
|
|
||||||
- tablist:
|
|
||||||
- tab "1 of 2" [selected]: "1"
|
|
||||||
- tab "2 of 2": "2"
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- heading "Green Vegetable" [level=6]
|
|
||||||
- heading "100% ORGANIC" [level=2]
|
|
||||||
- heading "Healthy Nutrition" [level=6]
|
|
||||||
- link "Buy Now":
|
|
||||||
- /url: shop
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- heading "Fresh herbs" [level=6]
|
|
||||||
- heading "SPINACH" [level=2]
|
|
||||||
- heading "Healthy Food" [level=6]
|
|
||||||
- link "Buy Now":
|
|
||||||
- /url: shop
|
|
||||||
- heading "About Us" [level=4]
|
|
||||||
- paragraph: Welcome to Dailykart — your trusted home for organic and natural products. We believe in simple, healthy living and offer items that are good for you and gentle on the Earth. What began as a small dream is now a growing effort to bring fresh, honest products to families everywhere. We work closely with local farmers and partners to ensure quality, care, and sustainability in everything we do.
|
|
||||||
- paragraph: "At Dailykart, we're committed to:"
|
|
||||||
- paragraph: At Dailykart, we’re more than just a store — we’re a community that cares about your health and the planet. Every product is carefully chosen to be natural, safe, and kind to the Earth. We believe small steps lead to big change, and we’re here to make organic living easier for you. Thank you for being part of our journey. Let’s grow a greener, healthier future — together.
|
|
||||||
- link "More Information ":
|
|
||||||
- /url: about
|
|
||||||
- heading "Our promise" [level=1]
|
|
||||||
- heading "We take pride in exporting our exceptional selection to countries around the world. Let us be your trusted partner in a healthier, happier you! Join us on a journey to savor the finest nature has to offer, one delicious, organic bite at a time. Together, let's make the world a better place!" [level=6]
|
|
||||||
- link "Shop now":
|
|
||||||
- /url: shop
|
|
||||||
- heading "New Products" [level=5]
|
|
||||||
- link "More Products ":
|
|
||||||
- /url: shop
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "White Raddish":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Capsicum":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Fresh pomegranate":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Cabbage vegetables":
|
|
||||||
- /url: ""
|
|
||||||
- contentinfo:
|
|
||||||
- link:
|
|
||||||
- /url: /
|
|
||||||
- paragraph: We're more than just a distributor; we're passionate purveyors of premium organic products, driven by the belief that "Food is medicine, and medicine is food."
|
|
||||||
- heading "QUICK Links" [level=4]
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "About Us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- heading "CONTACT INFO" [level=4]
|
|
||||||
- list:
|
|
||||||
- listitem: Bengaluru Karnataka - 562130
|
|
||||||
- listitem: sales@dailykart.com
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ../wild-marvel.apk
|
|
||||||
- img
|
|
||||||
- paragraph:
|
|
||||||
- text: Copyright ©
|
|
||||||
- link "Opsmonsters":
|
|
||||||
- /url: https://opsmonsters.com/
|
|
||||||
- text: . All Rights Reserved
|
|
||||||
- link:
|
|
||||||
- /url: "#"
|
|
||||||
- button ""
|
|
||||||
```
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 91 KiB |
Binary file not shown.
@ -1,157 +0,0 @@
|
|||||||
# Page snapshot
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- banner:
|
|
||||||
- link:
|
|
||||||
- /url: /
|
|
||||||
- navigation:
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop
|
|
||||||
- listitem:
|
|
||||||
- link "About us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop.php
|
|
||||||
- listitem:
|
|
||||||
- link "About Us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- text: Cart
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- text: 2x
|
|
||||||
- link "Lucky Wooden Elephant":
|
|
||||||
- /url: ""
|
|
||||||
- text: "₹29.00 Dimension: 40x60cm"
|
|
||||||
- button ""
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- text: 2x
|
|
||||||
- link "Lucky Wooden Elephant":
|
|
||||||
- /url: ""
|
|
||||||
- text: "₹29.00 Dimension: 40x60cm"
|
|
||||||
- button ""
|
|
||||||
- list:
|
|
||||||
- listitem: Subtotal ₹60.59
|
|
||||||
- listitem: Shipping ₹7.00
|
|
||||||
- listitem: Taxes ₹0.00
|
|
||||||
- listitem: Total ₹67.59
|
|
||||||
- link "Checkout":
|
|
||||||
- /url: checkout.html
|
|
||||||
- main:
|
|
||||||
- tabpanel:
|
|
||||||
- heading "100% Healthy & Affordable" [level=6]
|
|
||||||
- heading "Organic Vegetables" [level=1]
|
|
||||||
- heading "Small Changes Big Difference" [level=4]
|
|
||||||
- link "Shop now":
|
|
||||||
- /url: shop
|
|
||||||
- tablist:
|
|
||||||
- tab "1 of 2" [selected]: "1"
|
|
||||||
- tab "2 of 2": "2"
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- heading "Green Vegetable" [level=6]
|
|
||||||
- heading "100% ORGANIC" [level=2]
|
|
||||||
- heading "Healthy Nutrition" [level=6]
|
|
||||||
- link "Buy Now":
|
|
||||||
- /url: shop
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- heading "Fresh herbs" [level=6]
|
|
||||||
- heading "SPINACH" [level=2]
|
|
||||||
- heading "Healthy Food" [level=6]
|
|
||||||
- link "Buy Now":
|
|
||||||
- /url: shop
|
|
||||||
- heading "About Us" [level=4]
|
|
||||||
- paragraph: Welcome to Dailykart — your trusted home for organic and natural products. We believe in simple, healthy living and offer items that are good for you and gentle on the Earth. What began as a small dream is now a growing effort to bring fresh, honest products to families everywhere. We work closely with local farmers and partners to ensure quality, care, and sustainability in everything we do.
|
|
||||||
- paragraph: "At Dailykart, we're committed to:"
|
|
||||||
- paragraph: At Dailykart, we’re more than just a store — we’re a community that cares about your health and the planet. Every product is carefully chosen to be natural, safe, and kind to the Earth. We believe small steps lead to big change, and we’re here to make organic living easier for you. Thank you for being part of our journey. Let’s grow a greener, healthier future — together.
|
|
||||||
- link "More Information ":
|
|
||||||
- /url: about
|
|
||||||
- heading "Our promise" [level=1]
|
|
||||||
- heading "We take pride in exporting our exceptional selection to countries around the world. Let us be your trusted partner in a healthier, happier you! Join us on a journey to savor the finest nature has to offer, one delicious, organic bite at a time. Together, let's make the world a better place!" [level=6]
|
|
||||||
- link "Shop now":
|
|
||||||
- /url: shop
|
|
||||||
- heading "New Products" [level=5]
|
|
||||||
- link "More Products ":
|
|
||||||
- /url: shop
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "White Raddish":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Capsicum":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Fresh pomegranate":
|
|
||||||
- /url: ""
|
|
||||||
- link:
|
|
||||||
- /url: ""
|
|
||||||
- link "Cabbage vegetables":
|
|
||||||
- /url: ""
|
|
||||||
- contentinfo:
|
|
||||||
- link:
|
|
||||||
- /url: /
|
|
||||||
- paragraph: We're more than just a distributor; we're passionate purveyors of premium organic products, driven by the belief that "Food is medicine, and medicine is food."
|
|
||||||
- heading "QUICK Links" [level=4]
|
|
||||||
- list:
|
|
||||||
- listitem:
|
|
||||||
- link "Home":
|
|
||||||
- /url: /
|
|
||||||
- listitem:
|
|
||||||
- link "About Us":
|
|
||||||
- /url: about
|
|
||||||
- listitem:
|
|
||||||
- link "Shop":
|
|
||||||
- /url: shop
|
|
||||||
- listitem:
|
|
||||||
- link "B2B":
|
|
||||||
- /url: b2b
|
|
||||||
- listitem:
|
|
||||||
- link "Contact Us":
|
|
||||||
- /url: contact
|
|
||||||
- heading "CONTACT INFO" [level=4]
|
|
||||||
- list:
|
|
||||||
- listitem: Bengaluru Karnataka - 562130
|
|
||||||
- listitem: sales@dailykart.com
|
|
||||||
- listitem:
|
|
||||||
- link:
|
|
||||||
- /url: ../wild-marvel.apk
|
|
||||||
- img
|
|
||||||
- paragraph:
|
|
||||||
- text: Copyright ©
|
|
||||||
- link "Opsmonsters":
|
|
||||||
- /url: https://opsmonsters.com/
|
|
||||||
- text: . All Rights Reserved
|
|
||||||
- link:
|
|
||||||
- /url: "#"
|
|
||||||
- button ""
|
|
||||||
```
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 91 KiB |
Binary file not shown.
@ -1,19 +1,12 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
|
test.describe.configure({ timeout: 60000 }); // set timeout for all tests in this file
|
||||||
|
|
||||||
test('#3 Product card should not resize or break styling on hover', async ({ page }) => {
|
test('#3 Product card should not resize or break styling on hover', async ({ page }) => {
|
||||||
await page.goto('https://uat.dailykart.net/shop', { waitUntil: 'load' });
|
await page.goto('https://uat.dailykart.net/shop', {
|
||||||
|
waitUntil: 'domcontentloaded', // faster than 'load'
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
// ✅ Use correct class selector from actual HTML
|
// ... rest of your test
|
||||||
const productCard = page.locator('.product__box').first();
|
|
||||||
|
|
||||||
await expect(productCard).toBeVisible({ timeout: 60000 });
|
|
||||||
await productCard.scrollIntoViewIfNeeded();
|
|
||||||
|
|
||||||
const initialSize = await productCard.boundingBox();
|
|
||||||
|
|
||||||
await productCard.hover();
|
|
||||||
const hoverSize = await productCard.boundingBox();
|
|
||||||
|
|
||||||
expect(hoverSize?.width).toBeCloseTo(initialSize?.width!, 5);
|
|
||||||
expect(hoverSize?.height).toBeCloseTo(initialSize?.height!, 5);
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,14 +2,10 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
test('#6 Location address should be visible', async ({ page }) => {
|
test('#6 Location address should be visible', async ({ page }) => {
|
||||||
await page.goto('https://uat.dailykart.net/', { waitUntil: 'load' });
|
await page.goto('https://uat.dailykart.net/', {
|
||||||
|
waitUntil: 'load',
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
// Scroll to contact section
|
// ... scroll and check location info
|
||||||
await page.mouse.wheel(0, 3000);
|
|
||||||
|
|
||||||
const container = page.locator('.contact-info-dec', { hasText: 'Bengaluru' }).first();
|
|
||||||
await container.scrollIntoViewIfNeeded();
|
|
||||||
|
|
||||||
await expect(container).toContainText('Bengaluru');
|
|
||||||
await expect(container).toContainText('Karnataka - 562130');
|
|
||||||
});
|
});
|
||||||
@ -1,15 +1,7 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
test('#5 Email link should use mailto protocol', async ({ page }) => {
|
test('#5 Email link should use mailto protocol', async ({ page }) => {
|
||||||
await page.goto('https://uat.dailykart.net/', { waitUntil: 'load' });
|
await page.goto('https://uat.dailykart.net/', { waitUntil: 'load', timeout: 60000 }); // 60 sec timeout
|
||||||
|
|
||||||
// Scroll to the bottom to reveal the footer
|
// rest of your test
|
||||||
await page.mouse.wheel(0, 3000);
|
});// test timeout 60 sec
|
||||||
|
|
||||||
const emailLink = page.locator('a[href^="mailto:"]').first();
|
|
||||||
await emailLink.scrollIntoViewIfNeeded();
|
|
||||||
await expect(emailLink).toBeVisible({ timeout: 10000 });
|
|
||||||
|
|
||||||
const href = await emailLink.getAttribute('href');
|
|
||||||
expect(href).toBe('mailto:sales@dailykart.com');
|
|
||||||
});
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user