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

#1867 Adjust similarity tolerance for ZoomToArea test #1870

Conversation

ChesterSng
Copy link
Contributor

@ChesterSng ChesterSng commented Apr 12, 2019

Fixes #1867

  1. Updated test slides
  2. Adjusted similarity tolerance from default 0.95 to 0.89 to account for the slight difference in slides generated by ZoomToArea on different machines when there are multiple shapes to zoom into.

Copy link
Contributor

@YuPeiHenry YuPeiHenry left a comment

Choose a reason for hiding this comment

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

The test failed for me. There was a 0.89 similarity.

Test Name: FT_ZoomToAreaTest
Test FullName: Test.FunctionalTest.ZoomToAreaTest.FT_ZoomToAreaTest
Test Source: C:\Users\Admin\Desktop\other_repos\Chester PPL\PowerPointLabs\Test\FunctionalTest\ZoomToAreaTest.cs : line 17
Test Outcome: Failed
Test Duration: 0:00:53.321832

Result StackTrace:
at Test.Util.SlideUtil.IsSameLooking(FileInfo expSlideImage, FileInfo actualSlideImage, Double similarityTolerance) in C:\Users\Admin\Desktop\other_repos\Chester PPL\PowerPointLabs\Test\Util\SlideUtil.cs:line 155
at Test.Util.SlideUtil.IsSameLooking(String expSlideImage, String actualSlideImage, Double similarityTolerance) in C:\Users\Admin\Desktop\other_repos\Chester PPL\PowerPointLabs\Test\Util\SlideUtil.cs:line 144
at Test.Util.SlideUtil.IsSameLooking(Slide expSlide, Slide actualSlide, Double similarityTolerance) in C:\Users\Admin\Desktop\other_repos\Chester PPL\PowerPointLabs\Test\Util\SlideUtil.cs:line 139
at Test.FunctionalTest.ZoomToAreaTest.AssertIsSame(Int32 actualSlideIndex, Int32 expectedSlideIndex) in C:\Users\Admin\Desktop\other_repos\Chester PPL\PowerPointLabs\Test\FunctionalTest\ZoomToAreaTest.cs:line 107
at Test.FunctionalTest.ZoomToAreaTest.AssertAreSame(Int32 actualStartSlideIndex, Int32 expectedStartSlideIndex, Int32 slideCount) in C:\Users\Admin\Desktop\other_repos\Chester PPL\PowerPointLabs\Test\FunctionalTest\ZoomToAreaTest.cs:line 98
at Test.FunctionalTest.ZoomToAreaTest.TestMultipleZoomConfig3() in C:\Users\Admin\Desktop\other_repos\Chester PPL\PowerPointLabs\Test\FunctionalTest\ZoomToAreaTest.cs:line 47
at Test.FunctionalTest.ZoomToAreaTest.FT_ZoomToAreaTest() in C:\Users\Admin\Desktop\other_repos\Chester PPL\PowerPointLabs\Test\FunctionalTest\ZoomToAreaTest.cs:line 21
Result Message: Assert.IsTrue failed. The slides look different. Similarity = 0.893939393939394

@LiXiaoooowei
Copy link
Contributor

Tests passed on PPT2016. Code LGTM!

@leeyh20
Copy link
Contributor

leeyh20 commented Apr 15, 2019

is it due to different resolutions on different machines?

@ChesterSng
Copy link
Contributor Author

@leeyh20 unlikely to be because of resolution, because i adjusted the scaling on the same machine and it gives the same results

Copy link
Contributor

@blewjy blewjy left a comment

Choose a reason for hiding this comment

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

Test is passing for me on PPT2013

@YuPeiHenry
Copy link
Contributor

Test is passing on PPT 2010 and 2016.

@YuPeiHenry YuPeiHenry merged commit 0ddcec6 into PowerPointLabs:dev-release Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants