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] Ignored area was not actually ignored #98

Closed
mrgoroua opened this issue May 29, 2019 · 5 comments
Closed

[BUG] Ignored area was not actually ignored #98

mrgoroua opened this issue May 29, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mrgoroua
Copy link

mrgoroua commented May 29, 2019

Ignored area was set at rectangle List but at the result image selected area was not excluded from comparison
see image

`@Test
public void testNotEquals() throws IOException {
File resultDestination = new File( "C:\!automation\git\ehopperDevUI\helperfiles\receipts\resultImage.png");

    File ExpectedCash = new File("C:\\!automation\\git\\ehopperDevUI\\helperfiles\\receipts\\ExpectedCash.png");
    File ActualCash = new File("C:\\!automation\\git\\ehopperDevUI\\helperfiles\\receipts\\ActualCash.png");        

    //given
    BufferedImage image1 = readImageFromFile(ExpectedCash);
    BufferedImage image2 = readImageFromFile(ActualCash);
    List<Rectangle> excludedAreas = new ArrayList<>();

    excludedAreas.add(new Rectangle(80, 388, 900, 514));
    excludedAreas.add(new Rectangle(410, 514, 900, 565));
    excludedAreas.add(new Rectangle(410, 636, 900, 754));

    ImageComparison imageComparison = new ImageComparison(image1, image2);
    imageComparison.setExcludedAreas(excludedAreas);

    //when
    ComparisonResult result = imageComparison.compareImages();

    //And Result Image
    BufferedImage resultImage = result.getResult();

    //Image can be saved after comparison, using ImageComparisonUtil.
    ImageComparisonUtil.saveImage(resultDestination, resultImage);

    //then
    assertEquals(result.getComparisonState(), MATCH);


}`
@mrgoroua mrgoroua added the bug Something isn't working label May 29, 2019
@romankh3 romankh3 added this to To do in 3.1.0-Release via automation May 29, 2019
@romankh3
Copy link
Owner

@mrgoroua, please, provide image1 and image2 as files to reproduce it.
You can share it here, in issue or comments.

@mrgoroua
Copy link
Author

mrgoroua commented May 30, 2019

ActualCash

//////////////////////////
ExpectedCash

@mrgoroua
Copy link
Author

mrgoroua commented May 30, 2019

@mrgoroua, please, provide image1 and image2 as files to reproduce it.
You can share it here, in issue or comments.

@romankh3 was it helpful?

@romankh3
Copy link
Owner

@mrgoroua I'm working on it.

@romankh3 romankh3 changed the title Ignored area was not actually ignored [BUG] Ignored area was not actually ignored May 31, 2019
@mrgoroua
Copy link
Author

Fixed

3.1.0-Release automation moved this from To do to Done May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
3.1.0-Release
  
Done
Development

No branches or pull requests

2 participants