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

Fixes #20

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0809050
start dev
restby Jul 3, 2024
f4c7f17
start dev header
restby Jul 3, 2024
8ba8249
header,add img,fonts,some settings files
restby Jul 3, 2024
5adbfa6
about,section-title,video,add some img
restby Jul 3, 2024
d83a922
start dev price
restby Jul 3, 2024
6322ee7
some edits,price-card,some fix
restby Jul 3, 2024
34ef29a
end dev price
restby Jul 4, 2024
ed7401c
some fix price
restby Jul 4, 2024
bf6b7b3
start PP edits
restby Jul 4, 2024
6aba389
many fixes
restby Jul 4, 2024
39b71cc
fix hero,games
restby Jul 4, 2024
a21c40a
fix PP, end games
restby Jul 4, 2024
615b192
start dev juri
restby Jul 4, 2024
827da94
end juri,some fixes
restby Jul 5, 2024
2589ec1
start dev features
restby Jul 5, 2024
899f3f2
dev features
restby Jul 5, 2024
b503a8f
end features
restby Jul 6, 2024
025dd5f
start dev offers
restby Jul 6, 2024
f1d6887
end offers, some fix btn,feature-card,feature,price-card-hero-juri
restby Jul 8, 2024
1878665
start dev faq
restby Jul 8, 2024
0b5aadc
faq,many PP fixes,colors edits
restby Jul 9, 2024
bceeabc
some fixes
restby Jul 10, 2024
1b0297d
end faq, PP fixes
restby Jul 10, 2024
5369d53
start reviews
restby Jul 10, 2024
0e1f680
end reviews,some fixes
restby Jul 10, 2024
7f3d481
start form
restby Jul 10, 2024
a884cb4
sove fixes
restby Jul 10, 2024
6de6e5f
test fixes
restby Jul 10, 2024
d2bbb2d
many fixes
restby Jul 11, 2024
b6d9416
fa-ing PP
restby Jul 13, 2024
e3489d3
near end
restby Jul 13, 2024
7cbf83b
page-footer, many fixes
restby Jul 15, 2024
9bd8ecc
some fix
restby Jul 15, 2024
c27638f
many fixes js
restby Jul 15, 2024
8390fb6
end fixes
restby Jul 16, 2024
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
4 changes: 2 additions & 2 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module.exports = {
{
resolveNestedSelectors: true,
message: function expected(selectorValue) {
return `Expected class selector "${selectorValue}" to match BEM CSS pattern https://en.bem.info/methodology/css. Selector validation tool: https://regexr.com/3apms`;
},
return `Expected class selector "${selectorValue}" to match BEM CSS pattern https://en.bem.info/methodology/css. Selector validation tool: https://regexr.com/3apms`;
},
},
],
"selector-max-id": 0,
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
npm i
```

5. Запустите проект с помощью
5. Запустите проект с помощью

```shell
npm run dev
Expand All @@ -36,7 +36,7 @@ npm run dev
Запустить тестирование вашего проекта можно с помощью

```shell
npm run test
npm run test
```

