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
280
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
85
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
64
Introduction to ember-data
balint
0
150
Other Decks in Technology
See All in Technology
グイグイ系QAマネージャーの仕事
sadonosake
0
360
Road to Single Activity
yurihondo
2
240
プログラム検証入門
riru
6
890
JTCや セキュリティチェックリストが夢の跡
nikinusu
1
800
アプリをリリースできる状態に保ったまま 段階的にリファクタリングするための 戦略と戦術 / Strategies and tactics for incremental refactoring
yanzm
6
1.5k
サプライチェーン攻撃に備える
ryunen344
0
400
やってやろうじゃないかメカアジャイル! / Let's do it, mechanical agile!
psj59129
1
700
Agile in Automotive Industry, puzzles and lights.
hiranabe
3
1.4k
Fediverse Discovery Providers overview
andypiper
0
170
Oracle Autonomous Database:サービス概要のご紹介
oracle4engineer
PRO
1
7.1k
開発者の定量・定性データを組み合わせて開発者体験を把握するための取り組み
ham0215
1
180
DuckDB雑紹介(1.1対応版)@DuckDB座談会
ktz
6
1.4k
Featured
See All Featured
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
166
48k
[RailsConf 2023] Rails as a piece of cake
palkan
48
4.6k
The World Runs on Bad Software
bkeepers
PRO
64
11k
Code Review Best Practice
trishagee
62
16k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.8k
Navigating Team Friction
lara
183
13k
Optimising Largest Contentful Paint
csswizardry
31
2.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.6k
A better future with KSS
kneath
235
17k
A designer walks into a library…
pauljervisheath
201
24k
The Art of Programming - Codeland 2020
erikaheidi
48
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