Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
309 commits
Select commit Hold shift + click to select a range
28fb3b5
Merge pull request #29 from pebblecode/improvement-meeting-changes
poshaughnessy Nov 11, 2015
1871a3b
Removed Sharing & collaboration as not a service
dave-hillier Nov 11, 2015
7bae87d
Removed .idea and added to ignore
dave-hillier Nov 11, 2015
4d55b2d
Update site description to match homepage header
Nov 11, 2015
d39828c
Add 'Deploying' header to readme
Nov 11, 2015
8a6f58f
Push client logos down to bottom of home page
Nov 11, 2015
73f8f2c
fix input radios + recruitee headers
petertait Nov 20, 2015
5aa4355
Merge pull request #30 from pebblecode/feature/remove-sharing-and-col…
poshaughnessy Nov 22, 2015
b5e1c4c
added Conference blog
Dec 4, 2015
1e35cff
neatening up blog
Dec 4, 2015
e83a110
neatening up blog
Dec 4, 2015
f1e5aef
neatening up blog
Dec 4, 2015
532ef9d
First commit
Dec 8, 2015
6380178
Re-add pic of george
Dec 8, 2015
6af11c1
Add last pictures
Dec 9, 2015
f8c7287
update logo + refactor sprite
petertait Dec 15, 2015
c7561df
add .DS_Store to gitignore + rm old folder
petertait Dec 16, 2015
c4e4b76
Merge pull request #34 from pebblecode/sprite-refactor
petertait Dec 16, 2015
edb099c
Add xmas-on-your-face blog post
Dec 17, 2015
db714a4
Add Productivity Hacking blog post
Dec 30, 2015
c5a0193
adding bubbles
NiallNiall Dec 31, 2015
d5063cd
vertical updates
Jan 5, 2016
e56fb96
modular sections for vertical
NiallNiall Jan 6, 2016
42f9a96
vertical update move-on
Jan 6, 2016
ac358d1
tidying up
Jan 6, 2016
a673413
vertical page move-on
Jan 7, 2016
79342b1
vertical page prediction diagrams
Jan 7, 2016
300c4ad
vertical page special classes
Jan 7, 2016
6c50cc4
Merge pull request #27 from pebblecode/feature/segment-api-keys
export-mike Jan 8, 2016
c1d35aa
better vertical page
Jan 8, 2016
434857c
new health images
Jan 14, 2016
8a2360f
better images on vertical page
Jan 14, 2016
9db4077
images and formatting
Jan 14, 2016
bd8e870
Create functionality for post excerpts in the posts list
Jan 15, 2016
6bc7c7a
updating images and responsive bits
Jan 15, 2016
757c2e4
transport page
Jan 15, 2016
8ccbebd
Merge branch 'nh-vertical-services-page' into transport-vertical-page
Jan 15, 2016
48c2c10
transport page update
Jan 15, 2016
a2d769f
responsive vertical page
Jan 15, 2016
89bcfd8
responsive vertical page updates
Jan 18, 2016
8dae863
Merge pull request #36 from pebblecode/nh-vertical-services-page
NiallNiall Jan 18, 2016
4c2e798
updating design
Jan 18, 2016
65674a5
Merge pull request #37 from pebblecode/master
NiallNiall Jan 18, 2016
115fbfd
updating template
Jan 18, 2016
b817bc0
removing from top level menu
Jan 18, 2016
eaac327
Merge pull request #31 from pebblecode/improvement-meeting-changes
poshaughnessy Jan 18, 2016
6ac2eb2
updated case study on vertical
Jan 19, 2016
5c117c8
Merge branch 'nh-vertical-services-page' into transport-vertical-page
Jan 19, 2016
4408265
Merge remote-tracking branch 'origin/transport-vertical-page' into tr…
Jan 19, 2016
df87790
transport page update
Jan 19, 2016
9eb3390
Merge pull request #38 from pebblecode/transport-vertical-page
Jan 19, 2016
5ba6d32
update call to action
Jan 20, 2016
f6d36e3
copy changes
Jan 20, 2016
24ee65b
update call to action
Jan 20, 2016
914c770
Merge pull request #39 from pebblecode/nh-vert-cta
NiallNiall Jan 20, 2016
fe3e621
merged in recent dev
Jan 20, 2016
32a5ef2
add single page app blog post
Jan 20, 2016
cb20cc8
formatting and title
Jan 20, 2016
0b025d6
Merge pull request #42 from pebblecode/spa_blogpost
Jan 20, 2016
287c049
fix formatting
Jan 20, 2016
66240e9
Merge branch 'spa_blogpost'
Jan 20, 2016
f01b3a0
updates
Jan 20, 2016
fe18c8f
removed double featured post
Jan 20, 2016
beceb9f
updating seminar characters
Jan 20, 2016
450a3ac
no image updates yet
Jan 21, 2016
68f49d0
added brand guideline page
Jan 21, 2016
1c0ee77
added brand guideline page
Jan 21, 2016
24bcbd4
brand page typo
Jan 21, 2016
7f0f9e2
Fixed to/too typo
Jan 21, 2016
15cc56f
Merge branch 'master' of https://github.com/pebblecode/pebblecode.git…
Jan 21, 2016
2ea8c5e
brand page typo
Jan 21, 2016
d99f95f
Merge branch 'master' of https://github.com/pebblecode/pebblecode.git…
Jan 21, 2016
c94195b
brand spacing
Jan 21, 2016
381b3e4
adding images
Jan 21, 2016
914b73d
updating image and copy
Jan 22, 2016
0655ab0
Merge branch 'master' into post-excerpts
Jan 22, 2016
f90f850
Add if statement for thumbnail inclusion
Jan 22, 2016
55d8f83
Merge changes
Jan 22, 2016
09bb990
homepage reordering
afoals Jan 22, 2016
acb819c
updating link
Jan 22, 2016
cbe5636
updating permalinks
Jan 22, 2016
b235d0e
copy suggestions
Jan 22, 2016
13f054e
updated permalinks
Jan 22, 2016
ec711d9
fix(blog) add missing protocol handler to URL
d2s Jan 23, 2016
7a3f57a
responsive update
Jan 25, 2016
c107e64
Transport page copy update
Jan 25, 2016
5418e5e
Merge branch 'clo-copy-updates'
Jan 25, 2016
c49b06a
Homepage vertical section
afoals Jan 25, 2016
606aee8
resposive...almost
afoals Jan 25, 2016
a179ec8
formspree form
Jan 25, 2016
fb3942e
updating formspree form
Jan 26, 2016
23f98db
Merge pull request #46 from pebblecode/biz-dev-page
NiallNiall Jan 26, 2016
43d3968
updated header link
Jan 26, 2016
494a5ee
responsive fox and hover on buttons
afoals Jan 26, 2016
792de4c
incorporate clo amends
Jan 26, 2016
65bd45a
updated cta
Jan 26, 2016
e524a70
adding hyperlink to top
Jan 26, 2016
fc37a7b
Homepage vertical text added to markdown + resposive edit
afoals Jan 26, 2016
f3f22b6
redesigning seminar page
Jan 26, 2016
882edd8
redesigning seminar page
Jan 26, 2016
6271dd1
Homepage tag line edit, Read More buttons
afoals Jan 26, 2016
298fe1e
update
Jan 26, 2016
90fefa8
updated seminar
Jan 26, 2016
f46a86a
Merge pull request #45 from d2s/d2s-link-fix
petertait Jan 26, 2016
4279f9d
merge fix
afoals Jan 26, 2016
7db4a7a
merge conflicts fix
afoals Jan 26, 2016
7e5a642
merge conflict fixes
afoals Jan 27, 2016
3b116d4
health seminar copy update
Jan 27, 2016
a7f3093
merge conflict fixes again
afoals Jan 27, 2016
4a86cec
merge conflict fixes again
afoals Jan 27, 2016
a362210
Copy update
Jan 27, 2016
861a2ea
missing homepage images
afoals Jan 27, 2016
c92a99a
remove overflow hidden on homepage images
afoals Jan 27, 2016
5cd9a4c
Merge branch 'master' into th-health-seminar
Jan 27, 2016
a7fde60
homepage link fix
afoals Jan 27, 2016
d6bdcca
homepage text animation
afoals Jan 27, 2016
3b9080f
Copy update
Jan 27, 2016
5846082
Merge branch 'master' into th-health-seminar
Jan 27, 2016
9ee4271
Merge branch 'th-health-seminar'
Jan 27, 2016
7f5e70e
Agile blog post
Jan 27, 2016
836a658
removed double space
Jan 27, 2016
2e40505
Merge pull request #48 from pebblecode/feature/agile-blog-post
dave-hillier Jan 27, 2016
aab0761
copy updates to main title and invite
Jan 28, 2016
ea4b1d6
Merge branch 'th-copy-updates-2'
Jan 28, 2016
b29446d
Merge remote-tracking branch 'origin/master'
Jan 28, 2016
090b1e6
improving brand colours section
Jan 28, 2016
d041297
Added code review blog post
dave-hillier Jan 28, 2016
278a91d
Future Thinking Blog Post
Jan 28, 2016
8dd0a02
Update 2016-01-28-code-reviews.md
dave-hillier Jan 28, 2016
6331e8d
Merge pull request #49 from pebblecode/code-reviews
dave-hillier Jan 28, 2016
500409b
fix typo in rail blog post
Jan 28, 2016
531db56
missing comma fix - rail blog post
Jan 28, 2016
19ee101
new blog post
Feb 1, 2016
3512f15
new blog post
Feb 1, 2016
813d42b
fix broken link
afoals Feb 2, 2016
47de45a
markdown fomratting fix
afoals Feb 2, 2016
a6f4719
initial commit for redux react unit testing
export-mike Feb 2, 2016
28254b9
Update 2016-02-02-react-redux-unit-testing.md
export-mike Feb 2, 2016
bd3a108
Update 2016-02-02-react-redux-unit-testing.md
export-mike Feb 2, 2016
9034bd9
Update 2016-02-02-react-redux-unit-testing.md
export-mike Feb 2, 2016
b3acf4d
Update 2016-02-02-react-redux-unit-testing.md
export-mike Feb 2, 2016
47c649d
Update 2016-02-02-react-redux-unit-testing.md
export-mike Feb 2, 2016
b04f6d5
Update 2016-02-02-react-redux-unit-testing.md
export-mike Feb 2, 2016
ec1023d
driveby spelling
export-mike Feb 3, 2016
23f483d
links
export-mike Feb 3, 2016
75e33e5
Suggested tweaks
Feb 3, 2016
71bc319
Weird, the code syntax was breaking for me - switch to indent
Feb 3, 2016
39e67ca
adding katie
NiallNiall Feb 3, 2016
a951773
Merge pull request #50 from poshaughnessy/blog-post-copy-tweak-sugges…
export-mike Feb 3, 2016
30494fa
Create 2016-02-04-dont-just-buy-fish
Feb 4, 2016
8a1b332
fishy blog post
Feb 4, 2016
3e3543e
fish post fixes
Feb 4, 2016
eb4eaef
fix image border
Feb 4, 2016
a2519d9
Merge pull request #52 from pebblecode/dont-buy-fish
Feb 4, 2016
58474e5
Update 2016-02-04-dont-just-buy-fish.md
Feb 4, 2016
eb3c6be
merging in insurance page
Feb 4, 2016
6c3fe36
Day fix
afoals Feb 5, 2016
21dde11
merge fix
afoals Feb 5, 2016
68f955a
Merge branch 'master' of https://github.com/pebblecode/pebblecode.git…
afoals Feb 5, 2016
ce6bdad
blog permalink fix...maybe
afoals Feb 5, 2016
e36e63f
add Katherine Benjamin to the health event page
afoals Feb 5, 2016
17ae321
Typos
Feb 7, 2016
fda154e
link to boilerplate
export-mike Feb 7, 2016
68f468c
markdown fixes
Feb 8, 2016
9ef9e68
updated front page vertical graphic
Feb 8, 2016
940d6e0
sorting out links
Feb 8, 2016
e0baa60
[post] scaling recruitment
shapeshed Feb 9, 2016
1758ef5
new blog on embracing failure
Feb 9, 2016
4c8c2ea
fix headings on blog
Feb 9, 2016
460294a
updating vertical links
Feb 9, 2016
34d8184
updating vertical links
Feb 9, 2016
375576b
Merge branch 'master' of https://github.com/pebblecode/pebblecode.git…
Feb 9, 2016
c2d1eb5
Merge branch 'master' of https://github.com/pebblecode/pebblecode.git…
NiallNiall Feb 9, 2016
0a56302
Merge branch 'master' of https://github.com/pebblecode/pebblecode.git…
NiallNiall Feb 9, 2016
0ea59dc
seperate out JS only relevant to the Work page
afoals Feb 9, 2016
660031f
Merge branch 'master' of https://github.com/pebblecode/pebblecode.git…
afoals Feb 9, 2016
00deb13
Web Bluetooth blog post
Feb 9, 2016
00d3085
Merge pull request #53 from pebblecode/web-bluetooth-blog-post
shapeshed Feb 9, 2016
086ee65
Add missing video and link to slideshare
Feb 9, 2016
43a8866
Merge pull request #54 from pebblecode/web-bluetooth-blog-post
poshaughnessy Feb 9, 2016
a077106
[post] Wearables, DNA & Big Data
shapeshed Feb 10, 2016
d586b84
Removed DS_Store
Feb 12, 2016
77e709a
Merge branch 'master' into post-excerpts
Feb 12, 2016
6a44890
adding Becky Slack
NiallNiall Feb 16, 2016
19b6aa0
adding Lawrence Petalidis
NiallNiall Feb 16, 2016
84103db
michael levans
NiallNiall Feb 16, 2016
a06d459
[post] Start-up philosophies in health
shapeshed Feb 16, 2016
a1a6ca6
[post] good bug reports
shapeshed Feb 17, 2016
1339f17
fix headings for brand page
petertait Feb 17, 2016
ef03594
typos on event page
NiallNiall Feb 17, 2016
bacc94b
homepage vertical icons link fix
afoals Feb 17, 2016
f9b2242
merge fix
afoals Feb 17, 2016
83b7336
merge fix
afoals Feb 17, 2016
dbbc6a0
how to succeed in a DT blog post
Feb 18, 2016
9c0de85
Merge branch 'how-to-succeed-in-dt-blog-post'
Feb 18, 2016
920630e
getting blog categories to work
NiallNiall Feb 18, 2016
9c6643d
more updates
NiallNiall Feb 18, 2016
2a7aa6e
tags-working
NiallNiall Feb 19, 2016
a899645
update posts styling
NiallNiall Feb 19, 2016
59a115b
updating blog css
NiallNiall Feb 19, 2016
1a3fc02
adding 6 new people
NiallNiall Feb 19, 2016
8600382
[post] Frugal Innovation in Health
shapeshed Feb 19, 2016
5b83368
[fix] remove .DS_Store
shapeshed Feb 19, 2016
2914141
first blog write
NiallNiall Feb 19, 2016
d7135b8
Add thumbnails to older posts
Feb 22, 2016
021962d
Merge branch 'post-excerpts' of https://github.com/pebblecode/pebblec…
Feb 22, 2016
7860a14
Merge in master
Feb 22, 2016
b46410c
Merge pull request #43 from pebblecode/post-excerpts
JonathanUsername Feb 22, 2016
733bc0a
Fix fish post
Feb 22, 2016
e1a2606
Merge pull request #55 from pebblecode/post-excerpts
JonathanUsername Feb 22, 2016
e177456
Add images to recent posts
Feb 22, 2016
5829431
updates to the text
NiallNiall Feb 22, 2016
c1730b0
blog thumb updates
NiallNiall Feb 22, 2016
fc0c576
digital transformation
Feb 22, 2016
d5cad93
Added thumnail info to readme
Feb 22, 2016
af6194a
[edit] updates to frugal healthcare
shapeshed Feb 22, 2016
1e17c0f
Fix for jekyll
dave-hillier Feb 22, 2016
e79c233
fix typo
petertait Feb 22, 2016
a784e08
updating maths motion blog post
NiallNiall Feb 22, 2016
bcef8dc
updated links etc
NiallNiall Feb 23, 2016
2e42a9a
finalising copy
NiallNiall Feb 23, 2016
478320d
Niall Maths Blog Post
NiallNiall Feb 23, 2016
10251b9
updated thumbnail on maths post
NiallNiall Feb 23, 2016
c0d01de
updated headings with spaces
NiallNiall Feb 23, 2016
fb1db48
[post] tech is banking in the 80s
shapeshed Feb 23, 2016
dabf4fb
[edit] typo
shapeshed Feb 23, 2016
11c6c4d
[fix] typo
shapeshed Feb 23, 2016
b5d516e
working on categories
NiallNiall Feb 23, 2016
d1d416f
updates to blog categories
NiallNiall Feb 24, 2016
32dfd04
blog category styling
NiallNiall Feb 25, 2016
4e24d5b
updating blog styles
NiallNiall Feb 25, 2016
129e310
finalising blog styles
NiallNiall Feb 26, 2016
3d99c8c
copy changes to tags
NiallNiall Feb 26, 2016
c41ffab
updates to blog categories copy
NiallNiall Feb 26, 2016
3e077bc
updates to blog categories copy
NiallNiall Feb 26, 2016
65614b7
blog styling updates
NiallNiall Feb 26, 2016
0e1595c
Read more buttons now have nice clicky action
JonathanUsername Feb 26, 2016
faa045c
removing blog loop in post
NiallNiall Feb 26, 2016
509b84b
Merge branch 'master' of https://github.com/pebblecode/pebblecode.git…
NiallNiall Feb 26, 2016
11be868
updating older blog posts
NiallNiall Feb 26, 2016
5a0ca31
Create readme.md
jonnyli Mar 1, 2016
65597d6
Update readme.md
jonnyli Mar 1, 2016
a03bdf2
case insensitivity in blog posts
NiallNiall Mar 1, 2016
ecfb0f9
case insensitivity in blog posts
NiallNiall Mar 1, 2016
a4dd9f1
add medical-health blog
Mar 1, 2016
f193919
add medical-health blog assets
Mar 1, 2016
a06653c
spell check
Mar 1, 2016
0eee46d
new blog posts old tags
NiallNiall Mar 1, 2016
b4dfa23
blog categories
NiallNiall Mar 1, 2016
893059c
updated categories sidebar
NiallNiall Mar 1, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Suggested tweaks
  • Loading branch information
