Skip to content

Commit

Permalink
test(docz): add test ids
Browse files Browse the repository at this point in the history
  • Loading branch information
rakannimer committed Sep 9, 2019
1 parent 405fce0 commit f20daf6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/docz-components/src/components/Playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const Playground = ({
},
};
return (
<Resizable {...resizableProps}>
<Resizable {...resizableProps} data-testid="playground">
<LiveProvider
code={code}
scope={scope}
Expand All @@ -99,7 +99,9 @@ export const Playground = ({
>
<div sx={styles.previewWrapper}>
<LivePreviewWrapper showingCode={showingCode}>
{showLivePreview && <LivePreview sx={styles.preview} />}
{showLivePreview && (
<LivePreview sx={styles.preview} data-testid="live-preview" />
)}
</LivePreviewWrapper>
<div sx={styles.buttons}>
<button sx={styles.button} onClick={() => copy(code)}>
Expand All @@ -110,10 +112,12 @@ export const Playground = ({
</button>
</div>
</div>
{showLiveError && <LiveError sx={styles.error} />}
{showLiveError && (
<LiveError sx={styles.error} data-testid="live-error" />
)}
{showingCode && (
<div sx={styles.editor(theme)}>
<LiveEditor />
<LiveEditor data-testid="live-editor" />
</div>
)}
</LiveProvider>
Expand Down

0 comments on commit f20daf6

Please sign in to comment.