Repository navigation
test(model): add live tests for version history and restore - #167
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.
Summary
Adds two
livetests for version history and restore, which until now were checked only against a fake history. They run the realMarfaServerVersionsagainst a Marfa test instance, so a change in what the server sends, or in how restore writes back, now shows up in theLiveplan.Changes
MAPPTests/MarfaVersionHistoryLiveTests.swift, a suite underLiveMarfaTests(taggedlive, so theUnitplan skips it), following the other live suites'withLibrarypattern. Items are titledMAPPTEST history ...and purged when the test ends.ItemHistoryModeloverMarfaServerVersions, checks the list (two snapshots, oldest first, with the first two texts), restores the oldest version, checks the item's text in the library and on the server, checks the replaced text is now a version of its own, and checks Undo returns the text.Testing
Ran only this suite against the
demotest instance with theLiveplan (-only-testing:MAPPTests/LiveMarfaTests/MarfaVersionHistoryLiveTests): both tests passed, in about 18 seconds in total. A check of the instance's bin afterwards found none of the test's items left. TheUnitplan was not run. Nothing was run in the UI.Notes for reviewers
Tests only, so no release tag is needed. A review of the test file is enough. The history of an item already in the bin is not asserted, because what the server answers there was not part of the brief.
Checklist