Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Acceptance testing in Ember.js
Search
Balint Erdi
May 08, 2014
Technology
1
520
Acceptance testing in Ember.js
Balint Erdi
May 08, 2014
Tweet
Share
More Decks by Balint Erdi
See All by Balint Erdi
Data Loading Patterns with JSON API
balint
5
1.4k
Why you should consider Ember.js for your next project
balint
4
290
Data Loading Patterns in Ember
balint
1
200
Auth* in Ember apps with Torii
balint
1
300
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
91
Complex Component Design in Ember
balint
0
380
Don't call me back - How Ember uses promises and how you can, too
balint
5
10k
Unit testing in Ember.js
balint
0
79
Introduction to ember-data
balint
0
160
Other Decks in Technology
See All in Technology
Bet "Bet AI" - Accelerating Our AI Journey #BetAIDay
layerx
PRO
3
720
Perlアプリケーションで トレースを実装するまでの 工夫と苦労話
masayoshi
0
290
ビジネス文書に特化した基盤モデル開発 / SaaSxML_Session_2
sansan_randd
0
190
robocopy の怖い話/scary-story-about-robocopy
emiki
0
420
金融サービスにおける高速な価値提供とAIの役割 #BetAIDay
layerx
PRO
1
310
AIエージェントを支える設計
tkikuchi1002
12
2.7k
相互運用可能な学修歴クレデンシャルに向けた標準技術と国際動向
fujie
0
130
AI によるドキュメント処理を加速するためのOCR 結果の永続化と再利用戦略
tomoaki25
0
250
「手を動かした者だけが世界を変える」ソフトウェア開発だけではない開発者人生
onishi
15
8k
Unson OS|48時間で「売れるか」を判定する AI 市場検証プラットフォーム
unson
0
150
データエンジニアがクラシルでやりたいことの現在地
gappy50
3
790
FAST導入1年間のふりかえり〜現実を直視し、さらなる進化を求めて〜 / Review of the first year of FAST implementation
wooootack
1
240
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
246
12k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Balancing Empowerment & Direction
lara
1
510
How GitHub (no longer) Works
holman
314
140k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Mobile First: as difficult as doing things right
swwweet
223
9.8k
The Pragmatic Product Professional
lauravandoore
35
6.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Code Review Best Practice
trishagee
69
19k
Transcript
ACT II - ACCEPTANCE TESTING In which our hero ventures
into uncharted territory
TO MOCK OR NOT TO MOCK? To mock!! Drugs are
BAAD! Using the real server is slow & an added dependency is even more BAAAAD
IC-AJAX Very simple interface! Supports returning server errors! Ships with
the ember-app-kit (EAK) and the future-proof ember-cli
ALTERNATIVES ember-testing-httpRespond! Ships with EAK! sinon.js! great for mocking out
timers
FIXTURES Rosie! Rolling your own! DS.FixtureAdapter
ROSIE https://github.com/bkeepers/rosie
DS.FIXTUREADAPTER Can’t test server error responses! Depends on ember-data! Mostly
useful for development
TEST HELPERS
ASYNC HELPERS FROM EMBER-TESTING visit! click! fillIn! keyEvent! triggerEvent! andThen
BUT WAIT! All these (async) helpers return wait(), a promise
that waits for all async operations to finish
SYNC HELPERS FROM EMBER-TESTING find(cssSelector)! currentPath! currentRouteName! currentURL
EXAMPLE I testing for content
CODE EXAMPLE FOR A TEST testing location
EXAMPLES sync and async
RUN’EM! via qunit in the browser! via testem from the
command line! EAK has both these already set up
EXAMPLE qunit in the browser
EXAMPLE testem from the cmdline