From a6da00f801945a3544f80ce63c2b28daed1a84bc Mon Sep 17 00:00:00 2001 From: Palash gupta Date: Wed, 16 Feb 2022 15:36:20 +0530 Subject: [PATCH] test: trace test is updated --- .../cypress/CustomFunctions/uncaughtExpection.ts | 14 ++++++++++++++ frontend/src/container/Trace/Graph/index.tsx | 2 +- .../src/container/Trace/TraceGraphFilter/index.tsx | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 frontend/cypress/CustomFunctions/uncaughtExpection.ts diff --git a/frontend/cypress/CustomFunctions/uncaughtExpection.ts b/frontend/cypress/CustomFunctions/uncaughtExpection.ts new file mode 100644 index 0000000000..341ddd8cee --- /dev/null +++ b/frontend/cypress/CustomFunctions/uncaughtExpection.ts @@ -0,0 +1,14 @@ +const resizeObserverLoopErrRe = /ResizeObserver loop limit exceeded/; + +const unCaughtExpection = () => { + cy.on('uncaught:exception', (err) => { + if (resizeObserverLoopErrRe.test(err.message)) { + // returning false here prevents Cypress from + // failing the test + return false; + } + return true; + }); +}; + +export default unCaughtExpection; diff --git a/frontend/src/container/Trace/Graph/index.tsx b/frontend/src/container/Trace/Graph/index.tsx index a91fe78930..efc8a9d137 100644 --- a/frontend/src/container/Trace/Graph/index.tsx +++ b/frontend/src/container/Trace/Graph/index.tsx @@ -40,7 +40,7 @@ const TraceGraph = () => { return ( - + ); }; diff --git a/frontend/src/container/Trace/TraceGraphFilter/index.tsx b/frontend/src/container/Trace/TraceGraphFilter/index.tsx index bd06764aad..e6aad7374a 100644 --- a/frontend/src/container/Trace/TraceGraphFilter/index.tsx +++ b/frontend/src/container/Trace/TraceGraphFilter/index.tsx @@ -56,6 +56,7 @@ const TraceGraphFilter = () => { selectedFunction === e.key)?.displayValue} onChange={onClickSelectedFunctionHandler} > @@ -69,6 +70,7 @@ const TraceGraphFilter = () => { selectedGroupBy === e.key)?.displayValue} onChange={onClickSelectedGroupByHandler} >