Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Selenium + Sinon.js
Search
Kazuhito Hokamura
January 27, 2015
Programming
850
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Selenium + Sinon.js
http://qiita.com/hokaccha/items/9f4dc019c2ea8c6c58a3
Kazuhito Hokamura
January 27, 2015
Transcript
6 slides
Selenium + Sinon.js #template_literal_sushi #e2e_sushi
$('button').click(function() { navigator.geolocation.getCurrentPosition( function(res) { var lat = res.coords.latitude; var
lon = res.coords.longitude; $('#pos').text(lat + ':' + lon); }); });
// stub.js sinon.stub(navigator.geolocation, 'getCurrentPosition') .callsArgWith(0, { coords: { latitude: 10,
longitude: 20 } });
// sinon.jsͱstubͷεΫϦϓτΛ࣮ߦ driver.executeScript(fs.readFileSync('./sinon.js').toString()); driver.executeScript(fs.readFileSync('./stub.js').toString()); // ςετ࣮ߦ driver.findElement(By.css('button')).click(); driver.findElement(By.css('#pos')).getText().then(function(text) { assert(text
=== '10:20'); });
ଞʹ͜͏͍͏έʔεͰ͑Δ͔ • खͰ࠶ݱͮ͠Β͍ҟৗܥͷ࠶ݱ • APIϨεϙϯεͷmockԽ
ͨͩ͠Γ͗͢Δͱ ࢮ͵ͷͰҙ
More Decks by Kazuhito Hokamura
See All by Kazuhito Hokamura
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5.9k
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
5.2k
Kotlin製のGraphQLサーバーをNode.jsでモジュラモノリス化している話
hokaccha
0
3.9k
GraphQLの負債と向き合うためにやっていること
hokaccha
2
1.7k
ユビーのアーキテクチャに対する取り組み
hokaccha
1
530
RailsエンジニアのためのNext.js入門
hokaccha
7
22k
Cookpad Summer Internship 2021 Web Frontend
hokaccha
0
7.4k
巨大なモノリシック Rails アプリケーションの マイクロサービス化戦略 / 2019 microservices in cookpad
hokaccha
3
4.2k
巨大なRailsアプリケーションを「普通」にするための取り組み
hokaccha
1
1.2k
Other Decks in Programming
See All in Programming
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
170
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
140
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
410
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6k
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
SODA - FACT BOOK(EN)
sodainc
1
260
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
340
AI Augmentation Techniques with Liberty
ivargrimstad
1
510
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
380
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
30 Presentation Tips
portentint
PRO
1
470
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
570
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
A designer walks into a library…
pauljervisheath
211
25k
Mobile First: as difficult as doing things right
swwweet
225
10k
Become a Pro
speakerdeck
PRO
31
6.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k