$30 off During Our Annual Pro Sale. View Details »
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
530
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
310
Data Loading Patterns in Ember
balint
1
220
Auth* in Ember apps with Torii
balint
1
310
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
94
Complex Component Design in Ember
balint
0
390
Don't call me back - How Ember uses promises and how you can, too
balint
5
11k
Unit testing in Ember.js
balint
0
88
Introduction to ember-data
balint
0
170
Other Decks in Technology
See All in Technology
形式手法特論:CEGAR を用いたモデル検査の状態空間削減 #kernelvm / Kernel VM Study Hokuriku Part 8
ytaka23
2
450
Debugging Edge AI on Zephyr and Lessons Learned
iotengineer22
0
140
WordPress は終わったのか ~今のWordPress の制作手法ってなにがあんねん?~ / Is WordPress Over? How We Build with WordPress Today
tbshiki
1
580
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
6
650
[デモです] NotebookLM で作ったスライドの例
kongmingstrap
0
110
AWSセキュリティアップデートとAWSを育てる話
cmusudakeisuke
0
140
安いGPUレンタルサービスについて
aratako
2
2.7k
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
130
Haskell を武器にして挑む競技プログラミング ─ 操作的思考から意味モデル思考へ
naoya
6
1.2k
技術以外の世界に『越境』しエンジニアとして進化を遂げる 〜Kotlinへの愛とDevHRとしての挑戦を添えて〜
subroh0508
1
400
計算機科学をRubyと歩む 〜DFA型正規表現エンジンをつくる~
ydah
3
210
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
730
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Language of Interfaces
destraynor
162
25k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
720
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Balancing Empowerment & Direction
lara
5
790
Being A Developer After 40
akosma
91
590k
Thoughts on Productivity
jonyablonski
73
5k
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