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

Fix/collected assertion layout check #432

Merged
merged 5 commits into from
Jun 12, 2024

Conversation

TobiasAdler
Copy link
Collaborator

@TobiasAdler TobiasAdler commented Jun 10, 2024

Description

The images of a layout check (actual, difference and expected) were wrongly assigned when one or multiple layout checks were performed in one testcase using CONTROL.collectAssertions with the LayoutCheck methods assertScreenshot or assertImage. The wrong linking of the layoutCheckContext and the errorContext could even happen if the layout check itself was passed.

Example:

@Test
public void test_layoutCheck() {
    CONTROL.collectAssertions(() -> {
                LayoutCheck.assertImage(absoluteFile1, "image1", 1.0f);
                LayoutCheck.assertImage(absoluteFile2, "image2", 1.0f);
                LayoutCheck.assertImage(absoluteFile3, "image3", 1.0f);
            }
    );
}

Report:

first assertion: no images
second assertion: images of the first assertion
third assertion: images of the second assertion

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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

@TobiasAdler TobiasAdler marked this pull request as draft June 11, 2024 08:22
@TobiasAdler TobiasAdler marked this pull request as ready for review June 11, 2024 12:43
@martingrossmann martingrossmann merged commit 9e4ca02 into master Jun 12, 2024
@martingrossmann martingrossmann deleted the fix/collected-assertion_layout-check branch June 12, 2024 05:43
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.

2 participants