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
510
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.2k
Why you should consider Ember.js for your next project
balint
4
240
Data Loading Patterns in Ember
balint
1
180
Auth* in Ember apps with Torii
balint
1
290
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
86
Complex Component Design in Ember
balint
0
350
Don't call me back - How Ember uses promises and how you can, too
balint
5
10k
Unit testing in Ember.js
balint
0
67
Introduction to ember-data
balint
0
150
Other Decks in Technology
See All in Technology
CDCL による厳密解法を採用した MILP ソルバー
imai448
3
180
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
複雑なState管理からの脱却
sansantech
PRO
1
160
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
350
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
Terraform Stacks入門 #HashiTalks
msato
0
360
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
530
The Role of Developer Relations in AI Product Success.
giftojabu1
0
140
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
490
Lexical Analysis
shigashiyama
1
150
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Embracing the Ebb and Flow
colly
84
4.5k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
A better future with KSS
kneath
238
17k
Writing Fast Ruby
sferik
627
61k
How STYLIGHT went responsive
nonsquared
95
5.2k
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