Skip to content
Open
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
88 changes: 44 additions & 44 deletions pp.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const desktopSections = [
{section: 'gallery', misMatchThreshold: 0.4},
{section: 'form', misMatchThreshold: 0.6},
{section: 'footer', misMatchThreshold: 1.2}
]
];

const tabletSections = [
{section: 'header', misMatchThreshold: 1.3},
Expand All @@ -22,7 +22,7 @@ const tabletSections = [
{section: 'gallery', misMatchThreshold: 0.7},
{section: 'form', misMatchThreshold: 1.2},
{section: 'footer', misMatchThreshold: 1.1},
]
];

const mobileSections = [
{section: 'header', misMatchThreshold: 2.2},
Expand All @@ -35,78 +35,78 @@ const mobileSections = [
{section: 'gallery', misMatchThreshold: 0.7},
{section: 'form', misMatchThreshold: 1.1},
{section: 'footer', misMatchThreshold: 1.1},
]
];

const VIEWPORTS = {
'desktop': {"label": "desktop", "width": 1440, "height": 800},
'tablet': {"label": "tablet", "width": 768, "height": 1024},
'mobile': {"label": "mobile", "width": 320, "height": 480}
'desktop': {'label': 'desktop', 'width': 1440, 'height': 800},
'tablet': {'label': 'tablet', 'width': 768, 'height': 1024},
'mobile': {'label': 'mobile', 'width': 320, 'height': 480}
};

const URL = 'http://localhost:3000/index.html';
const REFERENCE_URL = './figma/index.html';

function generateScenario(section, misMatchThreshold, viewport) {
return {
"label": `${section}`,
"url": URL,
"referenceUrl": REFERENCE_URL,
'label': `${section}`,
'url': URL,
'referenceUrl': REFERENCE_URL,
selectors: [`[data-test="${section}"]`],
misMatchThreshold: misMatchThreshold || 5,
requireSameDimensions: true,
delay: 500,
...viewport ? {"viewports": [VIEWPORTS[viewport]]} : {}
...viewport ? {'viewports': [VIEWPORTS[viewport]]} : {}
};
}

