import{jsx as _jsx}from"react/jsx-runtime";import{render}from"@testing-library/react";import{BrowserRouter}from"react-router-dom";import{OperationItem}from"../OperationItem";import{normalizeOptions}from"../../../services";import spec from"./fixtures/petstore.json";import definition from"./fixtures/operationDefinition.json";import{environmentAtom}from"../../../jotai/app";import{globalStoreAtom}from"../../../jotai/store";jest.mock("jotai",(()=>Object.assign(Object.assign({},jest.requireActual("jotai")),{useAtomValue:jest.fn((e=>e===globalStoreAtom?{parser:{definition:spec},options:normalizeOptions({codeSamples:{languages:[{lang:"curl",label:"curl"}]}})}:e===environmentAtom?[{},""]:{})),useAtom:jest.fn((e=>e===environmentAtom?[[{server:{}}],jest.fn()]:[{activeOneOf:{"/paths/~1pet/post":0},requestValues:{},request:{expandedFields:{}},response:{expandedFields:{}},activeLanguage:"curl"},jest.fn()]))}))),describe("OperationItem",(()=>{it("should render badges with correct position",(()=>{const{getByTestId:e}=render(_jsx(OperationItem,{item:{operationDefinition:definition,parent:void 0,href:"test"}}),{wrapper:BrowserRouter}),t=e("operation-item-header").childNodes;expect(t[1].textContent).toBe("Alpha"),expect(t[3].textContent).toBe("Beta"),expect(t[4].textContent).toBe("Gamma")}))}));
//# sourceMappingURL=OperationItem.test.js.map