Skip to content

Commit e8442fd

Browse files
committed
Add more tests
1 parent 0301116 commit e8442fd

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

cypress/integration/test.spec.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,37 @@ describe('Integration Tests', () => {
7272
expect($bar.val()).to.equal(0)
7373
cy.window().invoke('toast.set', id, { progress: 0.2 }).wait(50).then(() => {
7474
expect(parseFloat($bar.val())).to.equal(0.2)
75-
cy.get(',_toastBtn').click()
75+
cy.get('._toastBtn').click()
7676
})
7777
})
7878
})
7979
})
80+
81+
it('Changes default colors', () => {
82+
cy.get('[data-btn=changeDefaultColors]')
83+
.click()
84+
.get('._toastItem')
85+
.should('have.css', 'background-color', 'rgba(255, 255, 255, 0.95)')
86+
.get('._toastBtn')
87+
.click()
88+
})
89+
90+
it('Positions to bottom', () => {
91+
cy.get('[data-btn=positionToBottom]')
92+
.click()
93+
.get('._toastItem')
94+
.should('have.css', 'bottom', '0px')
95+
.get('._toastBtn')
96+
.click()
97+
})
98+
99+
it('Restores defaults', () => {
100+
cy.get('[data-btn=restoreDefaults]')
101+
.click()
102+
.get('._toastItem')
103+
.should('have.css', 'right', '0px')
104+
.and('have.css', 'background-color', 'rgba(66, 66, 66, 0.9)')
105+
.get('._toastBtn')
106+
.click()
107+
})
80108
})

0 commit comments

Comments
 (0)