forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap-button.component.cy-spec.ts
More file actions
42 lines (37 loc) · 1.08 KB
/
bootstrap-button.component.cy-spec.ts
File metadata and controls
42 lines (37 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { initEnv, mount, setConfig } from '@cypress/angular'
import { BootstrapButtonComponent } from './bootstrap-button.component'
describe('BootstrapButtonComponent', () => {
describe('setConfig function', () => {
beforeEach(() => {
setConfig({
stylesheet:
'https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css',
})
initEnv(BootstrapButtonComponent)
})
it('should create', () => {
mount(BootstrapButtonComponent)
// Should have BootStrap color style
cy.get('button').should(
'have.css',
'background-color',
'rgb(0, 123, 255)',
)
})
})
describe('setConfig in initEnv', () => {
it('should create', () => {
initEnv(BootstrapButtonComponent, {
stylesheet:
'https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css',
})
mount(BootstrapButtonComponent)
// Should have BootStrap color style
cy.get('button').should(
'have.css',
'background-color',
'rgb(0, 123, 255)',
)
})
})
})