Skip to content

Commit 69536c2

Browse files
committed
test: add e2e tests for the counter
1 parent be3fa73 commit 69536c2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* eslint-disable no-undef */
2+
describe('counter', () => {
3+
beforeEach(() => {
4+
cy.visit('/')
5+
})
6+
7+
it('should increment the counter', () => {
8+
cy.get('h4').contains('0')
9+
cy.get("[data-qa='increment-counter']").click()
10+
cy.get('h4').contains('1')
11+
})
12+
13+
it('should decrement the counter', () => {
14+
cy.get('h4').contains('0')
15+
cy.get("[data-qa='decrement-counter']").click()
16+
cy.get('h4').contains('-1')
17+
})
18+
})

0 commit comments

Comments
 (0)