Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
[JAWS-UG 横浜支部 #91]DevOps Agent vs CloudWatch Investigations -比較と実践-
sh_fk2
1
240
Debugging Edge AI on Zephyr and Lessons Learned
iotengineer22
0
120
計算機科学をRubyと歩む 〜DFA型正規表現エンジンをつくる~
ydah
3
200
小さな判断で育つ、大きな意思決定力 / 20251204 Takahiro Kinjo
shift_evolve
PRO
1
580
Edge AI Performance on Zephyr Pico vs. Pico 2
iotengineer22
0
110
非CUDAの悲哀 〜Claude Code と挑んだ image to 3D “Hunyuan3D”を EVO-X2(Ryzen AI Max+395)で動作させるチャレンジ〜
hawkymisc
1
160
Haskell を武器にして挑む競技プログラミング ─ 操作的思考から意味モデル思考へ
naoya
5
950
Kiro Autonomous AgentとKiro Powers の紹介 / kiro-autonomous-agent-and-powers
tomoki10
0
320
5分で知るMicrosoft Ignite
taiponrock
PRO
0
230
AWSを使う上で最低限知っておきたいセキュリティ研修を社内で実施した話 ~みんなでやるセキュリティ~
maimyyym
2
190
学習データって増やせばいいんですか?
ftakahashi
1
260
Security Diaries of an Open Source IAM
ahus1
0
130
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
700
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Six Lessons from altMBA
skipperchong
29
4.1k
Rails Girls Zürich Keynote
gr2m
95
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Embracing the Ebb and Flow
colly
88
4.9k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
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