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

Feature/layout check improvement #314

Merged
merged 5 commits into from
Mar 21, 2023

Conversation

TobiasAdler
Copy link
Collaborator

Description

This PR contains changes to the error claculation of the layout check feature and some changes to the layout check section of current documentation.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules


A layout test with the Testerra utilities is actually a comparison between a reference and the actual state. This is done via the screenshot functionality of Selenium, in which both screenshots (reference and actual) are compared pixel by pixel from top to bottom. In this comparison, a third image is created in which differences (ReferencePixel != ActualPixel) are marked in red.

In case that one image is a different size than the other an <<#_optional_assertions, Optional assertion>> fails, so that an error with the information about the different sizes is displayed in the report but the Layout test will still be fully executed. Testerra then considers only the common pixels of both images as 100%. Pixels that are outside of one or the other image are not included in the error calculation. In the comparison, those Pixels are marked in blue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: ... that one image [has] a different size...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to shorten that chapter:
... than the other [Testerra reports this as an <<#_optional_assertions, optional assertion>>. Testerra considers only the common]...

docs/src/docs/modules/layout-check.adoc Show resolved Hide resolved
docs/src/docs/modules/layout-check.adoc Show resolved Hide resolved
@martingrossmann martingrossmann merged commit c3f1147 into master Mar 21, 2023
@martingrossmann martingrossmann deleted the feature/layout_check-improvement branch March 21, 2023 09:20
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

Successfully merging this pull request may close these issues.

3 participants