From 0cca3de7deebb1f62009e9d7d160b29faf502ba9 Mon Sep 17 00:00:00 2001 From: James Dindi Date: Sun, 17 May 2020 22:06:19 +0300 Subject: [PATCH 1/2] Add test on ArtistCreate --- src/containers/Artist/Create/ArtistCreate.js | 11 +++++++++++ .../Artist/Create/ArtistCreate.test.js | 17 +++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/containers/Artist/Create/ArtistCreate.js create mode 100644 src/containers/Artist/Create/ArtistCreate.test.js diff --git a/src/containers/Artist/Create/ArtistCreate.js b/src/containers/Artist/Create/ArtistCreate.js new file mode 100644 index 00000000..368a5ad3 --- /dev/null +++ b/src/containers/Artist/Create/ArtistCreate.js @@ -0,0 +1,11 @@ +import React from 'react' + +class ArtistCreate extends React.Component { + render() { + return ( +
+ ) + } +} + +export default ArtistCreate diff --git a/src/containers/Artist/Create/ArtistCreate.test.js b/src/containers/Artist/Create/ArtistCreate.test.js new file mode 100644 index 00000000..e7b8f643 --- /dev/null +++ b/src/containers/Artist/Create/ArtistCreate.test.js @@ -0,0 +1,17 @@ +import React from 'react' +import { shallow } from 'enzyme' +import ArtistCreate from './ArtistCreate' + +describe('', () => { + let artistCreateWrapper + beforeEach(() => { + artistCreateWrapper = shallow() + }) + it('has a form component', () => { + expect(artistCreateWrapper.find('form').length).toEqual(1) + }) + + it('has a textbox for name', () => { + expect(artistCreateWrapper.find("input[type='text']").length).toEqual(1) + }) +}) From 4dc587107565ba1721f6d34c7ec02f9e751c3101 Mon Sep 17 00:00:00 2001 From: James Dindi Date: Thu, 21 May 2020 21:16:41 +0300 Subject: [PATCH 2/2] Add Artist Create form Work in progress Co-authored-by: Gideon Kimutai Co-authored-by: Riccardo Giomi Co-authored-by: Mike Aono --- src/components/App.js | 28 +++-- src/containers/Artist/Create/ArtistCreate.js | 27 ++++- .../Artist/Create/ArtistCreate.test.js | 12 +- .../Artist/Create/artistCreate.scss | 111 ++++++++++++++++++ .../Users/Create/UserCreate.test.js | 10 +- src/main.scss | 1 + 6 files changed, 169 insertions(+), 20 deletions(-) create mode 100644 src/containers/Artist/Create/artistCreate.scss diff --git a/src/components/App.js b/src/components/App.js index 71f8e661..7db05827 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -1,5 +1,5 @@ import React from 'react' -import { BrowserRouter, Route } from 'react-router-dom' +import { BrowserRouter, Route, Switch } from 'react-router-dom' // CSS import '../main.scss' @@ -12,6 +12,7 @@ import Causes from '../containers/Causes/Causes' import Cause from '../containers/Cause/Cause' import Artists from '../containers/Artists/Artists' import Artist from '../containers/Artist/Artist' +import ArtistCreate from '../containers/Artist/Create/ArtistCreate' import Performances from '../containers/Performances/Performances' import Performance from '../containers/Performance/Performance' import Contact from '../containers/Contact/Contact' @@ -23,17 +24,20 @@ const App = () => {
- - - - - - - - - - - + + + + + + + + + + + + + +
diff --git a/src/containers/Artist/Create/ArtistCreate.js b/src/containers/Artist/Create/ArtistCreate.js index 368a5ad3..71d0ab54 100644 --- a/src/containers/Artist/Create/ArtistCreate.js +++ b/src/containers/Artist/Create/ArtistCreate.js @@ -3,7 +3,32 @@ import React from 'react' class ArtistCreate extends React.Component { render() { return ( - +
+

Register as an artist

+
+ +
+ + +
+
+ +