-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix(core/ix-menu-category): dynamic added items not visible #1706
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 7862bfc The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
…ens/ix into fix/menu-category-new-items
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.
Please add some component tests to verify the fix.
Co-authored-by: Lukas Maurer <[email protected]>
|
packages/core/src/components/menu-category/test/menu-category.ct.ts
Outdated
Show resolved
Hide resolved
|
`); | ||
|
||
await page.locator('ix-menu-expand-icon').click(); | ||
await page.locator('ix-menu-category').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.
This way you don't have to call locator/querySelector multiple times
await page.locator('ix-menu-category').click(); | |
const menuCategory = page.locator('ix-menu-category'); | |
await menuCategory.click(); |
'div.menu-items.menu-items--expanded[style*="opacity: 1"]' | ||
); | ||
|
||
const initialHeight: number | undefined = await page |
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.
Typing not necessary here
const initialHeight: number | undefined = await page | |
const initialHeight = await page |
|
||
expect(initialHeight).toBeDefined(); | ||
expect(newHeight).toBeDefined(); | ||
expect(newHeight).toBeGreaterThan(initialHeight!); |
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.
We should come up with a better assertion criterion. Maybe the exact height we expected?
💡 What is the current behavior?
Dynamic list of items visualized through the ‘ix-menu-item’ in the ‘ix-menu-category’ are not getting updated when new items are added, only after reopening the menu-category the items appear.
GitHub Issue Number: Closes #1606, IX-2202
🆕 What is the new behavior?
🏁 Checklist
A pull request can only be merged if all of these conditions are met (where applicable):
pnpm run docs
)pnpm test
)pnpm lint
)pnpm build
, changes pushed)👨💻 Help & support