br-dionysus 1.10.3 → 1.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -34
- package/cypress/screenshots/MSelectTable.cy.ts//344/270/213/346/213/211/350/241/250/346/240/274/351/200/211/346/213/251/345/231/250/347/273/204/344/273/266MSelectTable -- /346/265/213/350/257/225/345/215/225/351/200/211/345/212/237/350/203/275 (failed).png +0 -0
- package/cypress/screenshots/MSelectTable.cy.ts//344/270/213/346/213/211/350/241/250/346/240/274/351/200/211/346/213/251/345/231/250/347/273/204/344/273/266MSelectTable -- /346/265/213/350/257/225/345/237/272/347/241/200/345/212/237/350/203/275 (failed).png +0 -0
- package/cypress/screenshots/MSelectTable.cy.ts//344/270/213/346/213/211/350/241/250/346/240/274/351/200/211/346/213/251/345/231/250/347/273/204/344/273/266MSelectTable -- /346/265/213/350/257/225/345/244/232/351/200/211/345/212/237/350/203/275 (failed).png +0 -0
- package/cypress/screenshots/MSelectTable.cy.ts//344/270/213/346/213/211/350/241/250/346/240/274/351/200/211/346/213/251/345/231/250/347/273/204/344/273/266MSelectTable -- /346/265/213/350/257/225/350/277/234/347/250/213/346/220/234/347/264/242/345/212/237/350/203/275 (failed).png +0 -0
- package/dist/br-dionysus.es.js +3220 -3218
- package/dist/br-dionysus.umd.js +7 -7
- package/dist/index.css +1 -1
- package/dist/packages/SkinConfig/src/useSkin.d.ts +1 -1
- package/package.json +1 -1
- package/packages/SkinConfig/docs/README.md +17 -17
- package/packages/SkinConfig/src/SkinConfig.vue +20 -2
- package/packages/SkinConfig/src/useSkin.ts +1 -11
- package/web-types.json +1 -1
- package/cypress/e2e/1-getting-started/todo.cy.js +0 -143
- package/cypress/e2e/2-advanced-examples/actions.cy.js +0 -321
- package/cypress/e2e/2-advanced-examples/aliasing.cy.js +0 -39
- package/cypress/e2e/2-advanced-examples/assertions.cy.js +0 -176
- package/cypress/e2e/2-advanced-examples/connectors.cy.js +0 -98
- package/cypress/e2e/2-advanced-examples/cookies.cy.js +0 -118
- package/cypress/e2e/2-advanced-examples/cypress_api.cy.js +0 -184
- package/cypress/e2e/2-advanced-examples/files.cy.js +0 -85
- package/cypress/e2e/2-advanced-examples/location.cy.js +0 -32
- package/cypress/e2e/2-advanced-examples/misc.cy.js +0 -90
- package/cypress/e2e/2-advanced-examples/navigation.cy.js +0 -55
- package/cypress/e2e/2-advanced-examples/network_requests.cy.js +0 -163
- package/cypress/e2e/2-advanced-examples/querying.cy.js +0 -114
- package/cypress/e2e/2-advanced-examples/spies_stubs_clocks.cy.js +0 -204
- package/cypress/e2e/2-advanced-examples/storage.cy.js +0 -117
- package/cypress/e2e/2-advanced-examples/traversal.cy.js +0 -121
- package/cypress/e2e/2-advanced-examples/utilities.cy.js +0 -107
- package/cypress/e2e/2-advanced-examples/viewport.cy.js +0 -58
- package/cypress/e2e/2-advanced-examples/waiting.cy.js +0 -30
- package/cypress/e2e/2-advanced-examples/window.cy.js +0 -22
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
|
|
3
|
-
context('Traversal', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
cy.visit('https://example.cypress.io/commands/traversal')
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
it('.children() - get child DOM elements', () => {
|
|
9
|
-
// https://on.cypress.io/children
|
|
10
|
-
cy.get('.traversal-breadcrumb')
|
|
11
|
-
.children('.active')
|
|
12
|
-
.should('contain', 'Data')
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
it('.closest() - get closest ancestor DOM element', () => {
|
|
16
|
-
// https://on.cypress.io/closest
|
|
17
|
-
cy.get('.traversal-badge')
|
|
18
|
-
.closest('ul')
|
|
19
|
-
.should('have.class', 'list-group')
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
it('.eq() - get a DOM element at a specific index', () => {
|
|
23
|
-
// https://on.cypress.io/eq
|
|
24
|
-
cy.get('.traversal-list>li')
|
|
25
|
-
.eq(1).should('contain', 'siamese')
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
it('.filter() - get DOM elements that match the selector', () => {
|
|
29
|
-
// https://on.cypress.io/filter
|
|
30
|
-
cy.get('.traversal-nav>li')
|
|
31
|
-
.filter('.active').should('contain', 'About')
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
it('.find() - get descendant DOM elements of the selector', () => {
|
|
35
|
-
// https://on.cypress.io/find
|
|
36
|
-
cy.get('.traversal-pagination')
|
|
37
|
-
.find('li').find('a')
|
|
38
|
-
.should('have.length', 7)
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
it('.first() - get first DOM element', () => {
|
|
42
|
-
// https://on.cypress.io/first
|
|
43
|
-
cy.get('.traversal-table td')
|
|
44
|
-
.first().should('contain', '1')
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
it('.last() - get last DOM element', () => {
|
|
48
|
-
// https://on.cypress.io/last
|
|
49
|
-
cy.get('.traversal-buttons .btn')
|
|
50
|
-
.last().should('contain', 'Submit')
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
it('.next() - get next sibling DOM element', () => {
|
|
54
|
-
// https://on.cypress.io/next
|
|
55
|
-
cy.get('.traversal-ul')
|
|
56
|
-
.contains('apples').next().should('contain', 'oranges')
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
it('.nextAll() - get all next sibling DOM elements', () => {
|
|
60
|
-
// https://on.cypress.io/nextall
|
|
61
|
-
cy.get('.traversal-next-all')
|
|
62
|
-
.contains('oranges')
|
|
63
|
-
.nextAll().should('have.length', 3)
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
it('.nextUntil() - get next sibling DOM elements until next el', () => {
|
|
67
|
-
// https://on.cypress.io/nextuntil
|
|
68
|
-
cy.get('#veggies')
|
|
69
|
-
.nextUntil('#nuts').should('have.length', 3)
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
it('.not() - remove DOM elements from set of DOM elements', () => {
|
|
73
|
-
// https://on.cypress.io/not
|
|
74
|
-
cy.get('.traversal-disabled .btn')
|
|
75
|
-
.not('[disabled]').should('not.contain', 'Disabled')
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
it('.parent() - get parent DOM element from DOM elements', () => {
|
|
79
|
-
// https://on.cypress.io/parent
|
|
80
|
-
cy.get('.traversal-mark')
|
|
81
|
-
.parent().should('contain', 'Morbi leo risus')
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
it('.parents() - get parent DOM elements from DOM elements', () => {
|
|
85
|
-
// https://on.cypress.io/parents
|
|
86
|
-
cy.get('.traversal-cite')
|
|
87
|
-
.parents().should('match', 'blockquote')
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
it('.parentsUntil() - get parent DOM elements from DOM elements until el', () => {
|
|
91
|
-
// https://on.cypress.io/parentsuntil
|
|
92
|
-
cy.get('.clothes-nav')
|
|
93
|
-
.find('.active')
|
|
94
|
-
.parentsUntil('.clothes-nav')
|
|
95
|
-
.should('have.length', 2)
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
it('.prev() - get previous sibling DOM element', () => {
|
|
99
|
-
// https://on.cypress.io/prev
|
|
100
|
-
cy.get('.birds').find('.active')
|
|
101
|
-
.prev().should('contain', 'Lorikeets')
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
it('.prevAll() - get all previous sibling DOM elements', () => {
|
|
105
|
-
// https://on.cypress.io/prevall
|
|
106
|
-
cy.get('.fruits-list').find('.third')
|
|
107
|
-
.prevAll().should('have.length', 2)
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
it('.prevUntil() - get all previous sibling DOM elements until el', () => {
|
|
111
|
-
// https://on.cypress.io/prevuntil
|
|
112
|
-
cy.get('.foods-list').find('#nuts')
|
|
113
|
-
.prevUntil('#veggies').should('have.length', 3)
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
it('.siblings() - get all sibling DOM elements', () => {
|
|
117
|
-
// https://on.cypress.io/siblings
|
|
118
|
-
cy.get('.traversal-pills .active')
|
|
119
|
-
.siblings().should('have.length', 2)
|
|
120
|
-
})
|
|
121
|
-
})
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
|
|
3
|
-
context('Utilities', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
cy.visit('https://example.cypress.io/utilities')
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
it('Cypress._ - call a lodash method', () => {
|
|
9
|
-
// https://on.cypress.io/_
|
|
10
|
-
cy.request('https://jsonplaceholder.cypress.io/users')
|
|
11
|
-
.then((response) => {
|
|
12
|
-
const ids = Cypress._.chain(response.body).map('id').take(3).value()
|
|
13
|
-
|
|
14
|
-
expect(ids).to.deep.eq([1, 2, 3])
|
|
15
|
-
})
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
it('Cypress.$ - call a jQuery method', () => {
|
|
19
|
-
// https://on.cypress.io/$
|
|
20
|
-
const $li = Cypress.$('.utility-jquery li:first')
|
|
21
|
-
|
|
22
|
-
cy.wrap($li).should('not.have.class', 'active')
|
|
23
|
-
cy.wrap($li).click()
|
|
24
|
-
cy.wrap($li).should('have.class', 'active')
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
it('Cypress.Blob - blob utilities and base64 string conversion', () => {
|
|
28
|
-
// https://on.cypress.io/blob
|
|
29
|
-
cy.get('.utility-blob').then(($div) => {
|
|
30
|
-
// https://github.com/nolanlawson/blob-util#imgSrcToDataURL
|
|
31
|
-
// get the dataUrl string for the javascript-logo
|
|
32
|
-
return Cypress.Blob.imgSrcToDataURL('https://example.cypress.io/assets/img/javascript-logo.png', undefined, 'anonymous')
|
|
33
|
-
.then((dataUrl) => {
|
|
34
|
-
// create an <img> element and set its src to the dataUrl
|
|
35
|
-
const img = Cypress.$('<img />', { src: dataUrl })
|
|
36
|
-
|
|
37
|
-
// need to explicitly return cy here since we are initially returning
|
|
38
|
-
// the Cypress.Blob.imgSrcToDataURL promise to our test
|
|
39
|
-
// append the image
|
|
40
|
-
$div.append(img)
|
|
41
|
-
|
|
42
|
-
cy.get('.utility-blob img').click()
|
|
43
|
-
cy.get('.utility-blob img').should('have.attr', 'src', dataUrl)
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
it('Cypress.minimatch - test out glob patterns against strings', () => {
|
|
49
|
-
// https://on.cypress.io/minimatch
|
|
50
|
-
let matching = Cypress.minimatch('/users/1/comments', '/users/*/comments', {
|
|
51
|
-
matchBase: true
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
expect(matching, 'matching wildcard').to.be.true
|
|
55
|
-
|
|
56
|
-
matching = Cypress.minimatch('/users/1/comments/2', '/users/*/comments', {
|
|
57
|
-
matchBase: true
|
|
58
|
-
})
|
|
59
|
-
|
|
60
|
-
expect(matching, 'comments').to.be.false
|
|
61
|
-
|
|
62
|
-
// ** matches against all downstream path segments
|
|
63
|
-
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/**', {
|
|
64
|
-
matchBase: true
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
expect(matching, 'comments').to.be.true
|
|
68
|
-
|
|
69
|
-
// whereas * matches only the next path segment
|
|
70
|
-
|
|
71
|
-
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/*', {
|
|
72
|
-
matchBase: false
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
expect(matching, 'comments').to.be.false
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
it('Cypress.Promise - instantiate a bluebird promise', () => {
|
|
79
|
-
// https://on.cypress.io/promise
|
|
80
|
-
let waited = false
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @return Bluebird<string>
|
|
84
|
-
*/
|
|
85
|
-
function waitOneSecond () {
|
|
86
|
-
// return a promise that resolves after 1 second
|
|
87
|
-
return new Cypress.Promise((resolve, reject) => {
|
|
88
|
-
setTimeout(() => {
|
|
89
|
-
// set waited to true
|
|
90
|
-
waited = true
|
|
91
|
-
|
|
92
|
-
// resolve with 'foo' string
|
|
93
|
-
resolve('foo')
|
|
94
|
-
}, 1000)
|
|
95
|
-
})
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
cy.then(() => {
|
|
99
|
-
// return a promise to cy.then() that
|
|
100
|
-
// is awaited until it resolves
|
|
101
|
-
return waitOneSecond().then((str) => {
|
|
102
|
-
expect(str).to.eq('foo')
|
|
103
|
-
expect(waited).to.be.true
|
|
104
|
-
})
|
|
105
|
-
})
|
|
106
|
-
})
|
|
107
|
-
})
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
context('Viewport', () => {
|
|
3
|
-
beforeEach(() => {
|
|
4
|
-
cy.visit('https://example.cypress.io/commands/viewport')
|
|
5
|
-
})
|
|
6
|
-
|
|
7
|
-
it('cy.viewport() - set the viewport size and dimension', () => {
|
|
8
|
-
// https://on.cypress.io/viewport
|
|
9
|
-
|
|
10
|
-
cy.get('#navbar').should('be.visible')
|
|
11
|
-
cy.viewport(320, 480)
|
|
12
|
-
|
|
13
|
-
// the navbar should have collapse since our screen is smaller
|
|
14
|
-
cy.get('#navbar').should('not.be.visible')
|
|
15
|
-
cy.get('.navbar-toggle').should('be.visible').click()
|
|
16
|
-
cy.get('.nav').find('a').should('be.visible')
|
|
17
|
-
|
|
18
|
-
// lets see what our app looks like on a super large screen
|
|
19
|
-
cy.viewport(2999, 2999)
|
|
20
|
-
|
|
21
|
-
// cy.viewport() accepts a set of preset sizes
|
|
22
|
-
// to easily set the screen to a device's width and height
|
|
23
|
-
|
|
24
|
-
// We added a cy.wait() between each viewport change so you can see
|
|
25
|
-
// the change otherwise it is a little too fast to see :)
|
|
26
|
-
|
|
27
|
-
cy.viewport('macbook-15')
|
|
28
|
-
cy.wait(200)
|
|
29
|
-
cy.viewport('macbook-13')
|
|
30
|
-
cy.wait(200)
|
|
31
|
-
cy.viewport('macbook-11')
|
|
32
|
-
cy.wait(200)
|
|
33
|
-
cy.viewport('ipad-2')
|
|
34
|
-
cy.wait(200)
|
|
35
|
-
cy.viewport('ipad-mini')
|
|
36
|
-
cy.wait(200)
|
|
37
|
-
cy.viewport('iphone-6+')
|
|
38
|
-
cy.wait(200)
|
|
39
|
-
cy.viewport('iphone-6')
|
|
40
|
-
cy.wait(200)
|
|
41
|
-
cy.viewport('iphone-5')
|
|
42
|
-
cy.wait(200)
|
|
43
|
-
cy.viewport('iphone-4')
|
|
44
|
-
cy.wait(200)
|
|
45
|
-
cy.viewport('iphone-3')
|
|
46
|
-
cy.wait(200)
|
|
47
|
-
|
|
48
|
-
// cy.viewport() accepts an orientation for all presets
|
|
49
|
-
// the default orientation is 'portrait'
|
|
50
|
-
cy.viewport('ipad-2', 'portrait')
|
|
51
|
-
cy.wait(200)
|
|
52
|
-
cy.viewport('iphone-4', 'landscape')
|
|
53
|
-
cy.wait(200)
|
|
54
|
-
|
|
55
|
-
// The viewport will be reset back to the default dimensions
|
|
56
|
-
// in between tests (the default can be set in cypress.config.{js|ts})
|
|
57
|
-
})
|
|
58
|
-
})
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
context('Waiting', () => {
|
|
3
|
-
beforeEach(() => {
|
|
4
|
-
cy.visit('https://example.cypress.io/commands/waiting')
|
|
5
|
-
})
|
|
6
|
-
// BE CAREFUL of adding unnecessary wait times.
|
|
7
|
-
// https://on.cypress.io/best-practices#Unnecessary-Waiting
|
|
8
|
-
|
|
9
|
-
// https://on.cypress.io/wait
|
|
10
|
-
it('cy.wait() - wait for a specific amount of time', () => {
|
|
11
|
-
cy.get('.wait-input1').type('Wait 1000ms after typing')
|
|
12
|
-
cy.wait(1000)
|
|
13
|
-
cy.get('.wait-input2').type('Wait 1000ms after typing')
|
|
14
|
-
cy.wait(1000)
|
|
15
|
-
cy.get('.wait-input3').type('Wait 1000ms after typing')
|
|
16
|
-
cy.wait(1000)
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
it('cy.wait() - wait for a specific route', () => {
|
|
20
|
-
// Listen to GET to comments/1
|
|
21
|
-
cy.intercept('GET', '**/comments/*').as('getComment')
|
|
22
|
-
|
|
23
|
-
// we have code that gets a comment when
|
|
24
|
-
// the button is clicked in scripts.js
|
|
25
|
-
cy.get('.network-btn').click()
|
|
26
|
-
|
|
27
|
-
// wait for GET comments/1
|
|
28
|
-
cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304])
|
|
29
|
-
})
|
|
30
|
-
})
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
|
|
3
|
-
context('Window', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
cy.visit('https://example.cypress.io/commands/window')
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
it('cy.window() - get the global window object', () => {
|
|
9
|
-
// https://on.cypress.io/window
|
|
10
|
-
cy.window().should('have.property', 'top')
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
it('cy.document() - get the document object', () => {
|
|
14
|
-
// https://on.cypress.io/document
|
|
15
|
-
cy.document().should('have.property', 'charset').and('eq', 'UTF-8')
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
it('cy.title() - get the title', () => {
|
|
19
|
-
// https://on.cypress.io/title
|
|
20
|
-
cy.title().should('include', 'Kitchen Sink')
|
|
21
|
-
})
|
|
22
|
-
})
|