|
@@ -99,4 +99,29 @@ describe('Performance > Transaction Spans', function () {
|
|
|
expect(handleOpChange).toHaveBeenCalledTimes(1);
|
|
|
expect(handleOpChange).toHaveBeenCalledWith('op1');
|
|
|
});
|
|
|
+
|
|
|
+ it('shows op being filtered on', async function () {
|
|
|
+ MockApiClient.addMockResponse({
|
|
|
+ url: '/organizations/org-slug/events-span-ops/',
|
|
|
+ body: [{op: 'op1'}, {op: 'op2'}],
|
|
|
+ });
|
|
|
+
|
|
|
+ const initialData = initializeData({query: {spanOp: 'op1'}});
|
|
|
+
|
|
|
+ const handleOpChange = jest.fn();
|
|
|
+
|
|
|
+ mountWithTheme(
|
|
|
+ <OpsFilter
|
|
|
+ location={initialData.router.location}
|
|
|
+ eventView={createEventView(initialData.router.location)}
|
|
|
+ organization={initialData.organization}
|
|
|
+ handleOpChange={handleOpChange}
|
|
|
+ transactionName="Test Transaction"
|
|
|
+ />,
|
|
|
+ {context: initialData.routerContext}
|
|
|
+ );
|
|
|
+
|
|
|
+ const filter = (await screen.findByText('Filter -')).parentElement;
|
|
|
+ expect(filter).toHaveTextContent('Filter - op1');
|
|
|
+ });
|
|
|
});
|