diff --git a/src/components/FSHControls.js b/src/components/FSHControls.js index 8ce3c53..6d7e8ac 100644 --- a/src/components/FSHControls.js +++ b/src/components/FSHControls.js @@ -23,6 +23,7 @@ import { FormControlLabel, FormHelperText, Grid, + Link, MenuItem, Tooltip, TextField @@ -89,6 +90,13 @@ const useStyles = makeStyles((theme) => ({ dialogPaper: { maxHeight: '80vh', minHeight: '80vh' + }, + dialogActions: { + justifyContent: 'space-between' + }, + dialogActionsMessage: { + fontStyle: 'italic', + padding: '6px 8px' } })); @@ -423,13 +431,19 @@ export default function FSHControls(props) { - - - + +
+ Have an example that might be bene-fish-al? Seas the day and add to our collection on{' '} + GitHub! +
+
+ + +
diff --git a/src/tests/components/FSHControls.test.js b/src/tests/components/FSHControls.test.js index aff5292..04a58fb 100644 --- a/src/tests/components/FSHControls.test.js +++ b/src/tests/components/FSHControls.test.js @@ -453,6 +453,20 @@ it('should properly render the examples in the file tree', async () => { expect(manifestChild2).toBeInTheDocument(); }); +it('should include a link to the examples repo', () => { + const { getByRole, getByText } = render(, container); + + const examplesButton = getByRole('button', { name: /Examples/i }); + expect(examplesButton).toBeInTheDocument(); + fireEvent.click(examplesButton); + + const exampleRepoText = getByText(/Have an example that might be bene-fish-al?/); + expect(exampleRepoText).toBeInTheDocument(); + const exampleRepoUrl = getByRole('link'); + expect(exampleRepoUrl).toBeInTheDocument(); + expect(exampleRepoUrl).toHaveAttribute('href', 'https://github.com/FSHSchool/FSHOnline-Examples#readme'); +}); + it.skip('should populate editor when examples are collected', async () => { const updateTextValueSpy = jest.fn();