cypress-cli-select 1.2.0 → 2.0.0
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/.prettierrc
ADDED
|
@@ -115,7 +115,7 @@ context('Cypress APIs', () => {
|
|
|
115
115
|
});
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
-
context('Cypress.
|
|
118
|
+
context('Cypress.expose()', () => {
|
|
119
119
|
beforeEach(() => {
|
|
120
120
|
cy.visit('https://example.cypress.io/cypress-api');
|
|
121
121
|
});
|
|
@@ -126,21 +126,21 @@ context('Cypress APIs', () => {
|
|
|
126
126
|
it('Get environment variables', () => {
|
|
127
127
|
// https://on.cypress.io/env
|
|
128
128
|
// set multiple environment variables
|
|
129
|
-
Cypress.
|
|
129
|
+
Cypress.expose({
|
|
130
130
|
host: 'veronica.dev.local',
|
|
131
131
|
api_server: 'http://localhost:8888/v1/',
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
// get environment variable
|
|
135
|
-
expect(Cypress.
|
|
135
|
+
expect(Cypress.expose('host')).to.eq('veronica.dev.local');
|
|
136
136
|
|
|
137
137
|
// set environment variable
|
|
138
|
-
Cypress.
|
|
139
|
-
expect(Cypress.
|
|
138
|
+
Cypress.expose('api_server', 'http://localhost:8888/v2/');
|
|
139
|
+
expect(Cypress.expose('api_server')).to.eq('http://localhost:8888/v2/');
|
|
140
140
|
|
|
141
141
|
// get all environment variable
|
|
142
|
-
expect(Cypress.
|
|
143
|
-
expect(Cypress.
|
|
142
|
+
expect(Cypress.expose()).to.have.property('host', 'veronica.dev.local');
|
|
143
|
+
expect(Cypress.expose()).to.have.property(
|
|
144
144
|
'api_server',
|
|
145
145
|
'http://localhost:8888/v2/'
|
|
146
146
|
);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
context('Misc', () => {
|
|
4
4
|
beforeEach(() => {
|
|
5
|
-
cy.visit('https://example.cypress.io/commands/misc')
|
|
6
|
-
})
|
|
5
|
+
cy.visit('https://example.cypress.io/commands/misc');
|
|
6
|
+
});
|
|
7
7
|
|
|
8
8
|
it('cy.exec() - execute a system command', () => {
|
|
9
9
|
// execute a system command.
|
|
@@ -14,58 +14,60 @@ context('Misc', () => {
|
|
|
14
14
|
// we can use Cypress.platform string to
|
|
15
15
|
// select appropriate command
|
|
16
16
|
// https://on.cypress/io/platform
|
|
17
|
-
cy.log(`Platform ${Cypress.platform} architecture ${Cypress.arch}`)
|
|
17
|
+
cy.log(`Platform ${Cypress.platform} architecture ${Cypress.arch}`);
|
|
18
18
|
|
|
19
19
|
// on CircleCI Windows build machines we have a failure to run bash shell
|
|
20
20
|
// https://github.com/cypress-io/cypress/issues/5169
|
|
21
|
-
// so skip some of the tests by passing flag "--
|
|
22
|
-
const isCircleOnWindows =
|
|
21
|
+
// so skip some of the tests by passing flag "--expose circle=true"
|
|
22
|
+
const isCircleOnWindows =
|
|
23
|
+
Cypress.platform === 'win32' && Cypress.expose('circle');
|
|
23
24
|
|
|
24
25
|
if (isCircleOnWindows) {
|
|
25
|
-
cy.log('Skipping test on CircleCI')
|
|
26
|
+
cy.log('Skipping test on CircleCI');
|
|
26
27
|
|
|
27
|
-
return
|
|
28
|
+
return;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
// cy.exec problem on Shippable CI
|
|
31
32
|
// https://github.com/cypress-io/cypress/issues/6718
|
|
32
|
-
const isShippable =
|
|
33
|
+
const isShippable =
|
|
34
|
+
Cypress.platform === 'linux' && Cypress.expose('shippable');
|
|
33
35
|
|
|
34
36
|
if (isShippable) {
|
|
35
|
-
cy.log('Skipping test on ShippableCI')
|
|
37
|
+
cy.log('Skipping test on ShippableCI');
|
|
36
38
|
|
|
37
|
-
return
|
|
39
|
+
return;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
cy.exec('echo Jane Lane')
|
|
41
|
-
.its('stdout').should('contain', 'Jane Lane')
|
|
42
|
+
cy.exec('echo Jane Lane').its('stdout').should('contain', 'Jane Lane');
|
|
42
43
|
|
|
43
44
|
if (Cypress.platform === 'win32') {
|
|
44
45
|
cy.exec(`print ${Cypress.config('configFile')}`)
|
|
45
|
-
.its('stderr')
|
|
46
|
+
.its('stderr')
|
|
47
|
+
.should('be.empty');
|
|
46
48
|
} else {
|
|
47
49
|
cy.exec(`cat ${Cypress.config('configFile')}`)
|
|
48
|
-
.its('stderr')
|
|
50
|
+
.its('stderr')
|
|
51
|
+
.should('be.empty');
|
|
49
52
|
|
|
50
|
-
cy.exec('pwd')
|
|
51
|
-
.its('code').should('eq', 0)
|
|
53
|
+
cy.exec('pwd').its('code').should('eq', 0);
|
|
52
54
|
}
|
|
53
|
-
})
|
|
55
|
+
});
|
|
54
56
|
|
|
55
57
|
it('cy.focused() - get the DOM element that has focus', () => {
|
|
56
58
|
// https://on.cypress.io/focused
|
|
57
|
-
cy.get('.misc-form').find('#name').click()
|
|
58
|
-
cy.focused().should('have.id', 'name')
|
|
59
|
+
cy.get('.misc-form').find('#name').click();
|
|
60
|
+
cy.focused().should('have.id', 'name');
|
|
59
61
|
|
|
60
|
-
cy.get('.misc-form').find('#description').click()
|
|
61
|
-
cy.focused().should('have.id', 'description')
|
|
62
|
-
})
|
|
62
|
+
cy.get('.misc-form').find('#description').click();
|
|
63
|
+
cy.focused().should('have.id', 'description');
|
|
64
|
+
});
|
|
63
65
|
|
|
64
66
|
context('Cypress.Screenshot', function () {
|
|
65
67
|
it('cy.screenshot() - take a screenshot', () => {
|
|
66
68
|
// https://on.cypress.io/screenshot
|
|
67
|
-
cy.screenshot('my-image')
|
|
68
|
-
})
|
|
69
|
+
cy.screenshot('my-image');
|
|
70
|
+
});
|
|
69
71
|
|
|
70
72
|
it('Cypress.Screenshot.defaults() - change default config of screenshots', function () {
|
|
71
73
|
Cypress.Screenshot.defaults({
|
|
@@ -75,16 +77,16 @@ context('Misc', () => {
|
|
|
75
77
|
scale: false,
|
|
76
78
|
disableTimersAndAnimations: true,
|
|
77
79
|
screenshotOnRunFailure: true,
|
|
78
|
-
onBeforeScreenshot
|
|
79
|
-
onAfterScreenshot
|
|
80
|
-
})
|
|
81
|
-
})
|
|
82
|
-
})
|
|
80
|
+
onBeforeScreenshot() {},
|
|
81
|
+
onAfterScreenshot() {},
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
83
85
|
|
|
84
86
|
it('cy.wrap() - wrap an object', () => {
|
|
85
87
|
// https://on.cypress.io/wrap
|
|
86
88
|
cy.wrap({ foo: 'bar' })
|
|
87
89
|
.should('have.property', 'foo')
|
|
88
|
-
.and('include', 'bar')
|
|
89
|
-
})
|
|
90
|
-
})
|
|
90
|
+
.and('include', 'bar');
|
|
91
|
+
});
|
|
92
|
+
});
|
package/cypress.config.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
const { defineConfig } = require(
|
|
1
|
+
const { defineConfig } = require('cypress');
|
|
2
2
|
|
|
3
3
|
module.exports = defineConfig({
|
|
4
4
|
e2e: {
|
|
5
|
+
allowCypressEnv: false,
|
|
5
6
|
trashAssetsBeforeRuns: false,
|
|
6
7
|
setupNodeEvents(on, config) {
|
|
7
|
-
require(
|
|
8
|
-
on(
|
|
8
|
+
require('@bahmutov/cy-grep/src/plugin')(config);
|
|
9
|
+
on('task', {
|
|
9
10
|
log(message) {
|
|
10
11
|
console.log(message);
|
|
11
12
|
return null;
|
|
@@ -17,6 +18,6 @@ module.exports = defineConfig({
|
|
|
17
18
|
},
|
|
18
19
|
|
|
19
20
|
component: {
|
|
20
|
-
specPattern:
|
|
21
|
+
specPattern: './src/components/',
|
|
21
22
|
},
|
|
22
23
|
});
|
package/cypress.new.config.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
const { defineConfig } = require(
|
|
1
|
+
const { defineConfig } = require('cypress');
|
|
2
2
|
|
|
3
3
|
module.exports = defineConfig({
|
|
4
4
|
e2e: {
|
|
5
|
+
allowCypressEnv: false,
|
|
5
6
|
trashAssetsBeforeRuns: false,
|
|
6
|
-
specPattern:
|
|
7
|
+
specPattern: './cypress/e2e/1-getting-started/',
|
|
7
8
|
setupNodeEvents(on, config) {
|
|
8
9
|
// on("before:run", (details) => {
|
|
9
10
|
// console.log(details);
|
|
10
11
|
// });
|
|
11
|
-
require(
|
|
12
|
-
on(
|
|
12
|
+
require('@bahmutov/cy-grep/src/plugin')(config);
|
|
13
|
+
on('task', {
|
|
13
14
|
log(message) {
|
|
14
15
|
console.log(message);
|
|
15
16
|
return null;
|
|
@@ -21,6 +22,6 @@ module.exports = defineConfig({
|
|
|
21
22
|
},
|
|
22
23
|
|
|
23
24
|
component: {
|
|
24
|
-
specPattern:
|
|
25
|
+
specPattern: './src/components/',
|
|
25
26
|
},
|
|
26
27
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cypress-cli-select",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A Cypress cli prompt to select and run specs, tests or tags",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"cli-testing-library": "^2.0.2",
|
|
11
|
-
"cypress": "^15.
|
|
11
|
+
"cypress": "^15.12.0",
|
|
12
12
|
"jest": "^29.7.0"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/dennisbergevin/cypress-cli-select#readme",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@bahmutov/cy-grep": "^
|
|
37
|
+
"@bahmutov/cy-grep": "^3.0.1",
|
|
38
38
|
"@inquirer/core": "^10.1.11",
|
|
39
|
-
"find-cypress-specs": "^1.54.
|
|
39
|
+
"find-cypress-specs": "^1.54.10",
|
|
40
40
|
"find-test-names": "^1.29.19",
|
|
41
41
|
"fuse.js": "^7.1.0",
|
|
42
42
|
"inquirer-select-pro": "^1.0.0-alpha.9",
|