-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Proposal] Feature: Keyword search capability for systems #190
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@envyjs/webui': minor | ||
--- | ||
|
||
Added new System capability to allow custom search keywords for traces |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ const isDemo = process.env.DEMO === 'true'; | |
const productionCode = ` | ||
const mockTraces = []; | ||
export default mockTraces; | ||
export function generateLotsOfMockTraces() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💬 Not sure what this is all about, but it wouldn't build without it |
||
return []; | ||
} | ||
export function mockTraceCollection() { | ||
return new Map(); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,6 +201,30 @@ describe('Menu', () => { | |
expect(fn3).not.toHaveBeenCalled(); | ||
}); | ||
|
||
it('should include event object in callback when clicked', async () => { | ||
const { getByRole, getAllByTestId } = render(<Menu label="Menu" items={itemsWithCallback} />); | ||
const menu = getByRole('menu'); | ||
|
||
await act(async () => { | ||
await userEvent.click(menu); | ||
}); | ||
|
||
await act(async () => { | ||
const user = userEvent.setup(); | ||
|
||
const listItems = getAllByTestId('menu-items-item'); | ||
const firstItem = listItems.at(0)!; | ||
|
||
await user.keyboard('{Shift>}'); | ||
await user.keyboard('{Meta>}'); | ||
await user.click(firstItem); | ||
await user.keyboard('{/Shift}'); | ||
await user.keyboard('{/Meta}'); | ||
Comment on lines
+218
to
+222
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💬 In the |
||
}); | ||
|
||
expect(fn1).toHaveBeenCalledWith(expect.objectContaining({ shiftKey: true, metaKey: true })); | ||
}); | ||
|
||
it('should hide items after clicked', async () => { | ||
const { getByRole, getAllByTestId, queryByTestId } = render(<Menu label="Menu" items={items} />); | ||
const menu = getByRole('menu'); | ||
|
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.
💬 Most of these changes it seems were caused by auto formatting. Only real change is the addition of the
getSearchKeywords
documentation