test(pocket): stage push-disabled case in NeedsHomeScreenInstall story - #360
Open
dormouse-bot wants to merge 1 commit into
Open
test(pocket): stage push-disabled case in NeedsHomeScreenInstall story#360dormouse-bot wants to merge 1 commit into
dormouse-bot wants to merge 1 commit into
Conversation
Deploying mouseterm with
|
| Latest commit: |
44da454
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ce523876.mouseterm.pages.dev |
| Branch Preview URL: | https://fix-hosts-story-needs-instal.mouseterm.pages.dev |
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.
Nightly survey finding.
The
NeedsHomeScreenInstallstory inHostsView.stories.tsxset onlyargs: { pushState: 'needs-install' }— byte-identical to thePushNeedsInstallstory a few lines above it — so the two produced the same render and two identical Chromatic snapshots.Worse, its docstring describes a case it never staged: "A definitively push-disabled Server hides the notice so it cannot disagree with the push row beneath it." That behavior is gated in
HostsViewon both conditions:With the default
pushConfigStatus: 'ready'the guard was truthy, so the story rendered the install notice — the opposite of what the docstring claims. AddingpushConfigStatus: 'disabled'makes the story actually stage the documented state: theInstallNoticeis suppressed and each host row instead shows "This server has push notifications disabled." (App.tsx, thepushConfigStatus === 'disabled'branch ofpushCopy). This distinguishes it from bothPushNeedsInstall(notice shown) andPushUnconfigured(pushStateleft atready).No unit test is added: the story itself is the test artifact, and its Chromatic snapshot now captures the notice-hidden state it was always meant to cover. This is a visually-changing PR, so the
UI Testsdiff needs a maintainer's review in Chromatic.