module.exports = {
"id": "tours test-pp",
"onReadyScript": "onReady.cjs",
"onBeforeScript": "onBefore.cjs",
"viewports": [
'id': 'tours test-pp',
'onReadyScript': 'onReady.cjs',
'onBeforeScript': 'onBefore.cjs',
'viewports': [
{
"label": "mobile",
"width": 320,
"height": 480,
'label': 'mobile',
'width': 320,
'height': 480,
},
{
"label": "tablet",
"width": 768,
"height": 1024,
'label': 'tablet',
'width': 768,
'height': 1024,
},
{
"label": "desktop",
"width": 1440,
"height": 800,
'label': 'desktop',
'width': 1440,
'height': 800,
}
],
"resembleOutputOptions": {
"ignoreAntialiasing": true,
"errorType": "movementDifferenceIntensity",
"transparency": 0.3,
'resembleOutputOptions': {
'ignoreAntialiasing': true,
'errorType': 'movementDifferenceIntensity',
'transparency': 0.3,
scaleToSameSize: false
},
"scenarios": [
'scenarios': [
...desktopSections.map(({section, misMatchThreshold}) => generateScenario(section, misMatchThreshold, 'desktop')),
...tabletSections.map(({section, misMatchThreshold}) => generateScenario(section, misMatchThreshold, 'tablet')),
...mobileSections.map(({section, misMatchThreshold}) => generateScenario(section, misMatchThreshold, 'mobile')),
],
fileNameTemplate: '{scenarioLabel}_{viewportLabel}',
"paths": {
"bitmaps_reference": "bitmaps_reference/test-pp",
"bitmaps_test": "backstop_data/bitmaps_test",
"engine_scripts": "engine_scripts",
"html_report": "backstop_data/html_report",
"json_report": "backstop_data/json_report",
'paths': {
'bitmaps_reference': 'bitmaps_reference/test-pp',
'bitmaps_test': 'backstop_data/bitmaps_test',
'engine_scripts': 'engine_scripts',
'html_report': 'backstop_data/html_report',
'json_report': 'backstop_data/json_report',
},
"report": ["browser", "json"],
"engine": "puppeteer",
"engineOptions": {
"args": ["--no-sandbox"],
"gotoParameters": {"waitUntil": ["load", "networkidle0"], timeout: 30000},
'report': ['browser', 'json'],
'engine': 'puppeteer',
'engineOptions': {
'args': ['--no-sandbox'],
'gotoParameters': {'waitUntil': ['load', 'networkidle0'], timeout: 90000},
},
"asyncCaptureLimit": 10,
"asyncCompareLimit": 50,
"debug": false,
"debugWindow": false
}
'asyncCaptureLimit': 10,
'asyncCompareLimit': 50,
'debug': false,
'debugWindow': false
};
Binary file added source/fonts/montserrat-bold.woff
Binary file not shown.
Binary file added source/fonts/montserrat-bold.woff2
Binary file not shown.
Binary file added source/fonts/montserrat-extraBold.woff
Binary file not shown.
Binary file added source/fonts/montserrat-extraBold.woff2
Binary file not shown.
Binary file added source/fonts/montserrat-light.woff
Binary file not shown.
Binary file added source/fonts/montserrat-light.woff2
Binary file not shown.
Binary file added source/fonts/montserrat-medium.woff
Binary file not shown.
Binary file added source/fonts/montserrat-medium.woff2
Binary file not shown.
Binary file added source/fonts/montserrat-regular.woff
Binary file not shown.
Binary file added source/fonts/montserrat-regular.woff2
Binary file not shown.
Binary file added source/fonts/montserrat-semiBold.woff
Binary file not shown.
Binary file added source/fonts/montserrat-semiBold.woff2
Binary file not shown.
Binary file added source/img/about/about-photo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/about/about-photo.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/about/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/about/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/cloud-background/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/cloud-background/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/cloud-background/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/cloud-background/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/cloud-background/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/cloud-background/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/cloud-background/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/cloud-background/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/contacts/map-desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/contacts/map-desktop.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/contacts/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/contacts/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/contacts/map-mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/img/contacts/map-mobile.webp
Binary file added source/img/contacts/[email protected]
Binary file added source/img/contacts/[email protected]
Binary file added source/img/contacts/map-tablet.png
Binary file added source/img/contacts/map-tablet.webp
Binary file added source/img/contacts/[email protected]
Binary file added source/img/contacts/[email protected]
Binary file added source/img/form/forest-background.jpg
Binary file added source/img/form/forest-background.webp
Binary file added source/img/form/[email protected]
Binary file added source/img/form/[email protected]
Binary file added source/img/gallery/cableway.jpg
Binary file added source/img/gallery/cableway.webp
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/campfire.jpg
Binary file added source/img/gallery/campfire.webp
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/compass.jpg
Binary file added source/img/gallery/compass.webp
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/icy-road.jpg
Binary file added source/img/gallery/icy-road.webp
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/one-man.jpg
Binary file added source/img/gallery/one-man.webp
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/tent.jpg
Binary file added source/img/gallery/tent.webp
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/two-men.jpg
Binary file added source/img/gallery/two-men.webp
Binary file added source/img/gallery/[email protected]
Binary file added source/img/gallery/[email protected]
Binary file added source/img/hero/altai-desktop.jpg
Binary file added source/img/hero/altai-desktop.webp
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/altai.jpg
Binary file added source/img/hero/altai.webp
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/caucasus-desktop.jpg
Binary file added source/img/hero/caucasus-desktop.webp
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/caucasus.jpg
Binary file added source/img/hero/caucasus.webp
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/kamchatka-desktop.jpg
Binary file added source/img/hero/kamchatka-desktop.webp
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/kamchatka.jpg
Binary file added source/img/hero/kamchatka.webp
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/photo-card-1.png
Binary file added source/img/hero/photo-card-1.webp
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/photo-card-2.png
Binary file added source/img/hero/photo-card-2.webp
Binary file added source/img/hero/[email protected]
Binary file added source/img/hero/[email protected]
Binary file added source/img/reviewers/alexander-frolov.jpg
Binary file added source/img/reviewers/alexander-frolov.webp
Binary file added source/img/reviewers/[email protected]
Binary file added source/img/reviewers/[email protected]
Binary file added source/img/reviewers/elena-pirogova.jpg
Binary file added source/img/reviewers/elena-pirogova.webp
Binary file added source/img/reviewers/[email protected]
Binary file added source/img/reviewers/[email protected]
Binary file added source/img/reviewers/evgenia-bazhenova.jpg
Binary file added source/img/reviewers/evgenia-bazhenova.webp
Binary file added source/img/reviewers/[email protected]
Binary file added source/img/reviewers/[email protected]
Binary file added source/img/reviewers/ivan-solovyov.jpg
Binary file added source/img/reviewers/ivan-solovyov.webp
Binary file added source/img/reviewers/[email protected]
Binary file added source/img/reviewers/[email protected]
3 changes: 3 additions & 0 deletions source/img/sprite/big-arrow-left.svg
3 changes: 3 additions & 0 deletions source/img/sprite/big-arrow-right.svg
5 changes: 5 additions & 0 deletions source/img/sprite/boots.svg
3 changes: 3 additions & 0 deletions source/img/sprite/cross.svg
3 changes: 3 additions & 0 deletions source/img/sprite/crown.svg
3 changes: 3 additions & 0 deletions source/img/sprite/leaf.svg
5 changes: 5 additions & 0 deletions source/img/sprite/level.svg
15 changes: 0 additions & 15 deletions source/img/sprite/logo.svg
Diff not rendered.
Loading