This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
AP-1335 Fix MenuItem
s not being truncated properly
#158
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2e3fe79
💄 update MenuItem to allow truncation
justinanastos 2c29b01
Share `PerformUserInteraction` component across tests
justinanastos 3ff8236
Hopefully fix flake in ConfirmationTooltip story
justinanastos 727fd31
Add story for truncated menu item text
justinanastos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, will these always trigger the new state before the snapshot is taken? I like this a lot better than testing only props. Would love to use this pattern in agm as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be incorporated into AGM in https://github.com/mdg-private/engine-frontend/pull/2016.
While I think this is a step in the right direction, it is not an ideal solution still. Chromatic does not have an async rendering feature (https://docs.chromaticqa.com/resource-loading#asynchronous-rendering), so we have to manually add
{ chromatic: { delay: number } }
as the second argument to.add
. @timbotnik suggested I write a blog post on this and gently nudge the chromatic team to offer the ability to programmatically delay snapshots until something has happened, which I think we be awesome.All that being said, I'm ok adding a 2 second delay to a chromatic capture since they all run in parallel and this would enable us to write less magic props to force component states.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer your question more succinctly
No, it will not. We have to manually delay the snapshot with a best-guess time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, that makes more sense. I still really like this setup though! Wasnt a huge fan of test props for stories