"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("@testing-library/react"),react_router_dom_1=require("react-router-dom"),OperationItem_1=require("../OperationItem"),services_1=require("../../../services"),petstore_json_1=__importDefault(require("./fixtures/petstore.json")),operationDefinition_json_1=__importDefault(require("./fixtures/operationDefinition.json")),app_1=require("../../../jotai/app"),store_1=require("../../../jotai/store");jest.mock("jotai",(()=>Object.assign(Object.assign({},jest.requireActual("jotai")),{useAtomValue:jest.fn((e=>e===store_1.globalStoreAtom?{parser:{definition:petstore_json_1.default},options:(0,services_1.normalizeOptions)({codeSamples:{languages:[{lang:"curl",label:"curl"}]}})}:e===app_1.environmentAtom?[{},""]:{})),useAtom:jest.fn((e=>e===app_1.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}=(0,react_1.render)((0,jsx_runtime_1.jsx)(OperationItem_1.OperationItem,{item:{operationDefinition:operationDefinition_json_1.default,parent:void 0,href:"test"}}),{wrapper:react_router_dom_1.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