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
It's a (testing) trap! - Common testing pitfall...
Search
Ramona Schwering
June 08, 2021
Programming
540
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
It's a (testing) trap! - Common testing pitfalls and how to solve them
Ramona Schwering
June 08, 2021
More Decks by Ramona Schwering
See All by Ramona Schwering
Artful Defense
leichteckig
0
45
a11y club: The Cake Is a Lie... And So Is Your Login’s a11y.
leichteckig
0
20
Dangerous Reactivity: Why AI Output Is the New XSS Vue
leichteckig
0
35
React with Caution: How to Hack Your React App (And Fix It Too)
leichteckig
0
24
Vue'tiful Defense
leichteckig
0
140
Workshop: The Cake is a Lie!
leichteckig
0
42
The Cake Is a Lie... And So Is Your Login’s Accessibility
leichteckig
0
230
Plants vs thieves: Automated Tests in the World of Web Security
leichteckig
0
230
From the Crypt to the Code
leichteckig
0
260
Other Decks in Programming
See All in Programming
What We Talk About When We Talk About XP
m_seki
2
640
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
140
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
240
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
480
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
330
Security issues being discussed on Web Platforms
petamoriken
0
960
Are APIs Still Relevant in the AI Era?
soyuka
0
240
WebAssembly in Android Apps 〜 WASMはJNIの夢を見るか
keiji
1
110
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
130
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.8k
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.3k
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
130
Featured
See All Featured
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
670
Prompt Engineering for Job Search
mfonobong
0
450
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Typedesign – Prime Four
hannesfritz
42
3.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
240
The Curse of the Amulet
leimatthew05
3
14k
The Limits of Empathy - UXLibs8
cassininazir
1
670
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
390
RailsConf 2023
tenderlove
30
1.5k
Transcript
None
None
None
None
None
None
None
None
None
None
None
None
None
describe('deprecated.plugin', () => { it('should throw error',() => { …
}); });
describe('deprecated.plugin', () => { it('Property: Should throw an error if
the deprecated prop is used', () => { … }); });
None
describe('Context menu', () => { it('should open the context menu
on click', async () => { const wrapper = createWrapper(); expect(wrapper.vm).toBeTruthy(); await wrapper.trigger('click'); const selector = '.sw-context-menu'; expect(wrapper.find(selector).isVisible()).toBeTruthy(); }); });
describe('Context menu', () => { it('should open the context menu
on click', () => { }); });
describe('Context menu', () => { it('should open the context menu
on click', () => { }); }); // Arrange const wrapper = createWrapper(); const selector = '.sw-context-menu';
describe('Context menu', () => { it('should open the context menu
on click', () => { }); }); // Arrange const wrapper = createWrapper(); const selector = '.sw-context-menu'; // Act await wrapper.trigger('click');
describe('Context menu', () => { it('should open the context menu
on click', () => { }); }); // Arrange const wrapper = createWrapper(); const selector = '.sw-context-menu'; // Act await wrapper.trigger('click'); // Assert expect(wrapper.vm).toBeTruthy(); expect(wrapper.find(selector).isVisible()).toBeTruthy();
None
None
“…arrange my test == what I’m given.”
“…arrange my test == what I’m given.” “…act in my
test == when something happens.”
“…arrange my test == what I’m given.” “…act in my
test == when something happens.” “…assert the results == something happens then this is what I expect as the outcome.”
“…arrange my test == what I’m given.” “…act in my
test == when something happens.” “…assert the results == something happens then this is what I expect as the outcome.”
describe('Context menu', () => { it('should open the context menu
on click', () => { // Given const contextButtonSelector = 'sw-context-button'; const contextMenuSelector = '.sw-context-menu'; // When let contextMenu = wrapper.find(contextMenuSelector); expect(contextMenu.isVisible()).toBe(false); const contextButton = wrapper.find(contextButtonSelector); await contextButton.trigger('click'); // Then contextMenu = wrapper.find(contextMenuSelector); expect(contextMenu.isVisible()).toBe(true); }); });
None
None
it('should create and read product', () => { … cy.get('.sw-field—product-name').type('T-Shirt
Ackbar'); cy.get('.sw-select-product__select_manufacturer') .type('Space Company’); … });
it('should create and read product', () => { … cy.get('.sw-field—product-name').type('T-Shirt
Ackbar'); cy.get('.sw-select-product__select_manufacturer') .type('Space Company’); … });
None
None
None
Cypress.Commands.add('typeSingleSelect', { prevSubject: 'element', }, (subject, value, selector) => {
… cy.wait(500); cy.get(`${selector} input`) .type(value); });
None
None
None
None
None
None
None