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.1k
Why you should consider Ember.js for your next project
balint
4
240
Data Loading Patterns in Ember
balint
1
170
Auth* in Ember apps with Torii
balint
1
230
(Somewhat) Complex Component Design – Ember.BP, 2015/02/11
balint
1
83
Complex Component Design in Ember
balint
0
340
Don't call me back - How Ember uses promises and how you can, too
balint
5
10k
Unit testing in Ember.js
balint
0
61
Introduction to ember-data
balint
0
150
Other Decks in Technology
See All in Technology
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
370
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
2
480
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
0
2.7k
Tellus の衛星データを見てみよう #mf_fukuoka
kongmingstrap
0
190
自己改善からチームを動かす! 「セルフエンジニアリングマネージャー」のすゝめ
shoota
6
700
ゼロから始めるVue.jsコミュニティ貢献 / first-vuejs-community-contribution-link-and-motivation
lmi
1
130
Vertex AI を中心に 生成AIのアップデートを共有します
kaz1437
0
310
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
0
140
IaCジェネレーターとBedrockで詳細設計書を生成してみた
tsukasa_ishimaru
1
210
ChatGPT for IT Service Management (IT Pro)
dahatake
7
1.6k
反実仮想機械学習とは何か
usaito
PRO
11
4.6k
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
390
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
44
9.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Building Adaptive Systems
keathley
31
1.9k
Debugging Ruby Performance
tmm1
70
11k
GitHub's CSS Performance
jonrohan
1025
450k
Visualization
eitanlees
136
14k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Done Done
chrislema
178
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Become a Pro
speakerdeck
PRO
11
4.5k
Gamification - CAS2011
davidbonilla
76
4.6k
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