cypress-plugin-last-failed 2.0.6 → 2.0.7
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/cypress/e2e/tests.cy.js +10 -2
- package/package.json +1 -1
- package/runFailed.js +6 -5
package/cypress/e2e/tests.cy.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
describe('Should run expected tests', () => {
|
|
1
|
+
describe('Should, run expected tests', () => {
|
|
2
2
|
it('should run', () => {
|
|
3
3
|
if (Cypress.env('shouldPass')) {
|
|
4
4
|
expect(true).to.eq(true);
|
|
@@ -19,7 +19,7 @@ describe('Should run expected tests', () => {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
it('will be included in failed tests', () => {
|
|
22
|
+
it('will, be included in failed tests', () => {
|
|
23
23
|
if (Cypress.env('shouldPass')) {
|
|
24
24
|
expect(10).to.eq(10);
|
|
25
25
|
} else {
|
|
@@ -39,3 +39,11 @@ describe('Should run expected tests', () => {
|
|
|
39
39
|
expect(10).to.eq(10);
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
+
|
|
43
|
+
it('non-suite test, 1', () => {
|
|
44
|
+
if (Cypress.env('shouldPass')) {
|
|
45
|
+
expect(true).to.eq(true);
|
|
46
|
+
} else {
|
|
47
|
+
expect(true).to.eq(false);
|
|
48
|
+
}
|
|
49
|
+
});
|
package/package.json
CHANGED
package/runFailed.js
CHANGED
|
@@ -29,16 +29,17 @@ Try running tests again with cypress run`;
|
|
|
29
29
|
test,
|
|
30
30
|
}));
|
|
31
31
|
// Combine parent suite and test together
|
|
32
|
+
// If parent title is empty do not add space before test title
|
|
32
33
|
const resultSet = new Set(
|
|
33
34
|
Object.values(parentAndTest).flatMap(
|
|
34
|
-
(parent) =>
|
|
35
|
+
(parent) =>
|
|
36
|
+
(parent.parent !== '' ? parent.parent + ' ' : parent.parent) +
|
|
37
|
+
parent.test
|
|
35
38
|
)
|
|
36
39
|
);
|
|
40
|
+
|
|
37
41
|
// Format string for use in grep functionality
|
|
38
|
-
const stringedTests = Array.from(resultSet)
|
|
39
|
-
.toString()
|
|
40
|
-
.replaceAll(',', ' ')
|
|
41
|
-
.slice(0, -1);
|
|
42
|
+
const stringedTests = Array.from(resultSet).join('; ').toString();
|
|
42
43
|
|
|
43
44
|
if (stringedTests.length > 0) {
|
|
44
45
|
// Allow for additional cli arguments to be passed to the run command
|