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
520
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
210
Auth* in Ember apps with Torii
balint
1
300
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
92
Complex Component Design in Ember
balint
0
380
Don't call me back - How Ember uses promises and how you can, too
balint
5
11k
Unit testing in Ember.js
balint
0
83
Introduction to ember-data
balint
0
170
Other Decks in Technology
See All in Technology
個人でデジタル庁の デザインシステムをVue.jsで 作っている話
nishiharatsubasa
3
5.2k
Dify on AWS 環境構築手順
yosse95ai
0
170
serverless team topology
_kensh
3
240
AIでデータ活用を加速させる取り組み / Leveraging AI to accelerate data utilization
okiyuki99
6
1.4k
AIプロダクトのプロンプト実践テクニック / Practical Techniques for AI Product Prompts
saka2jp
0
120
abema-trace-sampling-observability-cost-optimization
tetsuya28
0
370
SOTA競争から人間を超える画像認識へ
shinya7y
0
620
CNCFの視点で捉えるPlatform Engineering - 最新動向と展望 / Platform Engineering from the CNCF Perspective
hhiroshell
0
140
組織全員で向き合うAI Readyなデータ利活用
gappy50
5
1.7k
AI時代、“平均値”ではいられない
uhyo
8
2.7k
デザインとエンジニアリングの架け橋を目指す OPTiMのデザインシステム「nucleus」の軌跡と広げ方
optim
0
120
AI機能プロジェクト炎上の 3つのしくじりと学び
nakawai
0
150
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.1k
How to Think Like a Performance Engineer
csswizardry
27
2.1k
Side Projects
sachag
455
43k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
It's Worth the Effort
3n
187
28k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Unsuck your backbone
ammeep
671
58k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Writing Fast Ruby
sferik
630
62k
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