Repository navigation
Move to the paged document support in Verify 33.3 - #527
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves Verify.DocNet onto the source and derived targets that Verify 33.3 added for paged documents (Verify#1951), and takes the package from 4.0.0 to 5.0.0.
The converter now says which of its targets is the document and which were computed from it. Verify compares the document first, so a file derived from it is only given the benefit of its comparer while the document itself is unchanged, and DiffEngine's viewer shows the files derived from a document beneath it and accepts them with it.
It is a major version because what an existing test suite has to change is listed below.
Verifyand its adapter are pinned at 33.3.0.Migrating from 4.x
Version 5 moves to the paged document support in Verify 33.3. The settings and the file names this package had of its own are replaced by the ones every paged document shares.
Initialize(DocNetOutputs.Png)VerifierSettings.PageText(PageTextPlacement.None)Initialize(DocNetOutputs.Text)VerifierSettings.ExcludeDerivedTargets("png")Initialize(DocNetOutputs.None).PagesToInclude(2).PagesToInclude(2). The same call, now a setting of Verify.SinglePage(0).PagesToInclude(_ => _ == 1). The index was 0 based, a page number is 1 basedEach of the settings of Verify can be applied to one verification or, on
VerifierSettings, to every test.SinglePagethrew for an index past the last page. APagesToIncludethat accepts no page is not an error: no page is rendered or read, and the pdf and the info file are still verified.The snapshot files are renamed:
Tests.Report#pdf.verified.pdfTests.Report.verified.pdfTests.Report#00.verified.pngTests.Report#page_0001.verified.pngTests.Report#01.verified.pngTests.Report#page_0002.verified.pngTests.Report.verified.png, where one page was verifiedTests.Report#page_0001.verified.png, by the number of that pageThe index was 0 based, and was missing where one page was verified. A page is now always named by its 1 based number, which it keeps when other pages are left out.
The content of the pdf and of the page images is unchanged, with one exception: under
PagesToIncludeorSinglePagethe.verified.pdfheld only the pages that were rendered, and it is now always the whole document.Renamed snapshots show as a new file and a pending delete. Accepting both, or running once with AutoVerify, moves a test over. An accepted page image is the one rendered on the machine doing the accepting. Where a comparer has been tolerating a difference in rendering, that image is not byte identical to the committed one, and renaming the files instead leaves them as they are.
The info file keeps its name and has the shape every paged document has: the pdf version under
Document, and each page as itsNumberand itsText.Testing
Built in Release and run with the commands CI uses, against Verify 33.3.0 from nuget.org: 34 passed, 1 skipped.