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
5 changes: 1 addition & 4 deletions .bemlintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"elementDivider": "__",
"modifierDivider": "--",
"ignore": [
"node_modules",
"dist"
],
"ignore": ["node_modules", "dist"],
"rules": {
"one-block": true,
"one-element": true,
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@ name: Test

on:
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: report
path: backstop_data
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: report
path: backstop_data
29 changes: 29 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: report
path: backstop_data
11 changes: 1 addition & 10 deletions .linthtmlrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,7 @@
"indent-width-cont": true,
"input-radio-req-name": true,
"spec-char-escape": true,
"tag-bans": [
"b",
"i",
"u",
"center",
"style",
"marquee",
"font",
"s"
],
"tag-bans": ["b", "i", "u", "center", "style", "marquee", "font", "s"],
"tag-name-lowercase": true,
"tag-name-match": true,
"tag-self-close": false,
Expand Down
8 changes: 3 additions & 5 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module.exports = {
extends: "@mate-academy/stylelint-config",
plugins: [
"stylelint-scss"
],
rules: {}
extends: '@mate-academy/stylelint-config',
plugins: ['stylelint-scss'],
rules: {},
};
14 changes: 5 additions & 9 deletions backstopConfig.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
'use strict';
// https://github.com/garris/BackstopJS#advanced-scenarios

const backstop = require('@mate-academy/backstop-config');
const { basicScenario } = backstop;

const basic = {
...basicScenario,
url: 'https://johannpdaniel.github.io/layout_stop-watch/',
referenceUrl: 'https://johannpdaniel.github.io/layout_stop-watch/',
testUrl: 'https://johannpdaniel.github.io/layout_stop-watch/',
Comment on lines +8 to +10
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file sets url, referenceUrl, and testUrl to https://johannpdaniel.github.io/layout_stop-watch/. This violates the required correction: "backstopConfig.js must not have url, referenceUrl, or testUrl fields hardcoded to another user’s GitHub Pages site (...) ; they must be replaced with the student’s own GitHub Pages URL for this project (e.g., https://<your_account>.github.io/layout_stop-watch/)". Replace these values with your own GitHub Pages demo URL so Backstop runs against your deployment.

Comment on lines +8 to +10
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This violates the previous review correction: "In backstopConfig.js, the fields url, referenceUrl, and testUrl must not be set to https://johannpdaniel.github.io/layout_stop-watch/; they must be replaced with your own GitHub Pages URL for this repository, e.g. https://<your_account>.github.io/layout_stop-watch/." Replace the three URL values on these lines with your repository's GitHub Pages URL, commit, and re-run CI so Backstop tests target your deployment.

label: 'Elementary test',
selectors: ['body'],
removeSelectors: [
'h1',
],
misMatchThreshold: 0.4,
referenceUrl: basicScenario.referenceUrl + '/stopwatch/',
};

const config = {
...backstop,
fileNameTemplate: '{scenarioLabel}',
onBeforeScript: 'puppet/onBefore.js',
onReadyScript: 'puppet/onReady.js',
viewports: [
{
name: 'tablet_h',
Expand All @@ -40,8 +36,8 @@ const config = {
{
...basic,
label: 'Stopwatch after one circle',
postDOMChangeWait: 12000,
}
postDOMChangeWait: 10000,
},
],
};

Expand Down
14 changes: 0 additions & 14 deletions backstop_data/engine_scripts/cookies.json

This file was deleted.

39 changes: 0 additions & 39 deletions backstop_data/engine_scripts/puppet/clickAndHoverHelper.js

This file was deleted.

32 changes: 0 additions & 32 deletions backstop_data/engine_scripts/puppet/loadCookies.js

This file was deleted.

3 changes: 0 additions & 3 deletions backstop_data/engine_scripts/puppet/onBefore.js

This file was deleted.

24 changes: 0 additions & 24 deletions backstop_data/engine_scripts/puppet/onReady.js

This file was deleted.

25 changes: 25 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<meta
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<title>Stop watch</title>
<link
rel="stylesheet"
href="layout_stop-watch.7ffea227.css"
/>
</head>
<body>
<div class="stopwatch stopwatch--speed-up">
<div class="stopwatch__minutes"></div>
<div class="stopwatch__seconds"></div>
</div>
</body>
</html>
83 changes: 83 additions & 0 deletions docs/layout_stop-watch.6473210e.css

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

1 change: 1 addition & 0 deletions docs/layout_stop-watch.6473210e.css.map

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

Loading