tirkarthi commented on code in PR #49680:
URL: https://github.com/apache/airflow/pull/49680#discussion_r2058588981


##########
airflow-core/src/airflow/ui/src/pages/Dag/DagHeader.test.tsx:
##########
@@ -41,9 +41,9 @@ afterAll(() => server.close());
 describe("Dag Documentation Modal", () => {
   it("Display documentation button when doc_md is present", async () => {
     render(
-      <BaseWrapper>
+      <Wrapper>

Review Comment:
   Yes, a Router is required for `Link` from react-router-dom since tags are 
now links in `DagHeader`. `BaseWrapper` doesn't have a router but `Wrapper` has 
a `MemoryRouter` and also wraps around `BaseWrapper`.  This is only required 
for testing and the UI is already wrapped with a router.
   
   Error message : 
   
   ```
   Consider adding an error boundary to your tree to customize error handling 
behavior.
   Visit https://reactjs.org/link/error-boundaries to learn more about error 
boundaries.
   
    ❯ src/pages/Dag/DagHeader.test.tsx (2) 359ms
      ❯ Dag Documentation Modal (2) 353ms
        ✓ Display documentation button when doc_md is present
        × Do not display documentation button only doc_md is not present
   
   
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ 
Failed Tests 1 
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
   
    FAIL  src/pages/Dag/DagHeader.test.tsx > Dag Documentation Modal > Do not 
display documentation button only doc_md is not present
   TypeError: Cannot destructure property 'basename' of 
'React__namespace.useContext(...)' as it is null.
   ```
   
   Ref : https://stackoverflow.com/a/75728680/2610955



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to