Skip to content

Commit 7ddac55

Browse files
committed
start from the top
1 parent 21b02db commit 7ddac55

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"webpack": "babel-node ./node_modules/.bin/webpack --progress",
1414
"webpack-base": "babel-node ./node_modules/.bin/webpack --progress --config webpack.base.config.js",
1515
"webpack-button": "babel-node ./node_modules/.bin/webpack --progress --config webpack.button.config.js",
16-
"test": "if [ ! $SKIP_TEST ]; then npm run buttondiff; fi;",
16+
"test": "if [ ! $SKIP_TEST ]; then npm run lint && npm run flow-typed && npm run flow && npm run test-ssr && npm run karma && npm run buttondiff; fi;",
1717
"build": "npm run test && npm run webpack",
1818
"release": "./scripts/publish.sh",
1919
"release:patch": "./scripts/publish.sh patch",

Diff for: test/screenshot/screenshot.test.js

-12
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import { dotifyToString } from './lib/util';
1414
import { diffPNG, readPNG, uploadToImgur } from './lib/image';
1515
import { buttonConfigs } from './config';
1616

17-
console.log(">>> screenshot.test.js top level log")
18-
1917
const IMAGE_DIR = `${ __dirname }/images`;
2018

2119
const DIFF_THRESHOLD = 100;
@@ -27,7 +25,6 @@ const USER_AGENTS = {
2725
jest.setTimeout(120000);
2826

2927
const setupBrowserPage = (async () => {
30-
console.log(">>> screenshot.test.js setupBrowserPage log")
3128
const { browser, page } = await openPage(await webpackCompile(BASE_SCREENSHOT_TEST));
3229

3330
for (const filename of await fs.readdir(IMAGE_DIR)) {
@@ -54,22 +51,17 @@ const total = buttonConfigs.length;
5451
let index = 1;
5552

5653
for (const config of buttonConfigs) {
57-
console.log(">>> screenshot.test.js for loop log")
5854
const filename = config.filename || dotifyToString(config) || 'base';
5955

6056
test(`Render button with ${ filename }`, async () => {
61-
console.log(">>> screenshot.test.js for loop test block log")
6257
const { page } = await setupBrowserPage;
63-
console.log(">>> screenshot.test.js for loop post await setupBrowserPage log")
6458

6559
// fasten up the animation
6660
await page._client.send('Animation.setPlaybackRate', { playbackRate: 12 });
67-
console.log(">>> screenshot.test.js for loop post age._client.send() log")
6861
const filepath = `${ IMAGE_DIR }/${ filename }.png`;
6962
const diffpath = `${ IMAGE_DIR }/${ filename }-old.png`;
7063

7164
const { x, y, width, height } = await page.evaluate(async (options, userAgents) => {
72-
console.log(">>> screenshot.test.js for loop page.evaluate log")
7365

7466
// $FlowFixMe
7567
document.body.innerHTML = '';
@@ -133,7 +125,6 @@ for (const config of buttonConfigs) {
133125
]);
134126

135127
if (existing) {
136-
console.log(">>> screenshot.test.js for loop if (existing) block log")
137128
const delta = await diffPNG(screenshot, existing);
138129

139130
if (delta > DIFF_THRESHOLD) {
@@ -151,12 +142,9 @@ for (const config of buttonConfigs) {
151142
}
152143

153144
} else {
154-
console.log(">>> screenshot.test.js for loop if (existing) else block log")
155145
await screenshot.write(filepath);
156146
}
157-
console.log(`>>> screenshot.test.js for loop pre-increment index log: ${index}`)
158147
index += 1;
159-
console.log(`>>> screenshot.test.js for loop post-increment index log: ${index}`)
160148
console.log(`Generating button screenshot: ${ index } / ${ total }`);
161149
});
162150
}

0 commit comments

Comments
 (0)