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
540
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Acceptance testing in Ember.js
Balint Erdi
May 08, 2014
More Decks by Balint Erdi
See All by Balint Erdi
Data Loading Patterns with JSON API
balint
5
1.5k
Why you should consider Ember.js for your next project
balint
4
360
Data Loading Patterns in Ember
balint
1
250
Auth* in Ember apps with Torii
balint
1
330
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
110
Complex Component Design in Ember
balint
0
410
Don't call me back - How Ember uses promises and how you can, too
balint
5
11k
Unit testing in Ember.js
balint
0
120
Introduction to ember-data
balint
0
190
Other Decks in Technology
See All in Technology
[ホンマでっか SRE] あなたはなぜ SRE に?
_awache
0
400
現場の暗黙知を継承するAIエージェント — 対話から生まれる長期記憶と Skills
atsukish
0
140
Oracle AI Databaseデータベース・サービス: BaseDB/ExaDB-Dの可用性
oracle4engineer
PRO
1
960
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
120
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3.2k
暗号化?某ファイルストレージはどうなるの!? 3rd Partyとうまく付き合う秘密度ラベル設計
kasada
0
210
顧客の要望は2次情報である 〜アンテナを張るFDEの構造論〜
noriakioji
5
1k
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
2
740
Claude Teamプランの コスト最適化を考える
rfdnxbro
1
810
Digitization部 紹介資料
sansan33
PRO
2
7.8k
指示待ちから変化に応じるClaude Codeへ!~環境からAgentへの帰り道を作る~
gotalab555
8
1.6k
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
450
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
The Spectacular Lies of Maps
axbom
PRO
1
950
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
How to make the Groovebox
asonas
2
2.4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
480
We Are The Robots
honzajavorek
0
310
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
390
GraphQLとの向き合い方2022年版
quramy
50
15k
Producing Creativity
orderedlist
PRO
348
40k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
500
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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