Skip to content

Setting needsSameDimension flag to false isn't validating the difference of text between two locales. #114

Open
@sharath2106

Description

@sharath2106

We are using codeceptjs-resemblehelper to perform visual regression testing for our application that supports multiple locales. We are logging in with users mapped to these locales to achieve this.

Since our page is dynamic and it contains data. We are using I.seeVisualDiffForElement method and find the diff only for the elements that are static in the application. Some translations are rendering elements tad bigger than others.

On executing a negative case where the user belongs to the locale en-GB and compares the image for fr-FR, we see the below error -
The base image is of 65 X 156 and actual image is of 62 X 156. Please use images of same dimensions so as to avoid any unexpected results.

searchBar-en-GB

searchBar-fr-FR

In order to ignore image size, we used the attribute needSameDimensions: false. But unfortunately, after using this attribute in our tests, the screen comparison is not working. The diff is not considered, and the tests are passing even though the locale is completely different.

Can you take a look at this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions