{"action":"created","issue":{"url":"https://api.github.com/repos/NimaSoroush/differencify/issues/74","repository_url":"https://api.github.com/repos/NimaSoroush/differencify","labels_url":"https://api.github.com/repos/NimaSoroush/differencify/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/NimaSoroush/differencify/issues/74/comments","events_url":"https://api.github.com/repos/NimaSoroush/differencify/issues/74/events","html_url":"https://github.com/NimaSoroush/differencify/issues/74","id":325327549,"number":74,"title":"target.toMatchSnapshot() not behaving as expected","user":{"login":"tankalaharish","id":39305405,"avatar_url":"https://avatars1.githubusercontent.com/u/39305405?v=4","gravatar_id":"","url":"https://api.github.com/users/tankalaharish","html_url":"https://github.com/tankalaharish","followers_url":"https://api.github.com/users/tankalaharish/followers","following_url":"https://api.github.com/users/tankalaharish/following{/other_user}","gists_url":"https://api.github.com/users/tankalaharish/gists{/gist_id}","starred_url":"https://api.github.com/users/tankalaharish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tankalaharish/subscriptions","organizations_url":"https://api.github.com/users/tankalaharish/orgs","repos_url":"https://api.github.com/users/tankalaharish/repos","events_url":"https://api.github.com/users/tankalaharish/events{/privacy}","received_events_url":"https://api.github.com/users/tankalaharish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-22T14:44:48Z","updated_at":"2018-05-22T16:26:29Z","closed_at":null,"author_association":"NONE","body":"I was trying to do the following:\r\n```\r\n        const target = differencify.init({\r\n          chain: false\r\n        })\r\n        await target.launch({ headless: true })\r\n        const page = await target.newPage()\r\n        await page.setViewport({\r\n          width: 1366,\r\n          height: 766\r\n        })\r\n        await page.goto(key, { waitUntil: 'networkidle0' })\r\n        await page.content()\r\n        const bodyHandle = await page.$('body')\r\n        const { width, height } = await bodyHandle.boundingBox()\r\n        await console.log(width, height)\r\n        const imag = await fs.readFileSync(\r\n          require.resolve('../../snapshots/' + value + '_screenshot.png')\r\n        )\r\n        const result = await target.toMatchSnapshot(imag)\r\n```\r\nHere( imag = local screenshot )and when im trying to match the reference screenshot with the(imag),  the same local screenshot taken earlier is being saved as the present reference snapshot."},"comment":{"url":"https://api.github.com/repos/NimaSoroush/differencify/issues/comments/391054503","html_url":"https://github.com/NimaSoroush/differencify/issues/74#issuecomment-391054503","issue_url":"https://api.github.com/repos/NimaSoroush/differencify/issues/74","id":391054503,"user":{"login":"NimaSoroush","id":7963223,"avatar_url":"https://avatars1.githubusercontent.com/u/7963223?v=4","gravatar_id":"","url":"https://api.github.com/users/NimaSoroush","html_url":"https://github.com/NimaSoroush","followers_url":"https://api.github.com/users/NimaSoroush/followers","following_url":"https://api.github.com/users/NimaSoroush/following{/other_user}","gists_url":"https://api.github.com/users/NimaSoroush/gists{/gist_id}","starred_url":"https://api.github.com/users/NimaSoroush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NimaSoroush/subscriptions","organizations_url":"https://api.github.com/users/NimaSoroush/orgs","repos_url":"https://api.github.com/users/NimaSoroush/repos","events_url":"https://api.github.com/users/NimaSoroush/events{/privacy}","received_events_url":"https://api.github.com/users/NimaSoroush/received_events","type":"User","site_admin":false},"created_at":"2018-05-22T16:26:29Z","updated_at":"2018-05-22T16:26:29Z","author_association":"OWNER","body":"Hey @tankalaharish , Can you post the whole code to demonstrate how you actually make screenshot?\r\nI don't see anywhere in your code call `screenshot` function.\r\n\r\nIf you want a working example of your test, differencify integration tests would probably help. https://github.com/NimaSoroush/differencify/blob/master/src/integration.tests/integration.test.js#L24"}}
{"actor":{"display_login":"NimaSoroush"}}