-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActionBar: Add a few fixes and tests #4536
Conversation
🦋 Changeset detectedLatest commit: 7af6efc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
}) | ||
|
||
// Default state | ||
await page.getByText('Write').click() |
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.
Do we need to press the "Write" tab for the default state? We might want to take the screenshot of the default state first without performing any action.
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.
Oops my bad! we don't need to click it!
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.
No worries, let me know when the snapshots are generated, I'll give another review 😊
@@ -33,3 +33,11 @@ describe('ActionBar', () => { | |||
expect(results).toHaveNoViolations() | |||
}) | |||
}) | |||
|
|||
/* Test suite | |||
1. Did it render all the iconbuttons? |
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.
I remember from UnderlineNav and it was easier to write those visual tests in Playwright than Jest but it is up to you 😊
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.
Yes, I think all the responsive stuff is better off tested in playwright. It's definitely harder(is it even possible?) to wrangle it in jest.
Will make a better division of test cases!
@@ -299,7 +299,7 @@ export const ActionBarIconButton = forwardRef((props: ActionBarIconButtonProps, | |||
const domRect = (ref as MutableRefObject<HTMLElement>).current.getBoundingClientRect() | |||
setChildrenWidth({text, width: domRect.width}) | |||
}, [ref, setChildrenWidth]) | |||
return <IconButton ref={ref} size={size} {...props} variant="invisible" /> | |||
return <IconButton ref={ref} size={size} {...props} variant="invisible" unsafeDisableTooltip={false} /> |
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.
💖
* Add a few fixes and a test plan * Add test for overflow * Add overflow e2e test to actionbar * Add tests * Create mean-terms-bathe.md * test(vrt): update snapshots --------- Co-authored-by: pksjce <pksjce@users.noreply.github.com>
Closes # No particular issue
Changelog
unsafeDisableTooltip
prop for IconButton