pulse-dashboard
Version:
A Next.js Dashboard application for real-time monitoring and historical analysis of Playwright test executions, based on playwright-pulse-report. This component provides the UI for visualizing Playwright test results and can be run as a standalone CLI too
1 lines • 2.26 kB
JavaScript
(()=>{var e={};e.id=211,e.ids=[211],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},94599:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>x,routeModule:()=>u,serverHooks:()=>c,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>l});var s={};r.r(s),r.d(s,{POST:()=>p});var a=r(96559),n=r(48088),o=r(37719),i=r(32190);async function p(e){try{let{testName:t,failureLogsAndErrors:r,codeSnippet:s}=await e.json();if(!t||!r)return i.NextResponse.json({message:"Missing required fields: testName and failureLogsAndErrors"},{status:400});let a=await fetch("https://ai-test-analyser.netlify.app/api/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testName:t,failureLogsAndErrors:r,codeSnippet:s||""})});if(!a.ok){let e=await a.text();return console.error(`External API error: ${a.status}`,e),i.NextResponse.json({message:`Error from external API: ${e}`},{status:a.status})}let n=await a.json();return i.NextResponse.json(n)}catch(t){console.error("Error in /api/analyze-test:",t);let e=t instanceof Error?t.message:"An unknown internal server error occurred";return i.NextResponse.json({message:e},{status:500})}}let u=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/analyze-test/route",pathname:"/api/analyze-test",filename:"route",bundlePath:"app/api/analyze-test/route"},resolvedPagePath:"/Users/administrator/playwright-pulse-dashboard/src/app/api/analyze-test/route.ts",nextConfigOutput:"standalone",userland:s}),{workAsyncStorage:d,workUnitAsyncStorage:l,serverHooks:c}=u;function x(){return(0,o.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:l})}},96487:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[447,580],()=>r(94599));module.exports=s})();