Repository navigation
Move to the paged document support in Verify 33.3: hidden sheets are read, and a sheet is a page - #154
Merged
Conversation
A hidden sheet is read as any other unless options that are passed in say otherwise, and is named under HiddenSheets in the info file. For an xlsx that includes a sheet only code can unhide, which a reader takes to be shown. PagesToInclude leaves out the csv of a sheet, numbered by where it is among all the sheets of the workbook with hidden sheets counted.
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.Sylvan.Data.Excel onto the source and derived targets that Verify 33.3 added for paged documents (Verify#1951), and takes the package from 1.0.0 to 2.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.Beyond the move
ExcelDataReaderOptionsare used as they are, so with those a hidden sheet is read only whenReadHiddenWorksheetsis set.HiddenSheetsin the info file, whether or not they are read. For an xlsx that includes a sheet only code can unhide, which a reader takes to be shown. For an xlsb or an xls such a sheet is read but not named.PagesToInclude, which was ignored, leaves out the csv of a sheet, numbered by where it is among all the sheets of the workbook with hidden sheets counted. For anExcelDataReaderthat is passed in, the pages are the sheets it has.Migrating from 1.x
Version 2 moves to the source and derived targets of Verify 33.3. The API of this plugin is unchanged. What differs is that the workbook is now a snapshot too, and the name of a csv file, which Verify now decides, as it does for every plugin that has moved:
Tests.Report.verified.xlsxTests.Report.verified.csvTests.Report#Sheet1.verified.csvTests.Report#Sheet1.verified.csvTests.Report.verified.txtHiddenSheetsTests.Report#Sheet2.verified.csv, as any other sheetVerifierSettings.ExcludeTargets("xlsx")keeps the workbook out of the snapshots, as it was in 1.x.A renamed snapshot shows as a new file and a pending delete. Accepting both, or running once with AutoVerify, moves a test over. The content of the csv is unchanged, so source control shows it as a rename.
Two cases that are less common also differ:
Attachment1has#Attachment1.Sheet1.verified.csv, where 1.x did not use the name of the workbook. Passed to a verification as aTarget, its info file takes the name as well:#Attachment1.verified.txt.ExcelDataReaderthat has been moved past its last sheet has no csv. In 1.x it had one, holding only a header row.Testing
Run locally in Debug against Verify 33.3.0 from nuget.org: all tests pass.