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.4k
Why you should consider Ember.js for your next project
balint
4
350
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
110
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
120
Introduction to ember-data
balint
0
180
Other Decks in Technology
See All in Technology
Road to SRE NEXTの今までとこれから
hiroyaonoe
0
310
AI時代のエンジニアキャリアについて今一度考える
sakamoto_582
2
1.5k
SREとQA 二人三脚で進めるSLO運用/sre-qa-slo
sugitak
0
530
人を動かすのは時間ではなく、納得感 〜新任EMが入社3ヶ月、組織を2回変えた話〜
kakehashi
PRO
3
220
GuardrailからGovernanceへ~AIエージェント運用の次の課題~
sbspsy
2
270
kintone の AI コワーカーを、 Anthropic にエージェントを"ホストさせて"作った話 #devkinmeetup
sugimomoto
0
100
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
150
ポストモーテム! DDoSからサイトは守れた。 でもビジネスは守れなかった。
bengo4com
1
2.9k
Keeping applications secure by evolving OAuth 2.0 and OpenID Connect
ahus1
PRO
1
160
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
1
3.1k
AIレビューはどこまで任せられるのか?自動化と人が背負うレビューの境界
sansantech
PRO
2
780
実装だけじゃない! CCA-F取得エンジニアが教えるClaude Code開発プロセス活用術
diggymo
2
690
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
220
Ethics towards AI in product and experience design
skipperchong
2
330
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
870
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
690
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
340
Visualization
eitanlees
152
17k
The Curious Case for Waylosing
cassininazir
1
430
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
GitHub's CSS Performance
jonrohan
1033
470k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
930
Discover your Explorer Soul
emna__ayadi
2
1.2k
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