Open zinaelnahel opened 3 months ago
Hey @zinaelnahel, we don't have a sophesticated way to updated the screenshots via reporter the this point.
What this library currently does is, users can pass in a parameter during the assertion to let the library know to automatically replace the current screenshot to the s3 bucket.
await playShot.assertPage({
update: true,
});
Ah ok so we can not see it in the report and then choose to approve or disapprove via a button in the playwright report
Ah no, it not feasible with the current playwright reported. We need to create a custom reporter to able to achieve that.
Hi Sudharsan , first of all great work. Second here is my question is there a way to use this library without this adapter part because I already have the S3 bucket part working and the screenshots as well as the report are deployed there. I just want to import the PlayShotMatcher and use it directly is that possible ? import { test as BaseTest, expect } from '@playwright/test'; import { PlayShot } from 'playwright-cloud-visuals';
const playshot = new PlayShot({ adapter: s3Adapter, // or sshAdapter for SFTP remotePathDelimiter: 'screenshots', });
const test = BaseTest.extend <{ playShot: PlayShotMatcher }> { playShot: async ({ page }, use, testInfo) => { await use(playshot.createMatcher(page, testInfo)); }, };
export default test; Also does the button to disapprove or approve the new different screenshot appear on the playwright report or are you generating a customized report ? Thanks in advance for your reply