Peter O'Shaughnessy committed Feb 3, 2016
commit 75e33e5bb52b146e3c27593a6cf2c7f3ecd98b11
20 changes: 10 additions & 10 deletions _posts/2016-02-02-react-redux-unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ In this post we'll go through the setup of a React, Redux Webpack application wi
### Folder Structure of our application.
![http://i.imgur.com/43wv76d.png](http://i.imgur.com/43wv76d.png)

karma.config we'll need to load up our components and containers into a browser for testing as we're using postcss and other loaders that don't work natively in node.js. So to get our tests to run in browser we will also include a copy of our webpack config to get karma to load it up. If you load up your tests normally withouy karma, down the line you'll get Unexpected token errors.
*karma.config.js* - we'll need to load up our components and containers into a browser for testing as we're using postcss and other loaders that don't work natively in node.js. So to get our tests to run in browser we will also include a copy of our webpack config to get karma to load it up. If you load up your tests normally withouy karma, down the line you'll get Unexpected token errors.

server.js selects an appropriate .dev.js, .prod.js file on startup. server.dev.js uses webpack dev server. prod.js is a very simple express app hosting static output in the dist folder.
*server.js* - selects an appropriate .dev.js, .prod.js file on startup. server.dev.js uses webpack dev server. prod.js is a very simple express app hosting static output in the dist folder.

src is where our application code lives. Components contain our presentational components such as TextBox, Button(s), ListItem etc. All components are decoupled from redux. With styles being loaded in ```import styles from './styles.css'``` by using [Css Modules](https://github.com/css-modules/css-modules). Redux provides us with top down rendering so we keep our components clean and stateless.
*src* - is where our application code lives. Components contain our presentational components such as TextBox, Button(s), ListItem etc. All components are decoupled from redux. With styles being loaded in ```import styles from './styles.css'``` by using [Css Modules](https://github.com/css-modules/css-modules). Redux provides us with top down rendering so we keep our components clean and stateless.

containers (redux glue), react components that have very little if any styling. With the glue to pass down state to its child components. Within this directory we create our top level routes, such as home, about etc. In here we're also making use of redux-forms higher order component to give us validation and state management as forms generally behave is the same way. This library has dramatically helped reduce boilerplate.
*containers* - (redux glue), react components that have very little if any styling. With the glue to pass down state to its child components. Within this directory we create our top level routes, such as home, about etc. In here we're also making use of redux-forms higher order component to give us validation and state management as forms generally behave is the same way. This library has dramatically helped reduce boilerplate.

actions contains our functions that are triggered by user actions or workers in our application. We can use these actions later in our reducer tests.
*actions* - contains our functions that are triggered by user actions or workers in our application. We can use these actions later in our reducer tests.

### Testing our reducers
This is trivial, redux has no coupling to the browser here, so we can test our application like a state machine with simple input output. With tests running fast in node environment.
Expand Down Expand Up @@ -79,10 +79,10 @@ export default createReducer(initialState, {
})
});
```
If you're interested in what createReducer does [see](https://github.com/joshgeller/react-redux-jwt-auth-example/blob/master/src/utils/index.js#L12) it gives a nicer switch structure. I quite like it.
If you're interested in what createReducer does [see here](https://github.com/joshgeller/react-redux-jwt-auth-example/blob/master/src/utils/index.js#L12) - it gives a nicer switch structure. I quite like it.

### Testing react components with enzyme
Enzyme gives us a simple jQuery like selector interface which is really powerful for asserting whats been rendered.
Enzyme gives us a simple jQuery like selector interface which is really powerful for asserting what's been rendered.

Example Test:

Expand Down Expand Up @@ -147,7 +147,7 @@ export default NotificationTab;
```

### Karma Setup
This bit was rather fiddly as sinon the mocking library was breaking karma Issue 47 on [github](https://github.com/airbnb/enzyme/issues/47) helped with this.
This bit was rather fiddly as sinon the mocking library was breaking karma. Issue 47 on [github](https://github.com/airbnb/enzyme/issues/47) helped with this.

karma.config.js

Expand Down Expand Up @@ -244,13 +244,13 @@ module.exports = (config) => {
};
```

you'll notice we're doing some funky stuff with sinon to stop it breaking require. Yeah we can share webpack.config here to reduce duplication but for this example we've copied and pasted it.
You'll notice we're doing some funky stuff with sinon to stop it breaking require. Yeah we can share `webpack.config` here to reduce duplication but for this example we've copied and pasted it.

We can now test our react components in silo and with the power of PhantomJS, we're able to test our components very fast. Setup a ```npm run karma:watch``` task to run in the background whilst developing. Here we're currently testing a dumb presentational component, but we can go further and test our redux containers for more functional testing.

And thats it! in the coming week I'll release a bare bones boilerplate project, complete with postcss, hot module replacement and the testing config shown here.

voice you're opinion at me [@export_mike](https://twitter.com/@export_mike) on twitter or [@pebblecode](https://twitter.com/@pebblecode). I'm just scratching the surface of the react testing story, I'd be interested if you've had any pains or gains in testing your React components. Is this useful information? Let me know. Thanks for reading, oh! I almost forgot we're [hiring](http://pebblecode.com/careers/#job-1220)!
Voice you're opinion at me [@export_mike](https://twitter.com/@export_mike) on twitter or [@pebblecode](https://twitter.com/@pebblecode). I'm just scratching the surface of the react testing story, I'd be interested if you've had any pains or gains in testing your React components. Is this useful information? Let me know. Thanks for reading, oh! I almost forgot we're [hiring](http://pebblecode.com/careers/#job-1220)!



Expand Down