Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
fixed debugging messaged
  • Loading branch information
forsti0506 committed Aug 26, 2021
1 parent 654ca7f commit d105bf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/utils/make-sreenshots-with-errors-borderd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function makeScreenshotsWithErrorsBorderd(
for (const node of result.nodes) {
if (!savedScreenshotHtmls.includes(node.html)) {
const isVisible = await page.evaluate(
async (elementSelector, debugMode) => {
async (elementSelector, debugMode, currentMapObjectCount) => {
const dom: Element = document.querySelector(elementSelector);
let elementVisible = false;
if (dom) {
Expand Down Expand Up @@ -97,7 +97,7 @@ export async function makeScreenshotsWithErrorsBorderd(
window.scrollBy(0, -adjustScrollingBehindFixed);
}

window.debug(config.debugMode, '(Count:' + currentMapObject.count + ')Adding border to: ' + JSON.stringify(node.target[0]));
window.debug(debugMode, '(Count:' + currentMapObjectCount + '). Adding border to: ' + JSON.stringify(elementSelector));

if (dom.tagName === 'A') {
dom.setAttribute(
Expand Down Expand Up @@ -126,7 +126,7 @@ export async function makeScreenshotsWithErrorsBorderd(
return elementVisible;
},
node.target[0],
config.debugMode,
config.debugMode, currentMapObject.count
);
if(isVisible) {
const image = currentMapObject.id + '_' + currentMapObject.count + '.png';
Expand Down

0 comments on commit d105bf3

Please sign in to comment.