Liferay.Loader.define("@liferay/object-web@1.0.181/js/tests/CardHeader",["module","exports","require","@liferay!object-web$testing-library/jest-dom/extend-expect","@liferay!object-web$testing-library/react","@liferay!object-web$testing-library/user-event","liferay!frontend-js-react-web$react","../components/ViewObjectDefinitions/CardHeader","../components/ViewObjectDefinitions/objectDefinitionUtil"],(function(e,t,r){window;{r("@liferay!object-web$testing-library/jest-dom/extend-expect");var n=r("@liferay!object-web$testing-library/react"),o=_interopRequireDefault(r("@liferay!object-web$testing-library/user-event")),i=_interopRequireDefault(r("liferay!frontend-js-react-web$react")),c=_interopRequireDefault(r("../components/ViewObjectDefinitions/CardHeader")),l=r("../components/ViewObjectDefinitions/objectDefinitionUtil");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}describe("The CardHeader component should",(()=>{it("render all the folder actions",(()=>{(0,n.render)(i.default.createElement(c.default,{externalReferenceCode:"ticketERC",items:(0,l.getFolderActions)(1010,"",(()=>{}),{delete:{href:"",method:"DELETE"},get:{href:"GET",method:""},permissions:{href:"PATCH",method:""},update:{href:"",method:"PUT"}}),label:{en_US:"Ticket"},modelBuilderURL:""})),o.default.click(n.screen.getByRole("button",{name:"folder-actions"})),expect(n.screen.getAllByRole("menuitem")).toHaveLength(4),expect(n.screen.getByText("edit-label-and-erc")).toBeInTheDocument(),expect(n.screen.getByText("import-object")).toBeInTheDocument(),expect(n.screen.getByText("folder-permissions")).toBeInTheDocument(),expect(n.screen.getByText("delete-folder")).toBeInTheDocument()})),it("not render delete and edit folder actions on uncategorized folder",(()=>{(0,n.render)(i.default.createElement(c.default,{externalReferenceCode:"uncategorized",items:(0,l.getFolderActions)(1010,"",(()=>{}),{get:{href:"GET",method:""},permissions:{href:"PATCH",method:""}}),label:{en_US:"Uncategorized"},modelBuilderURL:""})),o.default.click(n.screen.getByRole("button",{name:"folder-actions"})),expect(n.screen.getAllByRole("menuitem")).toHaveLength(2),expect(n.screen.getByText("import-object")).toBeInTheDocument(),expect(n.screen.getByText("folder-permissions")).toBeInTheDocument()}))}))}}));
//# sourceMappingURL=CardHeader.js.map