Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #4964

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Develop #4964

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added dist/imac.202c52ff.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions dist/index.05cfb865.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.05cfb865.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Catalog</title><link rel="preconnect" href="https://fonts.gstatic.com"><link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet"><link rel="stylesheet" href="index.05cfb865.css"></head><body> <header class="header"> <a href="#" class="logo"> <img src="logo.eddae0ff.png" alt="MOYO Logo"> </a> <nav class="nav"> <ul class="nav__list"> <li class="nav__item"> <a href="#" class="is-active nav__link"> Apple </a> </li> <li class="nav__item"> <a href="#" class="nav__link"> Samsung </a> </li> <li class="nav__item"> <a href="#" class="nav__link"> Smartphones </a> </li> <li class="nav__item"> <a href="#" class="nav__link" data-qa="nav-hover"> Laptops & Computers </a> </li> <li class="nav__item"> <a href="#" class="nav__link"> Gadgets </a> </li> <li class="nav__item"> <a href="#" class="nav__link"> Tablets </a> </li> <li class="nav__item"> <a href="#" class="nav__link"> Photo </a> </li> <li> <a href="#" class="nav__link"> Video </a> </li> </ul> </nav> </header> <main class="catalog"> <div class="product-card" data-qa="card"> <img src="imac.202c52ff.jpeg" alt="imac" class="product-card__image"> <h2 class="product-card__title"> APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) </h2> <p class="product-card__description">Product code: 195434</p> <div class="mark"> <div class="stars stars--4"> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> </div> <p class="mark__reviews">Reviews: 5</p> </div> <div class="price"> <p class="price__word">Price:</p> <p class="price__numeric">$2,199</p> </div> <a href="#" data-qa="card-hover" class="bottom"> BUY </a> </div> <div class="product-card" data-qa="card"> <img src="imac.202c52ff.jpeg" alt="imac" class="product-card__image"> <h2 class="product-card__title"> APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) </h2> <p class="product-card__description">Product code: 195434</p> <div class="mark"> <div class="stars stars--4"> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> </div> <p class="mark__reviews">Reviews: 5</p> </div> <div class="price"> <p class="price__word">Price:</p> <p class="price__numeric">$2,199</p> </div> <a href="#" data-qa="hover" class="bottom"> BUY </a> </div> <div class="product-card" data-qa="card"> <img src="imac.202c52ff.jpeg" alt="imac" class="product-card__image"> <h2 class="product-card__title"> APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) </h2> <p class="product-card__description">Product code: 195434</p> <div class="mark"> <div class="stars stars--4"> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> </div> <p class="mark__reviews">Reviews: 5</p> </div> <div class="price"> <p class="price__word">Price:</p> <p class="price__numeric">$2,199</p> </div> <a href="#" data-qa="hover" class="bottom"> BUY </a> </div> <div class="product-card" data-qa="card"> <img src="imac.202c52ff.jpeg" alt="imac" class="product-card__image"> <h2 class="product-card__title"> APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) </h2> <p class="product-card__description">Product code: 195434</p> <div class="mark"> <div class="stars stars--4"> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> </div> <p class="mark__reviews">Reviews: 5</p> </div> <div class="price"> <p class="price__word">Price:</p> <p class="price__numeric">$2,199</p> </div> <a href="#" data-qa="hover" class="bottom"> BUY </a> </div> <div class="product-card" data-qa="card"> <img src="imac.202c52ff.jpeg" alt="imac" class="product-card__image"> <h2 class="product-card__title"> APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) </h2> <p class="product-card__description">Product code: 195434</p> <div class="mark"> <div class="stars stars--4"> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> </div> <p class="mark__reviews">Reviews: 5</p> </div> <div class="price"> <p class="price__word">Price:</p> <p class="price__numeric">$2,199</p> </div> <a href="#" data-qa="hover" class="bottom"> BUY </a> </div> <div class="product-card" data-qa="card"> <img src="imac.202c52ff.jpeg" alt="imac" class="product-card__image"> <h2 class="product-card__title"> APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) </h2> <p class="product-card__description">Product code: 195434</p> <div class="mark"> <div class="stars stars--4"> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> </div> <p class="mark__reviews">Reviews: 5</p> </div> <div class="price"> <p class="price__word">Price:</p> <p class="price__numeric">$2,199</p> </div> <a href="#" data-qa="hover" class="bottom"> BUY </a> </div> <div class="product-card" data-qa="card"> <img src="imac.202c52ff.jpeg" alt="imac" class="product-card__image"> <h2 class="product-card__title"> APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) </h2> <p class="product-card__description">Product code: 195434</p> <div class="mark"> <div class="stars stars--4"> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> </div> <p class="mark__reviews">Reviews: 5</p> </div> <div class="price"> <p class="price__word">Price:</p> <p class="price__numeric">$2,199</p> </div> <a href="#" data-qa="hover" class="bottom"> BUY </a> </div> <div class="product-card" data-qa="card"> <img src="imac.202c52ff.jpeg" alt="imac" class="product-card__image"> <h2 class="product-card__title"> APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) </h2> <p class="product-card__description">Product code: 195434</p> <div class="mark"> <div class="stars stars--4"> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> <span class="stars__star"></span> </div> <p class="mark__reviews">Reviews: 5</p> </div> <div class="price"> <p class="price__word">Price:</p> <p class="price__numeric">$2,199</p> </div> <a href="#" data-qa="hover" class="bottom"> BUY </a> </div> </main> </body></html>
Binary file added dist/logo.eddae0ff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/report/engine_scripts/cookies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"domain": ".www.yourdomain.com",
"path": "/",
"name": "yourCookieName",
"value": "yourCookieValue",
"expirationDate": 1798790400,
"hostOnly": false,
"httpOnly": false,
"secure": false,
"session": false,
"sameSite": "no_restriction"
}
]
39 changes: 39 additions & 0 deletions dist/report/engine_scripts/puppet/clickAndHoverHelper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = async (page, scenario) => {
var hoverSelector = scenario.hoverSelectors || scenario.hoverSelector;
var clickSelector = scenario.clickSelectors || scenario.clickSelector;
var keyPressSelector = scenario.keyPressSelectors || scenario.keyPressSelector;
var scrollToSelector = scenario.scrollToSelector;
var postInteractionWait = scenario.postInteractionWait; // selector [str] | ms [int]

if (keyPressSelector) {
for (const keyPressSelectorItem of [].concat(keyPressSelector)) {
await page.waitForSelector(keyPressSelectorItem.selector);
await page.type(keyPressSelectorItem.selector, keyPressSelectorItem.keyPress);
}
}

if (hoverSelector) {
for (const hoverSelectorIndex of [].concat(hoverSelector)) {
await page.waitForSelector(hoverSelectorIndex);
await page.hover(hoverSelectorIndex);
}
}

if (clickSelector) {
for (const clickSelectorIndex of [].concat(clickSelector)) {
await page.waitForSelector(clickSelectorIndex);
await page.click(clickSelectorIndex);
}
}

if (postInteractionWait) {
await new Promise(resolve => setTimeout(resolve, postInteractionWait));
}

if (scrollToSelector) {
await page.waitForSelector(scrollToSelector);
await page.evaluate(scrollToSelector => {
document.querySelector(scrollToSelector).scrollIntoView();
}, scrollToSelector);
}
};
Loading
Loading