Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] attached image does not display but last image diff error message #33

Open
adamchenwei opened this issue Sep 10, 2019 · 1 comment

Comments

@adamchenwei
Copy link

adamchenwei commented Sep 10, 2019

Note that the snapshot did get taken, but for some reason, Allure did not process it properly from time to time and show the content like below.. Why is that? It happens to first run or twice run while both run with diffs.
Screen Shot 2019-09-10 at 11 41 06 AM

I am not sure if its deal with the fact I am looping the same set of it(xx with difference configuration?
@zaqqaz @bogomya

@andreabisello
Copy link

@adamchenwei i make something like :

        try {
            const selectorScreenshot = await selectorImage.screenshot()
            await expect(selectorScreenshot).toMatchImageSnapshot({
                failureThreshold: 0,
                failureThresholdType: "percent",
                diffDirection: "vertical"
            })
        } catch (error) {
            const selectorScreenshot = await selectorImage.screenshot()
            reporter.addAttachment("imageShouldToBe", selectorScreenshot, "image/png");
            throw new Error(`unable to take screenshot ` + error)
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants