X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7a2f0082071947bfec27ed4f2a16250e1d611d21..a0d117b3fae1311a6eb98612946be8966bdf2cf5:/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx

diff --git a/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx b/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx
index 9a31a69ed0..7e90bfd295 100644
--- a/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx
+++ b/src/views-components/advanced-tab-dialog/advanced-tab-dialog.tsx
@@ -78,7 +78,7 @@ export const AdvancedTabDialog = compose(
                 </Tabs>
                 <DialogContent className={classes.content}>
                     {value === 0 && <div>{dialogContentExample(apiResponse, classes)}</div>}
-                    {value === 1 && <div>{metadata.items.length > 0 ? <MetadataTab items={metadata.items} uuid={uuid} user={user} /> : dialogContentHeader('(No metadata links found)')}</div>}
+                    {value === 1 && <div>{metadata !== '' && metadata.items.length > 0 ? <MetadataTab items={metadata.items} uuid={uuid} user={user} /> : dialogContentHeader('(No metadata links found)')}</div>}
                     {value === 2 && dialogContent(pythonHeader, pythonExample, classes)}
                     {value === 3 && <div>
                         {dialogContent(cliGetHeader, cliGetExample, classes)}
@@ -87,7 +87,7 @@ export const AdvancedTabDialog = compose(
                     {value === 4 && dialogContent(curlHeader, curlExample, classes)}
                 </DialogContent>
                 <DialogActions>
-                    <Button variant='flat' color='primary' onClick={closeDialog}>
+                    <Button data-cy="close-advanced-dialog" variant='text' color='primary' onClick={closeDialog}>
                         Close
                     </Button>
                 </DialogActions>
@@ -109,5 +109,6 @@ const dialogContentHeader = (header: string) =>
 
 const dialogContentExample = (example: string, classes: any) =>
     <DefaultCodeSnippet
+        apiResponse
         className={classes.codeSnippet}
         lines={[example]} />;
\ No newline at end of file
