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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
320
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
95
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
98
Introduction to ember-data
balint
0
170
Other Decks in Technology
See All in Technology
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
3
820
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
73k
人はいかにして 確率的な挙動を 受け入れていくのか
vaaaaanquish
5
3.2k
VRTと真面目に向き合う
hiragram
1
520
Werner Vogelsが14年間 問い続けてきたこと
yusukeshimizu
2
270
Digitization部 紹介資料
sansan33
PRO
1
6.7k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
1
210
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
0
130
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
200
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
フロントエンド開発者のための「厄払い」
optim
0
180
【インシデント入門】サイバー攻撃を受けた現場って何してるの?
shumei_ito
0
1.3k
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
160
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
100
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
120
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
310
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
720
How to train your dragon (web standard)
notwaldorf
97
6.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
230
So, you think you're a good person
axbom
PRO
2
1.9k
RailsConf 2023
tenderlove
30
1.3k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
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