pawarprasad123 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3683489770


##########
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/UserDefinedProperties.tsx:
##########


Review Comment:
   TypeScript build failure
   toast.dismiss(toastId.current) — toastId.current can be null, 
   -check throughout this file for similar failures



##########
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/Labels.tsx:
##########


Review Comment:
   TypeScript build failure
   
   guid from useParams() is string | undefined, passed to getLabels() expecting 
string



##########
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/UserDefinedProperties.tsx:
##########
@@ -303,27 +312,33 @@ const UserDefinedProperties = ({ loading, 
customAttributes, entity }: any) => {
                         })
                     ) : (
                       <span>
-                        No properties have been created yet. To add a
-                        property,click{" "}
-                        <Typography
-                          className="text-color-green cursor-pointer"
-                          component="span"
-                          onClick={(e: { stopPropagation: () => void }) => {
-                            e.stopPropagation();
-                            setAddLabel(false);
-                          }}
-                          style={{ textDecoration: "underline" }}
-                        >
-                          here
-                        </Typography>
+                        {entity?.status === EntityStatus.DELETED ? (
+                          "No properties have been created yet."
+                        ) : (
+                          <>
+                            No properties have been created yet. To add a
+                            property,click{" "}
+                            <Typography
+                              className="text-color-green cursor-pointer"
+                              component="span"
+                              onClick={(e: { stopPropagation: () => void }) => 
{
+                                e.stopPropagation();
+                                setAddLabel(false);
+                              }}
+                              className="text-color-green cursor-pointer 
text-underline"

Review Comment:
   Duplicate className attribute on Typography
   -Merge into a single className="text-color-green cursor-pointer 
text-underline" and tighten guid / toastId types.



##########
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/UserDefinedProperties.test.tsx:
##########
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Review Comment:
   test case are failing
   
   Same accordion/button selector issue



##########
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/BMAttributes.test.tsx:
##########
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Review Comment:
   
   Test case are failing
   
   getAllByRole('button', { name: /edit/i })[0] matches AccordionSummary 
(role=button containing “Edit” text), not the Edit button



##########
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/Labels.test.tsx:
##########
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Review Comment:
   Uses getByTestId('edit-label') but component has no such data-testid
   
   test case are failing



-- 
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