Liferay.Loader.define("@liferay/analytics-settings-web@5.0.51/js/components/__tests__/StateRenderer.spec",["module","exports","require","@liferay!analytics-settings-web$testing-library/jest-dom/extend-expect","@liferay!analytics-settings-web$testing-library/react","liferay!frontend-js-react-web$react","../StateRenderer"],(function(e,t,r){window;{r("@liferay!analytics-settings-web$testing-library/jest-dom/extend-expect");var n=r("@liferay!analytics-settings-web$testing-library/react"),a=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r("liferay!frontend-js-react-web$react")),i=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("../StateRenderer"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}describe("State Renderer",(()=>{it("renders EmptyStateComponent",(()=>{const{container:e}=(0,n.render)(a.default.createElement(i.default,{empty:!0,error:!1,loading:!1},a.default.createElement(i.default.Empty,null,a.default.createElement(i.EmptyStateComponent,{className:"empty-state-border",description:"this is a description",imgSrc:"",title:"this is a title"})))),t=e.querySelector(".empty-state-border");expect(t).toBeInTheDocument(),expect(n.screen.getByText(/this is a title/i)).toBeInTheDocument(),expect(n.screen.getByText(/this is a description/i)).toBeInTheDocument()})),it("renders EmptyStateComponent with loading",(()=>{const{container:e}=(0,n.render)(a.default.createElement(i.default,{empty:!1,error:!1,loading:!0},a.default.createElement(i.default.Empty,null,a.default.createElement(i.EmptyStateComponent,{imgSrc:""})))),t=e.querySelector("span.loading-animation"),r=n.screen.getByTestId("loading");expect(r).toBeInTheDocument(),expect(r.contains(t)).toBe(!0)})),it("renders ErrorStateComponent",(()=>{const{container:e}=(0,n.render)(a.default.createElement(i.default,{empty:!1,error:!0,loading:!1},a.default.createElement(i.default.Error,null,a.default.createElement(i.ErrorStateComponent,{className:"empty-state-border"})))),t=e.querySelector(".empty-state-border");expect(t).toBeInTheDocument(),expect(n.screen.getByText(/an-unexpected-system-error-occurred/i)).toBeInTheDocument()}))}))}}));
//# sourceMappingURL=StateRenderer.spec.js.map