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
530
1
Share
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.4k
Why you should consider Ember.js for your next project
balint
4
340
Data Loading Patterns in Ember
balint
1
240
Auth* in Ember apps with Torii
balint
1
320
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
100
Complex Component Design in Ember
balint
0
400
Don't call me back - How Ember uses promises and how you can, too
balint
5
11k
Unit testing in Ember.js
balint
0
110
Introduction to ember-data
balint
0
180
Other Decks in Technology
See All in Technology
Gaussian Splattingの実用化 - 映像制作への展開
gpuunite_official
0
190
100マイクロサービスのTerraform/Kubernetes管理地獄から抜け出すためのAI活用術
markie1009
0
150
AI対話分析の夢と、汚いデータの現実 Looker / Dataplex / Dataform で実現する品質ファーストな基盤設計
waiwai2111
0
520
可視化から活用へ — Mesh化・Segmentation・アライメントの研究動向
gpuunite_official
0
200
ワールドカフェ再び、そしてゴール・ルール・ロール・ツール / World Café Revisited, and the Goals-Rules-Roles-Tools
ks91
PRO
0
170
いつの間にかデータエンジニア以外の業務も増えていたけど、意外と経験が役に立ってる
zozotech
PRO
0
590
会社説明資料|株式会社ギークプラス ソフトウェア事業部
geekplus_tech
0
230
AI時代に越境し、 組織を変えるQAスキルの正体 / QA Skills for Transforming an Organization
mii3king
5
4.4k
パーソルキャリア IT/テクノロジー職向け 会社紹介資料|Company Introduction Deck
techtekt
PRO
0
140
データモデリング通り #5オンライン勉強会: AIに『ビジネスの文脈』を教え込むデータモデリング
datayokocho
0
280
ESP32 IoTを動かしながらメモリ使用量を観測してみた話
zozotech
PRO
0
120
SLI/SLO、「完全に理解した」から「チョットデキル」へ
maruloop
5
480
Featured
See All Featured
BBQ
matthewcrist
89
10k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
350
Chasing Engaging Ingredients in Design
codingconduct
0
190
Paper Plane (Part 1)
katiecoart
PRO
0
7.5k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
Building an army of robots
kneath
306
46k
A designer walks into a library…
pauljervisheath
211
24k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Discover your Explorer Soul
emna__ayadi
2
1.1k
The Language of Interfaces
destraynor
162
26k
Are puppies a ranking factor?
jonoalderson
1
3.4k
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