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
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
320
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
95
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
99
Introduction to ember-data
balint
0
170
Other Decks in Technology
See All in Technology
(金融庁共催)第4回金融データ活用チャレンジ勉強会資料
takumimukaiyama
0
120
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
Tebiki Engineering Team Deck
tebiki
0
24k
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
3
1.2k
使いにくいの壁を突破する
sansantech
PRO
1
110
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
430
日本語テキストと音楽の対照学習の技術とその応用
lycorptech_jp
PRO
1
420
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
2
120
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
なぜ今、コスト最適化(倹約)が必要なのか? ~AWSでのコスト最適化の進め方「目的編」~
htan
1
110
Featured
See All Featured
New Earth Scene 8
popppiees
1
1.5k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
80
Testing 201, or: Great Expectations
jmmastey
46
8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
The browser strikes back
jonoalderson
0
360
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
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