Тестовый фреймворк обращается к адресу `localhost:3000` поэтому сервер должен быть запущен с `npm run dev`, запускайте команду тестирования в новом терминале, не закрывая сервер с проектом.
Expand Down
58 changes: 29 additions & 29 deletions engine_scripts/onReady.cjs
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
module.exports = async (page, scenario, vp) => {
console.log('SCENARIO > ' + scenario.label);
console.log('SCENARIO > ' + scenario.label);

// add more ready handlers here...
await page.waitForFunction(() => {
return document.fonts.ready.then(() => {
console.log('Fonts loaded');
return true;
});
// add more ready handlers here...
await page.waitForFunction(() => {
return document.fonts.ready.then(() => {
console.log('Fonts loaded');
return true;
});
});

await page.evaluate((scenario) => {
/** force load lazy images */
const lazyImages = document.querySelectorAll('img[loading="lazy"]');
lazyImages.forEach((i) => {
i.removeAttribute('loading');
});
}, scenario);
await page.evaluate((scenario) => {
/** force load lazy images */
const lazyImages = document.querySelectorAll('img[loading="lazy"]');
lazyImages.forEach((i) => {
i.removeAttribute('loading');
});
}, scenario);

// await require('./clickAndHoverHelper')(page, scenario);
// await require('./clickAndHoverHelper')(page, scenario);

if (scenario.showSelectors) {
await Promise.all(
scenario.showSelectors.map(async (selector) => {
await page
.evaluate((sel) => {
document.querySelectorAll(sel).forEach(s => {
s.style.visibility = 'visible';
});
}, selector);
})
);
}
if (scenario.showSelectors) {
await Promise.all(
scenario.showSelectors.map(async (selector) => {
await page
.evaluate((sel) => {
document.querySelectorAll(sel).forEach(s => {
s.style.visibility = 'visible';
});
}, selector);
})
);
}

await page.waitForTimeout(scenario.delay || 0);
};
await page.waitForTimeout(scenario.delay || 0);
};
22 changes: 11 additions & 11 deletions js.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ module.exports = {
requireSameDimensions: true,
delay: 500
},
/* {
"label": "faq-tab-2",
"url": "http://localhost:3000/index.html",
"referenceUrl": "./figma/index.html",
selectors: [`[data-test="faq"]`],
misMatchThreshold: 1.0,
"onReadyScript": "faq-tab-2.cjs",
requireSameDimensions: true,
delay: 1000
},*/
/* {
"label": "faq-tab-2",
"url": "http://localhost:3000/index.html",
"referenceUrl": "./figma/index.html",
selectors: [`[data-test="faq"]`],
misMatchThreshold: 1.0,
"onReadyScript": "faq-tab-2.cjs",
requireSameDimensions: true,
delay: 1000
},*/
{
"label": "reviews-prev",
"url": "http://localhost:3000/index.html",
Expand Down Expand Up @@ -117,7 +117,7 @@ module.exports = {
"engine": "puppeteer",
"engineOptions": {
"args": ["--no-sandbox"],
"gotoParameters": {"waitUntil": ["load", "networkidle0"], timeout: 10000},
"gotoParameters": { "waitUntil": ["load", "networkidle0"], timeout: 10000 },
},
"asyncCaptureLimit": 10,
"asyncCompareLimit": 50,
Expand Down
80 changes: 40 additions & 40 deletions pp.config.cjs
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
const desktopSections = [
{section: 'hero', misMatchThreshold: 0.7},
{section: 'about', misMatchThreshold: 0.9},
{section: 'price', misMatchThreshold: 0.9},
{section: 'games', misMatchThreshold: 0.9},
{section: 'juri', misMatchThreshold: 0.9},
{section: 'features', misMatchThreshold: 0.8},
{section: 'offers', misMatchThreshold: 0.9},
{section: 'faq', misMatchThreshold: 0.9},
{section: 'reviews', misMatchThreshold: 0.7},
{section: 'form', misMatchThreshold: 0.9},
{section: 'footer', misMatchThreshold: 1.0}
{ section: 'hero', misMatchThreshold: 0.7 },
{ section: 'about', misMatchThreshold: 0.9 },
{ section: 'price', misMatchThreshold: 0.9 },
{ section: 'games', misMatchThreshold: 0.9 },
{ section: 'juri', misMatchThreshold: 0.9 },
{ section: 'features', misMatchThreshold: 0.8 },
{ section: 'offers', misMatchThreshold: 0.9 },
{ section: 'faq', misMatchThreshold: 0.9 },
{ section: 'reviews', misMatchThreshold: 0.7 },
{ section: 'form', misMatchThreshold: 0.9 },
{ section: 'footer', misMatchThreshold: 1.0 }
];

const tabletSections = [
{section: 'hero', misMatchThreshold: 1.0},
{section: 'about', misMatchThreshold: 0.8},
{section: 'price', misMatchThreshold: 0.7},
{section: 'games', misMatchThreshold: 0.8},
{section: 'juri', misMatchThreshold: 0.7},
{section: 'features', misMatchThreshold: 1.6},
{section: 'offers', misMatchThreshold: 0.7},
{section: 'faq', misMatchThreshold: 1.6},
{section: 'reviews', misMatchThreshold: 1.3},
{section: 'form', misMatchThreshold: 1.0},
{section: 'footer', misMatchThreshold: 1.9}
{ section: 'hero', misMatchThreshold: 1.0 },
{ section: 'about', misMatchThreshold: 0.8 },
{ section: 'price', misMatchThreshold: 0.7 },
{ section: 'games', misMatchThreshold: 0.8 },
{ section: 'juri', misMatchThreshold: 0.7 },
{ section: 'features', misMatchThreshold: 1.6 },
{ section: 'offers', misMatchThreshold: 0.7 },
{ section: 'faq', misMatchThreshold: 1.6 },
{ section: 'reviews', misMatchThreshold: 1.3 },
{ section: 'form', misMatchThreshold: 1.0 },
{ section: 'footer', misMatchThreshold: 1.9 }
];

const mobileSections = [
{section: 'hero', misMatchThreshold: 3.7},
{section: 'about', misMatchThreshold: 1.8},
{section: 'price', misMatchThreshold: 0.9},
{section: 'games', misMatchThreshold: 1.1},
{section: 'juri', misMatchThreshold: 0.7},
{section: 'features', misMatchThreshold: 2.7},
{section: 'offers', misMatchThreshold: 1.4},
{section: 'faq', misMatchThreshold: 1.7},
{section: 'reviews', misMatchThreshold: 2.7},
{section: 'form', misMatchThreshold: 1.6},
{section: 'footer', misMatchThreshold: 2.0}
{ section: 'hero', misMatchThreshold: 3.7 },
{ section: 'about', misMatchThreshold: 1.8 },
{ section: 'price', misMatchThreshold: 0.9 },
{ section: 'games', misMatchThreshold: 1.1 },
{ section: 'juri', misMatchThreshold: 0.7 },
{ section: 'features', misMatchThreshold: 2.7 },
{ section: 'offers', misMatchThreshold: 1.4 },
{ section: 'faq', misMatchThreshold: 1.7 },
{ section: 'reviews', misMatchThreshold: 2.7 },
{ section: 'form', misMatchThreshold: 1.6 },
{ section: 'footer', misMatchThreshold: 2.0 }
];

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

const URL = 'http://localhost:3000/index.html';
Expand Down Expand Up @@ -91,9 +91,9 @@ module.exports = {
scaleToSameSize: false
},
"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')),
...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": {
Expand All @@ -107,7 +107,7 @@ module.exports = {
"engine": "puppeteer",
"engineOptions": {
"args": ["--no-sandbox"],
"gotoParameters": {"waitUntil": ["load", "networkidle0"], timeout: 40000},
"gotoParameters": { "waitUntil": ["load", "networkidle0"], timeout: 40000 },
},
"asyncCaptureLimit": 10,
"asyncCompareLimit": 50,
Expand Down
Binary file added source/fonts/AlumniSans-ExtraBold.woff
Binary file not shown.
Binary file added source/fonts/AlumniSans-ExtraBold.woff2
Binary file not shown.
Binary file added source/fonts/AlumniSans-SemiBold.woff
Binary file not shown.
Binary file added source/fonts/AlumniSans-SemiBold.woff2
Binary file not shown.
Binary file added source/fonts/RobotoCondensed-Bold.woff
Binary file not shown.
Binary file added source/fonts/RobotoCondensed-Bold.woff2
Binary file not shown.
Binary file added source/fonts/RobotoCondensed-Light.woff
Binary file not shown.
Binary file added source/fonts/RobotoCondensed-Light.woff2
Binary file not shown.
Binary file added source/fonts/RobotoCondensed-Regular.woff
Binary file not shown.
Binary file added source/fonts/RobotoCondensed-Regular.woff2
Binary file not shown.
Binary file added source/img/action-desktop.jpg
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/action-desktop.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/action-mobile.jpg
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/action-mobile.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/action-tablet.jpg
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/action-tablet.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/avatar.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/avatar.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/decor-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/decor-desktop.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/decor-tablet.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/decor-tablet.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/games-desktop.jpg
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/games-desktop.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/games-mobile.jpg
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/games-mobile.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/games-tablet.jpg
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/games-tablet.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/gym-desktop.jpg
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/gym-desktop.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/gym-mobile.jpg
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/gym-mobile.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/gym-tablet.jpg
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/gym-tablet.webp
Binary file not shown.
Binary file added source/img/[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/[email protected]
Binary file not shown.
Binary file added source/img/hero-desktop.jpg
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/hero-desktop.webp
Binary file not shown.
Binary file added source/img/[email protected]
Binary file added source/img/[email protected]
Binary file not shown.
Binary file added source/img/hero-tablet.jpg
Binary file added source/img/hero-tablet.webp
Binary file not shown.
Binary file added source/img/[email protected]
Binary file added source/img/[email protected]
Binary file not shown.
Binary file added source/img/juri/juri-1.jpg
Binary file added source/img/juri/juri-1.webp
Binary file not shown.
Binary file added source/img/juri/[email protected]
Binary file added source/img/juri/[email protected]
Binary file not shown.
Binary file added source/img/juri/juri-2.jpg
Binary file added source/img/juri/juri-2.webp
Binary file not shown.
Binary file added source/img/juri/[email protected]
Binary file added source/img/juri/[email protected]
Binary file not shown.
Binary file added source/img/juri/juri-3.jpg
Binary file added source/img/juri/juri-3.webp
Binary file not shown.
Binary file added source/img/juri/[email protected]
Binary file added source/img/juri/[email protected]
Binary file not shown.
Binary file added source/img/juri/juri-4.jpg
Binary file added source/img/juri/juri-4.webp
Binary file not shown.
Binary file added source/img/juri/[email protected]
Binary file added source/img/juri/[email protected]
Binary file not shown.
3 changes: 3 additions & 0 deletions source/img/sprite/icon-arrow.svg
3 changes: 3 additions & 0 deletions source/img/sprite/icon-minus.svg
3 changes: 3 additions & 0 deletions source/img/sprite/icon-play.svg
3 changes: 3 additions & 0 deletions source/img/sprite/icon-plus.svg
5 changes: 5 additions & 0 deletions source/img/sprite/icon-rubble.svg
15 changes: 0 additions & 15 deletions source/img/sprite/logo.svg
Diff not rendered.
3 changes: 3 additions & 0 deletions source/img/sprite/ok.svg
3 changes: 3 additions & 0 deletions source/img/sprite/reddit.svg
5 changes: 0 additions & 5 deletions source/img/sprite/user.svg
Diff not rendered.
3 changes: 3 additions & 0 deletions source/img/sprite/vk.svg
Loading