Repository navigation
test: allow only one "What's new" deck, in latest - #2110
Open
adnan-bhaldar wants to merge 1 commit into
Open
adnan-bhaldar wants to merge 1 commit into
adnan-bhaldar wants to merge 1 commit into
Conversation
Every_deck_ships_with_its_media_and_texts now asserts a single deck and that its media live under Assets/WhatsNew/latest/, so a release that adds a second deck folder by mistake fails the test instead of shipping. Follow-up to KnifeLemon#1989. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Tip
Start the title with a prefix so the PR is labeled automatically:
feat:fix:docs:ci:build:i18n:Example:
fix(hwp): keep tables when converting to DOCXNote
Please write the title and description in English so reviewers and future contributors can follow the change. Code comments are in English too (see CONTRIBUTING.md).
What does this change?
Follow-up to #1989, as suggested in its review.
Every_deck_ships_with_its_media_and_texts(intests/Filee.App.Tests/WhatsNewTests.cs) still accepted any number of decks and only checked that slide media sit underAssets/WhatsNew/. Since #1989 the rule is "only the newest deck, inlatest/", so the test now enforces that. Test only: no app code, assets or docs change.Assert.NotEmpty(decks)->Assert.Single(decks).SlideDeck.LoadAllreturns one deck for everyslides.jsonit finds underAssets/WhatsNew/.NotEmptypassed for any number of decks, so a release that added a version folder (for example2.7.0/) next tolatest/went unnoticed, and its media would ship in every installer.Singlealso still fails if there is no deck at all, asNotEmptydid..../WhatsNew/->.../WhatsNew/latest/. A slide in the one deck could point at any folder underWhatsNew/. Now its media must be inlatest/, matching the rule inCONTRIBUTING.md.Why
Per the flow in
CONTRIBUTING.md("What's new" slides for a release), a release replaces the files inAssets/WhatsNew/latest/and thewhats_new.latest.*keys, and never adds a folder. Before #1989 each release added a folder named after its version, and old decks piled up although the app only shows the newest. The guard makes sure that rule is not broken by mistake.What stays the same
Slide_media_stay_smalland the otherWhatsNewTestsare unchanged.Type of change
How was it tested?
dotnet format --verify-no-changesdotnet testChecklist
src/Filee.App/Assets/i18n/*.jsonfiles (None Added)THIRD-PARTY-NOTICES.md(None Added)