diff --git a/packages/elements-core/src/components/Docs/HttpOperation/HttpOperation.spec.tsx b/packages/elements-core/src/components/Docs/HttpOperation/HttpOperation.spec.tsx index 6960f112a..17f8a4385 100644 --- a/packages/elements-core/src/components/Docs/HttpOperation/HttpOperation.spec.tsx +++ b/packages/elements-core/src/components/Docs/HttpOperation/HttpOperation.spec.tsx @@ -621,11 +621,20 @@ describe('HttpOperation', () => { it('should display callback operation', async () => { const { unmount } = render(); + const serversButton = screen.getByRole('button', { name: /server/i }); + userEvent.click(serversButton); + + const enableItem = screen.getByRole('menuitemradio', { name: /development/i }); + userEvent.click(enableItem); + + expect(serversButton).toHaveTextContent('Development'); + //operation name expect(screen.queryByText('newPet')).toBeInTheDocument(); // operation header expect(screen.queryByText('{$request.body#/newPetAvailableUrl}')).toBeInTheDocument(); + expect(screen.queryAllByText(/https:\/\/todos-dev.stoplight.io/).length).toEqual(1); // server url visible only in the main operation header, not in callback // operation body expect(screen.queryByText('Callback body description')).toBeInTheDocument();