-
-
-
- {model.commands.length ? : }
-
-
+
+
this._scrollIntoView()} />
)
}
-
- _shouldBeOpen () {
- // if this.isOpen is non-null, prefer that since the user has
- // explicity chosen to open or close the test
- if (this.isOpen !== null) return this.isOpen
-
- // otherwise, look at reasons to auto-open the test
- return this.props.model.state === 'failed'
- || this.props.model.isOpen
- || this.props.model.isLongRunning
- || this.props.runnablesStore.hasSingleTest
- }
-
- @action _toggleOpen = () => {
- if (this.isOpen === null) {
- this.isOpen = !this._shouldBeOpen()
- } else {
- this.isOpen = !this.isOpen
- }
- }
}
-export { NoCommands }
-
export default Test
diff --git a/packages/runner/__snapshots__/retries.mochaEvents.spec.js b/packages/runner/__snapshots__/retries.mochaEvents.spec.js
new file mode 100644
index 000000000000..cff75b2f8808
--- /dev/null
+++ b/packages/runner/__snapshots__/retries.mochaEvents.spec.js
@@ -0,0 +1,6458 @@
+exports['src/cypress/runner retries mochaEvents simple retry #1'] = [
+ [
+ "mocha",
+ "start",
+ {
+ "start": "match.date"
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "end",
+ {
+ "end": "match.date"
+ }
+ ]
+]
+
+exports['src/cypress/runner retries mochaEvents test retry with hooks #1'] = [
+ [
+ "mocha",
+ "start",
+ {
+ "start": "match.date"
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "end",
+ {
+ "end": "match.date"
+ }
+ ]
+]
+
+exports['src/cypress/runner retries mochaEvents test retry with [only] #1'] = [
+ [
+ "mocha",
+ "start",
+ {
+ "start": "match.date"
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r4",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r5",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r5",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r5",
+ "order": 2,
+ "title": "test 2",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r5",
+ "order": 2,
+ "title": "test 2",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r5",
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r5",
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r5",
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r4",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r5",
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "end",
+ {
+ "end": "match.date"
+ }
+ ]
+]
+
+exports['src/cypress/runner retries mochaEvents can retry from [beforeEach] #1'] = [
+ [
+ "mocha",
+ "start",
+ {
+ "start": "match.date"
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "before each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h3",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "before each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h3",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h5",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h5",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "end",
+ {
+ "end": "match.date"
+ }
+ ]
+]
+
+exports['src/cypress/runner retries mochaEvents can retry from [afterEach] #1'] = [
+ [
+ "mocha",
+ "start",
+ {
+ "start": "match.date"
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "after each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h1",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 2
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "after each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h1",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 1,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "body": "[body]",
+ "type": "test",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h5",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h5",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r6",
+ "title": "suite 2",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r7",
+ "order": 4,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r7",
+ "order": 4,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h7",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r7",
+ "order": 4,
+ "title": "test 1",
+ "hookName": "after each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h7",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h7",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 2
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h7",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r7",
+ "order": 4,
+ "title": "test 1",
+ "hookName": "after each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h7",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h7",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r7",
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 1,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h7",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r7",
+ "title": "test 1",
+ "hookName": "after each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h7",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h7",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": false,
+ "currentRetry": 1,
+ "retries": 2
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h7",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r7",
+ "title": "test 1",
+ "hookName": "after each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h7",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h7",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": false,
+ "currentRetry": 1,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r7",
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 2,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h7",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h7",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r7",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r7",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h7",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 2,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r7",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h7",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 2,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r7",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h7",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 2,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r6",
+ "title": "suite 2",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r8",
+ "title": "suite 3",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r9",
+ "order": 5,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r9",
+ "order": 5,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r9",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r9",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": "relative/path/to/spec.js",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r9",
+ "order": 5,
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r9",
+ "order": 5,
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r8",
+ "title": "suite 3",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r9",
+ "order": 5,
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "end",
+ {
+ "end": "match.date"
+ }
+ ]
+]
+
+exports['src/cypress/runner retries mochaEvents cant retry from [before] #1'] = [
+ [
+ "mocha",
+ "start",
+ {
+ "start": "match.date"
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "fail",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook for \"test 1\"",
+ "hookName": "before all",
+ "hookId": "h1",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "originalTitle": "\"before all\" hook",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "before all",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h1",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "before all",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h1",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "end",
+ {
+ "end": "match.date"
+ }
+ ]
+]
+
+exports['src/cypress/runner retries mochaEvents cant retry from [after] #1'] = [
+ [
+ "mocha",
+ "start",
+ {
+ "start": "match.date"
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h5",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h5",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h6",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "fail",
+ {
+ "id": "r3",
+ "title": "\"after all\" hook for \"test 1\"",
+ "hookName": "after all",
+ "hookId": "h4",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "originalTitle": "\"after all\" hook",
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "after all",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h4",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "after all",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h4",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h5",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ {
+ "hookId": "h6",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 1
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "end",
+ {
+ "end": "match.date"
+ }
+ ]
+]
+
+exports['src/cypress/runner retries mochaEvents three tests with retry #1'] = [
+ [
+ "mocha",
+ "start",
+ {
+ "start": "match.date"
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "suite",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before all\" hook",
+ "hookName": "before all",
+ "hookId": "h1",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 2
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r4",
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 1,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "retry",
+ {
+ "id": "r4",
+ "title": "test 2",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": false,
+ "currentRetry": 1,
+ "retries": 2
+ },
+ {
+ "message": "[error message]",
+ "name": "AssertionError",
+ "stack": "match.string",
+ "sourceMappedStack": "match.string",
+ "parsedStack": "match.array",
+ "actual": null,
+ "showDiff": false
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r4",
+ "title": "test 2",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": false,
+ "currentRetry": 1,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r4",
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "currentRetry": 2,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r4",
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 2,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r4",
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 2,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r4",
+ "title": "test 2",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 2,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "body": "[body]",
+ "type": "test",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"before each\" hook",
+ "hookName": "before each",
+ "hookId": "h2",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "pass",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 2
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r1",
+ "title": "",
+ "root": true,
+ "type": "suite",
+ "file": "relative/path/to/spec.js",
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "end",
+ {
+ "end": "match.date"
+ }
+ ]
+]
+
+exports['src/cypress/runner retries mochaEvents screenshots retry screenshot in test body #1'] = [
+ "take:screenshot",
+ {
+ "titles": [
+ "suite 1",
+ "test 1"
+ ],
+ "testId": "r3",
+ "testAttemptIndex": "match.match(0)",
+ "capture": "fullPage",
+ "clip": {
+ "x": 0,
+ "y": 0,
+ "width": 1000,
+ "height": 660
+ },
+ "viewport": {
+ "width": 1000,
+ "height": 660
+ },
+ "scaled": false,
+ "blackout": [],
+ "startTime": "match.string",
+ "current": 1,
+ "total": 1
+ }
+]
+
+exports['src/cypress/runner retries mochaEvents screenshots retry screenshot in test body #2'] = {
+ "id": "r3",
+ "testAttemptIndex": "match.match(0)",
+ "isOpen": false,
+ "appOnly": true,
+ "scale": false,
+ "waitForCommandSynchronization": false,
+ "disableTimersAndAnimations": true,
+ "blackout": []
+}
+
+exports['serialize state - retries'] = {
+ "currentId": "r6",
+ "tests": {
+ "r3": {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": 1,
+ "wallClockStartedAt": "1970-01-01T00:00:00.000Z",
+ "wallClockDuration": 1,
+ "timings": {
+ "lifecycle": 1,
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": 1,
+ "afterFnDuration": 1
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": 1,
+ "afterFnDuration": 1
+ }
+ ],
+ "test": {
+ "fnDuration": 1,
+ "afterFnDuration": 1
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": 1,
+ "afterFnDuration": 1
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": 1,
+ "afterFnDuration": 1
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 1,
+ "hooks": [],
+ "prevAttempts": []
+ },
+ "r5": {
+ "id": "r5",
+ "title": "test 1",
+ "state": "passed",
+ "body": "[body]",
+ "type": "test",
+ "duration": 1,
+ "wallClockStartedAt": "1970-01-01T00:00:00.000Z",
+ "wallClockDuration": 1,
+ "timings": {
+ "lifecycle": 1,
+ "test": {
+ "fnDuration": 1,
+ "afterFnDuration": 1
+ }
+ },
+ "file": null,
+ "final": true,
+ "currentRetry": 1,
+ "retries": 1,
+ "prevAttempts": [
+ {
+ "id": "r5",
+ "order": 2,
+ "title": "test 1",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": 1,
+ "wallClockStartedAt": "1970-01-01T00:00:00.000Z",
+ "wallClockDuration": 1,
+ "timings": {
+ "lifecycle": 1,
+ "test": {
+ "fnDuration": 1,
+ "afterFnDuration": 1
+ }
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": false,
+ "currentRetry": 0,
+ "retries": 1,
+ "hooks": []
+ }
+ ]
+ }
+ },
+ "startTime": "1970-01-01T00:00:00.000Z",
+ "emissions": {
+ "started": {
+ "r1": true,
+ "r2": true,
+ "r3": true,
+ "r4": true,
+ "r5": true,
+ "r6": true
+ },
+ "ended": {
+ "r3": true,
+ "r2": true,
+ "r5": true
+ }
+ },
+ "passed": 2,
+ "failed": 0,
+ "pending": 0,
+ "numLogs": 0
+}
diff --git a/packages/runner/__snapshots__/runner.mochaEvents.spec.js b/packages/runner/__snapshots__/runner.mochaEvents.spec.js
index 97daa2d5fa39..b32f5dd5eb04 100644
--- a/packages/runner/__snapshots__/runner.mochaEvents.spec.js
+++ b/packages/runner/__snapshots__/runner.mochaEvents.spec.js
@@ -14,7 +14,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -25,7 +26,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -39,7 +41,25 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -57,7 +77,9 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"duration": "match.number",
"file": null,
"originalTitle": "\"before all\" hook",
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
},
{
"message": "[error message]",
@@ -77,7 +99,40 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "before all",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h1",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -107,7 +162,10 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -118,7 +176,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -146,7 +205,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -157,7 +217,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -170,7 +231,9 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"body": "[body]",
"type": "test",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -184,7 +247,25 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -202,7 +283,9 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"duration": "match.number",
"file": null,
"originalTitle": "\"before each\" hook",
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
},
{
"message": "[error message]",
@@ -214,6 +297,38 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"showDiff": false
}
],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "before each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h1",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "before each": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
+ }
+ ],
[
"mocha",
"suite end",
@@ -222,7 +337,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -252,7 +368,10 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -263,7 +382,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -291,7 +411,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -302,80 +423,39 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
- }
- ],
- [
- "mocha",
- "test",
- {
- "id": "r3",
- "order": 1,
- "title": "test 1",
- "body": "[body]",
- "type": "test",
"file": null,
- "invocationDetails": "{Object 8}"
+ "retries": -1
}
],
[
"mocha",
- "pass",
+ "test",
{
"id": "r3",
"order": 1,
"title": "test 1",
- "state": "passed",
"body": "[body]",
"type": "test",
- "duration": "match.number",
- "wallClockStartedAt": "match.date",
- "timings": {
- "lifecycle": "match.number",
- "test": {
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- },
- "after each": [
- {
- "hookId": "h1",
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- }
- ]
- },
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
"mocha",
- "test end",
+ "test:before:run",
{
"id": "r3",
"order": 1,
"title": "test 1",
- "state": "passed",
"body": "[body]",
"type": "test",
- "duration": "match.number",
"wallClockStartedAt": "match.date",
- "timings": {
- "lifecycle": "match.number",
- "test": {
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- },
- "after each": [
- {
- "hookId": "h1",
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- }
- ]
- },
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -389,7 +469,9 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -407,7 +489,9 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"duration": "match.number",
"file": null,
"originalTitle": "\"after each\" hook",
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
},
{
"message": "[error message]",
@@ -419,6 +503,42 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"showDiff": false
}
],
+ [
+ "mocha",
+ "test end",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "hookName": "after each",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h1",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
+ }
+ ],
[
"mocha",
"suite end",
@@ -427,7 +547,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -461,7 +582,10 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -472,7 +596,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -500,7 +625,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -511,7 +637,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -524,7 +651,25 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"body": "[body]",
"type": "test",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -547,7 +692,10 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
}
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -570,7 +718,10 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
}
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -594,7 +745,10 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
}
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -607,67 +761,25 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"body": "[body]",
"type": "test",
"file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "pass",
- {
- "id": "r4",
- "order": 2,
- "title": "test 2",
- "state": "passed",
- "body": "[body]",
- "type": "test",
- "duration": "match.number",
- "wallClockStartedAt": "match.date",
- "timings": {
- "lifecycle": "match.number",
- "test": {
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- },
- "after all": [
- {
- "hookId": "h1",
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- }
- ]
- },
- "file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
"mocha",
- "test end",
+ "test:before:run",
{
"id": "r4",
"order": 2,
"title": "test 2",
- "state": "passed",
"body": "[body]",
"type": "test",
- "duration": "match.number",
"wallClockStartedAt": "match.date",
- "timings": {
- "lifecycle": "match.number",
- "test": {
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- },
- "after all": [
- {
- "hookId": "h1",
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- }
- ]
- },
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -681,7 +793,9 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -699,7 +813,9 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"duration": "match.number",
"file": null,
"originalTitle": "\"after all\" hook",
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
},
{
"message": "[error message]",
@@ -713,14 +829,51 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
],
[
"mocha",
- "suite end",
+ "test end",
{
- "id": "r2",
- "title": "suite 1",
- "root": false,
- "type": "suite",
- "file": null
- }
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "hookName": "after all",
+ "err": "{Object 9}",
+ "state": "failed",
+ "failedFromHookId": "h1",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "timings": {
+ "lifecycle": "match.number",
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
+ }
+ ],
+ [
+ "mocha",
+ "suite end",
+ {
+ "id": "r2",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
+ "file": null,
+ "retries": -1
+ }
],
[
"mocha",
@@ -753,7 +906,10 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -764,7 +920,8 @@ exports['src/cypress/runner tests finish with correct state hook failures fail i
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -792,7 +949,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -803,7 +961,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -817,7 +976,25 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r5",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -832,7 +1009,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -840,6 +1019,7 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"test",
{
"id": "r5",
+ "order": 2,
"title": "test 2",
"body": "[body]",
"type": "test",
@@ -880,7 +1060,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -894,7 +1076,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -909,7 +1093,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -917,6 +1103,7 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"fail",
{
"id": "r5",
+ "order": 2,
"title": "test 2",
"err": "{Object 9}",
"state": "failed",
@@ -960,7 +1147,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 0
},
{
"message": "[error message]",
@@ -972,57 +1161,6 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"showDiff": false
}
],
- [
- "mocha",
- "test end",
- {
- "id": "r5",
- "title": "test 2",
- "err": "{Object 9}",
- "state": "failed",
- "body": "[body]",
- "type": "test",
- "duration": "match.number",
- "wallClockStartedAt": "match.date",
- "timings": {
- "lifecycle": "match.number",
- "before all": [
- {
- "hookId": "h1",
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- }
- ],
- "before each": [
- {
- "hookId": "h2",
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- }
- ],
- "test": {
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- },
- "after each": [
- {
- "hookId": "h4",
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- }
- ],
- "after all": [
- {
- "hookId": "h3",
- "fnDuration": "match.number",
- "afterFnDuration": "match.number"
- }
- ]
- },
- "file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
[
"mocha",
"hook",
@@ -1034,7 +1172,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1049,7 +1189,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1063,7 +1205,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1078,14 +1222,17 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
"mocha",
- "test:after:run",
+ "test end",
{
"id": "r5",
+ "order": 2,
"title": "test 2",
"err": "{Object 9}",
"state": "failed",
@@ -1093,7 +1240,6 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"type": "test",
"duration": "match.number",
"wallClockStartedAt": "match.date",
- "wallClockDuration": "match.number",
"timings": {
"lifecycle": "match.number",
"before all": [
@@ -1130,7 +1276,10 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1141,7 +1290,64 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:after:run",
+ {
+ "id": "r5",
+ "order": 2,
+ "title": "test 2",
+ "err": "{Object 9}",
+ "state": "failed",
+ "body": "[body]",
+ "type": "test",
+ "duration": "match.number",
+ "wallClockStartedAt": "match.date",
+ "wallClockDuration": "match.number",
+ "timings": {
+ "lifecycle": "match.number",
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "test": {
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": "match.number",
+ "afterFnDuration": "match.number"
+ }
+ ]
+ },
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1152,7 +1358,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep fail with
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -1180,7 +1387,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -1191,7 +1399,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -1205,7 +1414,25 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r5",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1220,7 +1447,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1228,6 +1457,7 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"test",
{
"id": "r5",
+ "order": 2,
"title": "test 2",
"body": "[body]",
"type": "test",
@@ -1268,7 +1498,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1282,7 +1514,9 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1297,7 +1531,75 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1305,6 +1607,7 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"pass",
{
"id": "r5",
+ "order": 2,
"title": "test 2",
"state": "passed",
"body": "[body]",
@@ -1347,7 +1650,10 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1355,6 +1661,7 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"test end",
{
"id": "r5",
+ "order": 2,
"title": "test 2",
"state": "passed",
"body": "[body]",
@@ -1397,65 +1704,22 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
]
},
"file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook",
- {
- "id": "r5",
- "title": "\"after each\" hook",
- "hookName": "after each",
- "hookId": "h4",
- "body": "[body]",
- "type": "hook",
- "file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook end",
- {
- "id": "r5",
- "title": "\"after each\" hook",
- "hookName": "after each",
- "hookId": "h4",
- "body": "[body]",
- "type": "hook",
- "duration": "match.number",
- "file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook",
- {
- "id": "r5",
- "title": "\"after all\" hook",
- "hookName": "after all",
- "hookId": "h3",
- "body": "[body]",
- "type": "hook",
- "file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
"mocha",
- "hook end",
+ "suite end",
{
- "id": "r5",
- "title": "\"after all\" hook",
- "hookName": "after all",
- "hookId": "h3",
- "body": "[body]",
- "type": "hook",
- "duration": "match.number",
+ "id": "r4",
+ "title": "suite 1",
+ "root": false,
+ "type": "suite",
"file": null,
- "invocationDetails": "{Object 8}"
+ "retries": -1
}
],
[
@@ -1463,6 +1727,7 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"test:after:run",
{
"id": "r5",
+ "order": 2,
"title": "test 2",
"state": "passed",
"body": "[body]",
@@ -1506,18 +1771,10 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
]
},
"file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "suite end",
- {
- "id": "r4",
- "title": "suite 1",
- "root": false,
- "type": "suite",
- "file": null
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1528,7 +1785,8 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -1542,78 +1800,7 @@ exports['src/cypress/runner tests finish with correct state mocha grep pass with
exports['serialize state - hooks'] = {
"currentId": "r6",
- "tests": {
- "r3": {
- "id": "r3",
- "order": 1,
- "title": "test 1",
- "state": "passed",
- "body": "stub",
- "type": "test",
- "duration": 1,
- "wallClockStartedAt": "1970-01-01T00:00:00.000Z",
- "wallClockDuration": 1,
- "timings": {
- "lifecycle": 1,
- "before all": [
- {
- "hookId": "h1",
- "fnDuration": 1,
- "afterFnDuration": 1
- }
- ],
- "before each": [
- {
- "hookId": "h2",
- "fnDuration": 1,
- "afterFnDuration": 1
- }
- ],
- "test": {
- "fnDuration": 1,
- "afterFnDuration": 1
- },
- "after each": [
- {
- "hookId": "h4",
- "fnDuration": 1,
- "afterFnDuration": 1
- }
- ],
- "after all": [
- {
- "hookId": "h3",
- "fnDuration": 1,
- "afterFnDuration": 1
- }
- ]
- },
- "file": null,
- "invocationDetails": "{Object 8}",
- "hooks": []
- },
- "r5": {
- "id": "r5",
- "order": 2,
- "title": "test 1",
- "state": "passed",
- "body": "stub",
- "type": "test",
- "duration": 1,
- "wallClockStartedAt": "1970-01-01T00:00:00.000Z",
- "wallClockDuration": 1,
- "timings": {
- "lifecycle": 1,
- "test": {
- "fnDuration": 1,
- "afterFnDuration": 1
- }
- },
- "file": null,
- "invocationDetails": "{Object 8}",
- "hooks": []
- }
- },
+ "tests": "{Object 2}",
"startTime": "1970-01-01T00:00:00.000Z",
"emissions": {
"started": {
@@ -1645,6 +1832,7 @@ exports['src/cypress/runner other specs screenshots screenshot after failed test
"test 1"
],
"testId": "r3",
+ "testAttemptIndex": 0,
"simple": true,
"testFailure": true,
"capture": "runner",
@@ -1681,7 +1869,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -1692,7 +1881,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -1705,7 +1895,25 @@ exports['src/cypress/runner mocha events simple single test #1'] = [
"body": "[body]",
"type": "test",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1728,7 +1936,10 @@ exports['src/cypress/runner mocha events simple single test #1'] = [
}
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1751,7 +1962,10 @@ exports['src/cypress/runner mocha events simple single test #1'] = [
}
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1762,7 +1976,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -1786,7 +2001,10 @@ exports['src/cypress/runner mocha events simple single test #1'] = [
}
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1797,7 +2015,8 @@ exports['src/cypress/runner mocha events simple single test #1'] = [
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -1825,7 +2044,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
@@ -1836,7 +2056,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -1850,7 +2071,25 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r3",
+ "order": 1,
+ "title": "test 1",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1865,7 +2104,9 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1907,7 +2148,9 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -1921,7 +2164,9 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"body": "[body]",
"type": "hook",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1936,7 +2181,42 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r3",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -1980,7 +2260,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2024,36 +2307,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook",
- {
- "id": "r3",
- "title": "\"after each\" hook",
- "hookName": "after each",
- "hookId": "h4",
- "body": "[body]",
- "type": "hook",
- "file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook end",
- {
- "id": "r3",
- "title": "\"after each\" hook",
- "hookName": "after each",
- "hookId": "h4",
- "body": "[body]",
- "type": "hook",
- "duration": "match.number",
- "file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2098,7 +2355,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2111,7 +2371,9 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"body": "[body]",
"type": "test",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -2126,7 +2388,25 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r4",
+ "order": 2,
+ "title": "test 2",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -2141,7 +2421,43 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r4",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -2178,7 +2494,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2215,37 +2534,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook",
- {
- "id": "r4",
- "title": "\"after each\" hook",
- "hookName": "after each",
- "hookId": "h4",
- "body": "[body]",
- "type": "hook",
- "duration": "match.number",
- "file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook end",
- {
- "id": "r4",
- "title": "\"after each\" hook",
- "hookName": "after each",
- "hookId": "h4",
- "body": "[body]",
- "type": "hook",
- "duration": "match.number",
- "file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2283,7 +2575,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2296,7 +2591,9 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"body": "[body]",
"type": "test",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -2311,7 +2608,25 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "test:before:run",
+ {
+ "id": "r5",
+ "order": 3,
+ "title": "test 3",
+ "body": "[body]",
+ "type": "test",
+ "wallClockStartedAt": "match.date",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -2326,7 +2641,76 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"type": "hook",
"duration": "match.number",
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after each\" hook",
+ "hookName": "after each",
+ "hookId": "h4",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
+ }
+ ],
+ [
+ "mocha",
+ "hook end",
+ {
+ "id": "r5",
+ "title": "\"after all\" hook",
+ "hookName": "after all",
+ "hookId": "h3",
+ "body": "[body]",
+ "type": "hook",
+ "duration": "match.number",
+ "file": null,
+ "invocationDetails": "{Object 8}",
+ "currentRetry": 0,
+ "retries": -1
}
],
[
@@ -2370,7 +2754,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2414,66 +2801,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook",
- {
- "id": "r5",
- "title": "\"after each\" hook",
- "hookName": "after each",
- "hookId": "h4",
- "body": "[body]",
- "type": "hook",
- "duration": "match.number",
- "file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook end",
- {
- "id": "r5",
- "title": "\"after each\" hook",
- "hookName": "after each",
- "hookId": "h4",
- "body": "[body]",
- "type": "hook",
- "duration": "match.number",
- "file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook",
- {
- "id": "r5",
- "title": "\"after all\" hook",
- "hookName": "after all",
- "hookId": "h3",
- "body": "[body]",
- "type": "hook",
- "file": null,
- "invocationDetails": "{Object 8}"
- }
- ],
- [
- "mocha",
- "hook end",
- {
- "id": "r5",
- "title": "\"after all\" hook",
- "hookName": "after all",
- "hookId": "h3",
- "body": "[body]",
- "type": "hook",
- "duration": "match.number",
- "file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2484,7 +2815,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"title": "suite 1",
"root": false,
"type": "suite",
- "file": null
+ "file": null,
+ "retries": -1
}
],
[
@@ -2529,7 +2861,10 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
]
},
"file": null,
- "invocationDetails": "{Object 8}"
+ "invocationDetails": "{Object 8}",
+ "final": true,
+ "currentRetry": 0,
+ "retries": 0
}
],
[
@@ -2540,7 +2875,8 @@ exports['src/cypress/runner mocha events simple three tests #1'] = [
"title": "",
"root": true,
"type": "suite",
- "file": "relative/path/to/spec.js"
+ "file": "relative/path/to/spec.js",
+ "retries": -1
}
],
[
diff --git a/packages/runner/cypress/integration/reporter.errors.spec.js b/packages/runner/cypress/integration/reporter.errors.spec.js
index 29d621de9cb8..236760cdbaae 100644
--- a/packages/runner/cypress/integration/reporter.errors.spec.js
+++ b/packages/runner/cypress/integration/reporter.errors.spec.js
@@ -1,7 +1,7 @@
const helpers = require('../support/helpers')
const _ = Cypress._
-const { runIsolatedCypress } = helpers.createCypress()
+const { runIsolatedCypress } = helpers.createCypress({ config: { isTextTerminal: true, retries: 0 } })
export const verifyFailure = (options) => {
const {
diff --git a/packages/runner/cypress/integration/retries.mochaEvents.spec.js b/packages/runner/cypress/integration/retries.mochaEvents.spec.js
new file mode 100644
index 000000000000..252185cc327b
--- /dev/null
+++ b/packages/runner/cypress/integration/retries.mochaEvents.spec.js
@@ -0,0 +1,338 @@
+const helpers = require('../support/helpers')
+
+const { shouldHaveTestResults, getRunState, cleanseRunStateMap } = helpers
+const { runIsolatedCypress, snapshotMochaEvents, getAutCypress } = helpers.createCypress({ config: { retries: 2, isTextTerminal: true } })
+const { sinon } = Cypress
+const match = Cypress.sinon.match
+
+const threeTestsWithRetry = {
+ suites: {
+ 'suite 1': {
+ hooks: ['before', 'beforeEach', 'afterEach', 'after'],
+ tests: [
+ 'test 1',
+ { name: 'test 2', fail: 2 },
+ 'test 3',
+ ],
+ },
+ },
+}
+
+describe('src/cypress/runner retries mochaEvents', () => {
+ // NOTE: for test-retries
+ it('can set retry config', () => {
+ runIsolatedCypress({}, { config: { retries: 1 } })
+ .then(({ autCypress }) => {
+ expect(autCypress.config()).to.has.property('retries', 1)
+ })
+ })
+
+ it('simple retry', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ tests: [
+ { name: 'test 1',
+ fail: 1,
+ },
+ ],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(snapshotMochaEvents)
+ })
+
+ it('test retry with hooks', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: ['before', 'beforeEach', 'afterEach', 'after'],
+ tests: [{ name: 'test 1', fail: 1 }],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(snapshotMochaEvents)
+ })
+
+ it('test retry with [only]', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: ['before', 'beforeEach', 'afterEach', 'after'],
+ tests: [
+ { name: 'test 1' },
+ { name: 'test 2', fail: 1, only: true },
+ { name: 'test 3' },
+ ],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(snapshotMochaEvents)
+ })
+
+ it('can retry from [beforeEach]', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: [
+ 'before',
+ 'beforeEach',
+ { type: 'beforeEach', fail: 1 },
+ 'beforeEach',
+ 'afterEach',
+ 'after',
+ ],
+ tests: [{ name: 'test 1' }],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(snapshotMochaEvents)
+ })
+
+ it('can retry from [afterEach]', () => {
+ runIsolatedCypress({
+ hooks: [{ type: 'afterEach', fail: 1 }],
+ suites: {
+ 'suite 1': {
+ hooks: [
+ 'before',
+ 'beforeEach',
+ 'beforeEach',
+ 'afterEach',
+ 'after',
+ ],
+ tests: [{ name: 'test 1' }, 'test 2', 'test 3'],
+ },
+ 'suite 2': {
+ hooks: [{ type: 'afterEach', fail: 2 }],
+ tests: ['test 1'],
+ },
+ 'suite 3': {
+ tests: ['test 1'],
+ },
+ },
+ }, { config: { retries: 2, isTextTerminal: true } })
+
+ .then(snapshotMochaEvents)
+ })
+
+ it('cant retry from [before]', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: [
+ { type: 'before', fail: 1 },
+ 'beforeEach',
+ 'beforeEach',
+ 'afterEach',
+ 'afterEach',
+ 'after',
+ ],
+ tests: [{ name: 'test 1' }],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(snapshotMochaEvents)
+ })
+
+ it('cant retry from [after]', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: [
+ 'before',
+ 'beforeEach',
+ 'beforeEach',
+ 'afterEach',
+ 'afterEach',
+ { type: 'after', fail: 1 },
+ ],
+ tests: [{ name: 'test 1' }],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(snapshotMochaEvents)
+ })
+
+ it('three tests with retry', () => {
+ runIsolatedCypress(threeTestsWithRetry, {
+ config: {
+ retries: 2,
+ },
+ })
+ .then(snapshotMochaEvents)
+ })
+
+ describe('screenshots', () => {
+ it('retry screenshot in test body', () => {
+ let onAfterScreenshot
+
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ tests: [
+ {
+ name: 'test 1',
+ fn: () => {
+ cy.screenshot()
+ cy.then(() => assert(false))
+ },
+ eval: true,
+ },
+ ],
+ },
+ },
+ }, { config: { retries: 1 },
+ onBeforeRun ({ autCypress }) {
+ autCypress.Screenshot.onAfterScreenshot = cy.stub()
+ onAfterScreenshot = cy.stub()
+ autCypress.on('after:screenshot', onAfterScreenshot)
+ },
+ })
+ .then(({ autCypress }) => {
+ expect(autCypress.automation.withArgs('take:screenshot')).callCount(4)
+ expect(autCypress.automation.withArgs('take:screenshot').args).matchDeep([
+ { 1: { testAttemptIndex: 0 } },
+ { 1: { testAttemptIndex: 0 } },
+ { 1: { testAttemptIndex: 1 } },
+ { 1: { testAttemptIndex: 1 } },
+ ])
+
+ expect(autCypress.automation.withArgs('take:screenshot').args[0]).matchSnapshot({ startTime: match.string, testAttemptIndex: match(0) })
+ expect(onAfterScreenshot.args[0][0]).to.matchSnapshot({ testAttemptIndex: match(0) })
+ expect(onAfterScreenshot.args[2][0]).to.matchDeep({ testAttemptIndex: 1 })
+ })
+ })
+
+ it('retry screenshot in hook', () => {
+ let onAfterScreenshot
+
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: [
+ {
+ type: 'beforeEach',
+ fn: () => {
+ cy.screenshot()
+ cy.then(() => assert(false))
+ },
+ eval: true,
+ },
+ ],
+ tests: [
+ {
+ name: 'test 1',
+ },
+ ],
+ },
+ },
+ }, { config: { retries: 1 },
+ onBeforeRun ({ autCypress }) {
+ autCypress.Screenshot.onAfterScreenshot = cy.stub()
+ onAfterScreenshot = cy.stub()
+ autCypress.on('after:screenshot', onAfterScreenshot)
+ },
+ })
+ .then(({ autCypress }) => {
+ expect(autCypress.automation.withArgs('take:screenshot')).callCount(4)
+ expect(autCypress.automation.withArgs('take:screenshot').args).matchDeep([
+ { 1: { testAttemptIndex: 0 } },
+ { 1: { testAttemptIndex: 0 } },
+ { 1: { testAttemptIndex: 1 } },
+ { 1: { testAttemptIndex: 1 } },
+ ])
+
+ expect(onAfterScreenshot.args[0][0]).matchDeep({ testAttemptIndex: 0 })
+ expect(onAfterScreenshot.args[2][0]).matchDeep({ testAttemptIndex: 1 })
+ })
+ })
+ })
+
+ describe('save/reload state', () => {
+ const serializeState = () => {
+ return getRunState(getAutCypress())
+ }
+
+ const loadStateFromSnapshot = (cypressConfig, name) => {
+ cy.task('getSnapshot', {
+ file: Cypress.spec.name,
+ exactSpecName: name,
+ })
+ .then((state) => {
+ cypressConfig[1].state = state
+ })
+ }
+
+ // NOTE: for test-retries
+ describe('retries rehydrate spec state after navigation', () => {
+ let realState
+
+ let runCount = 0
+ const failThenSerialize = () => {
+ if (!runCount++) {
+ assert(false, 'stub 3 fail')
+ }
+
+ assert(true, 'stub 3 pass')
+
+ return realState = serializeState()
+ }
+
+ let runCount2 = 0
+ const failOnce = () => {
+ if (!runCount2++) {
+ assert(false, 'stub 2 fail')
+ }
+
+ assert(true, 'stub 2 pass')
+ }
+
+ const stub1 = sinon.stub()
+ const stub2 = sinon.stub().callsFake(failOnce)
+ const stub3 = sinon.stub().callsFake(failThenSerialize)
+
+ let cypressConfig = [
+ {
+ suites: {
+ 'suite 1': {
+ hooks: [
+ 'before',
+ 'beforeEach',
+ 'afterEach',
+ 'after',
+ ],
+ tests: [{ name: 'test 1', fn: stub1 }],
+ },
+ 'suite 2': {
+ tests: [
+ { name: 'test 1', fn: stub2 },
+ { name: 'test 2', fn: stub3 },
+ 'test 3',
+ ],
+ },
+ },
+ }, { config: { retries: 1 } },
+ ]
+
+ it('1/2', () => {
+ runIsolatedCypress(...cypressConfig)
+ .then(shouldHaveTestResults(4, 0))
+ .then(() => {
+ expect(realState).to.matchSnapshot(cleanseRunStateMap, 'serialize state - retries')
+ })
+ })
+
+ it('2/2', () => {
+ loadStateFromSnapshot(cypressConfig, 'serialize state - retries')
+ runIsolatedCypress(...cypressConfig)
+ .then(shouldHaveTestResults(4, 0))
+ .then(() => {
+ expect(stub1).to.calledOnce
+ expect(stub2).to.calledTwice
+ expect(stub3).calledThrice
+ })
+ })
+ })
+ })
+})
diff --git a/packages/runner/cypress/integration/retries.ui.spec.js b/packages/runner/cypress/integration/retries.ui.spec.js
new file mode 100644
index 000000000000..e373a5a972f2
--- /dev/null
+++ b/packages/runner/cypress/integration/retries.ui.spec.js
@@ -0,0 +1,491 @@
+const helpers = require('../support/helpers')
+
+const { shouldHaveTestResults, containText } = helpers
+const { runIsolatedCypress } = helpers.createCypress({ config: { retries: 2 } })
+
+const getAttemptTag = (sel) => {
+ return cy.get(`.test.runnable:contains(${sel}) .attempt-tag`)
+}
+
+const shouldBeOpen = ($el) => cy.wrap($el).parentsUntil('.collapsible').last().parent().should('have.class', 'is-open')
+
+const attemptTag = (sel) => `.attempt-tag:contains(Attempt ${sel})`
+const cyReject = (fn) => {
+ return () => {
+ try {
+ fn()
+ } catch (e) {
+ cy.state('reject')(e)
+ }
+ }
+}
+
+describe('runner/cypress retries.ui.spec', { viewportWidth: 600, viewportHeight: 900 }, () => {
+ it('collapses tests that retry and pass', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ tests: [
+ { name: 'test pass', fail: 0 },
+ { name: 'test pass on 2nd attempt', fail: 1 },
+ ],
+ },
+ },
+ })
+ .then(shouldHaveTestResults(2, 0))
+
+ cy.percySnapshot()
+ })
+
+ it('collapses prev attempts and keeps final one open on failure', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ tests: [
+ { name: 'test 1',
+ fail: true,
+ },
+ { name: 'test 2',
+
+ },
+ ],
+ },
+ },
+ }, { config: { retries: 2 } })
+ .then(shouldHaveTestResults(1, 1))
+
+ cy.percySnapshot()
+ })
+
+ it('can toggle failed prev attempt open and log its error', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ tests: [
+ { name: 'test 1', fail: 1 },
+ { name: 'test 2', fail: 2 },
+ { name: 'test 3', fail: 1 },
+ ],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(shouldHaveTestResults(2, 1))
+ .then(() => {
+ cy.contains('Attempt 1')
+ .click()
+ .closest('.attempt-item')
+ .find('.runnable-err-print')
+ .click()
+
+ cy.get('@console_error').should('be.calledWithMatch', 'AssertionError: test 2')
+ })
+
+ cy.percySnapshot()
+ })
+
+ it('opens attempt on each attempt failure for the screenshot, and closes after test passes', { retries: 2 }, () => {
+ let stub
+
+ runIsolatedCypress(
+ {
+ suites: {
+ 's1': {
+ tests: [
+ 't1',
+ {
+ name: 't2',
+ fail: 3,
+ },
+ 't3',
+ ],
+ },
+ },
+ }, { config: { retries: 3, isTextTerminal: true },
+ onBeforeRun ({ autCypress }) {
+ let attempt = 0
+
+ stub = cy.stub().callsFake(cyReject(() => {
+ attempt++
+
+ const $attemptCollapsible = cy.$$(attemptTag(attempt))
+ .parentsUntil('.collapsible').last().parent()
+
+ expect($attemptCollapsible).have.class('is-open')
+ }))
+
+ autCypress.Screenshot.onAfterScreenshot = stub
+ },
+ },
+ ).then(() => {
+ expect(stub).callCount(3)
+ cy.get('.test.runnable:contains(t2)').then(($el) => {
+ expect($el).not.class('is-open')
+ })
+ })
+ })
+
+ it('includes routes, spies, hooks, and commands in attempt', () => {
+ runIsolatedCypress({
+ suites: {
+ 's1': {
+ hooks: [{ type: 'beforeEach', fail: 1, agents: true }],
+ tests: [{ name: 't1', fail: 1, agents: true }],
+ },
+ },
+ })
+ .then(shouldHaveTestResults(1, 0))
+ .then(() => {
+ cy.get(attemptTag(1)).click().parentsUntil('.collapsible').last().parent().within(() => {
+ cy.get('.instruments-container').should('contain', 'Spies / Stubs (1)')
+ cy.get('.instruments-container').should('contain', 'Routes (1)')
+ cy.get('.runnable-err').should('contain', 'AssertionError')
+ })
+
+ cy.get(attemptTag(2)).click().parentsUntil('.collapsible').last().parent().within(() => {
+ cy.get('.instruments-container').should('contain', 'Spies / Stubs (2)')
+ cy.get('.instruments-container').should('contain', 'Routes (2)')
+ cy.get('.runnable-err').should('contain', 'AssertionError')
+ })
+
+ cy.get(attemptTag(3)).parentsUntil('.collapsible').last().parent().within(() => {
+ cy.get('.instruments-container').should('contain', 'Spies / Stubs (2)')
+ cy.get('.instruments-container').should('contain', 'Routes (2)')
+ cy.get('.runnable-err').should('not.contain', 'AssertionError')
+ })
+ })
+
+ cy.percySnapshot()
+ })
+
+ describe('only', () => {
+ it('test retry with [only]', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: ['before', 'beforeEach', 'afterEach', 'after'],
+ tests: [
+ { name: 'test 1' },
+ { name: 'test 2', fail: 1, only: true },
+ { name: 'test 3' },
+ ],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(shouldHaveTestResults(1, 0))
+ .then(() => {
+ cy.contains('test 2')
+ cy.contains('test 1').should('not.exist')
+ cy.contains('test 3').should('not.exist')
+ })
+
+ cy.percySnapshot()
+ })
+ })
+
+ describe('beforeAll', () => {
+ // TODO: make beforeAll hooks retry
+ it('tests do not retry when beforeAll fails', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: [
+ { type: 'before', fail: 1 },
+ 'beforeEach',
+ 'beforeEach',
+ 'afterEach',
+ 'afterEach',
+ 'after',
+ ],
+ tests: ['test 1'],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(shouldHaveTestResults(0, 1))
+ .then(() => {
+ cy.contains('Although you have test retries')
+ })
+
+ cy.percySnapshot()
+ })
+
+ // TODO: future versions should run all hooks associated with test on retry
+ it('before all hooks are not run on the second attempt when fails outside of beforeAll', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: ['before', 'beforeEach', 'afterEach', 'after'],
+ tests: [{ name: 'test 1', fail: 1 }],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(shouldHaveTestResults(1, 0))
+ .then(() => {
+ cy.contains('test')
+ cy.contains('after all')
+ cy.contains('before all').should('not.exist')
+ })
+
+ cy.percySnapshot()
+ })
+ })
+
+ describe('beforeEach', () => {
+ it('beforeEach hooks retry on failure, but only run same-level afterEach hooks', () => {
+ runIsolatedCypress({
+ hooks: [{ type: 'beforeEach', fail: 1 }],
+ suites: {
+ 'suite 1': {
+ hooks: [
+ 'before',
+ 'beforeEach',
+ { type: 'beforeEach', fail: 1 },
+ 'beforeEach',
+ 'afterEach',
+ 'after',
+ ],
+ tests: [{ name: 'test 1' }],
+ },
+ },
+ }, { config: { retries: 2 } })
+ .then(shouldHaveTestResults(1, 0))
+ .then(() => {
+ cy.contains('Attempt 1').click()
+ cy.get('.attempt-1 .hook-item .collapsible:contains(before each)').find('.command-state-failed')
+ cy.get('.attempt-1 .hook-item .collapsible:contains(before each (2))').should('not.exist')
+ cy.get('.attempt-1 .hook-item .collapsible:contains(test body)').should('not.exist')
+ cy.get('.attempt-1 .hook-item .collapsible:contains(after each)').should('not.exist')
+ cy.get('.attempt-1 .hook-item .collapsible:contains(after all)').should('not.exist')
+
+ cy.contains('Attempt 2').click()
+ cy.get('.attempt-2 .hook-item .collapsible:contains(before each)')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(before each (2))')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(before each (3))').find('.command-state-failed')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(test body)').should('not.exist')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after each)')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after all)').should('not.exist')
+
+ cy.get('.attempt-3 .hook-item .collapsible:contains(before each)')
+ cy.get('.attempt-3 .hook-item .collapsible:contains(before each (2))')
+ cy.get('.attempt-3 .hook-item .collapsible:contains(before each (3))')
+ cy.get('.attempt-3 .hook-item .collapsible:contains(before each (4))')
+ cy.get('.attempt-3 .hook-item .collapsible:contains(test body)')
+ cy.get('.attempt-3 .hook-item .collapsible:contains(after each)')
+ cy.get('.attempt-3 .hook-item .collapsible:contains(after all)')
+ })
+
+ cy.percySnapshot()
+ })
+
+ it('beforeEach retried tests skip remaining tests in suite', () => {
+ runIsolatedCypress({ suites: {
+ 'beforeEach hooks': {
+ hooks: [{ type: 'beforeEach', fail: true }],
+ tests: ['fails in beforeEach', 'skips this'],
+ },
+
+ } }, { config: { retries: 1 } })
+ .then(shouldHaveTestResults(0, 1, 0))
+
+ cy.percySnapshot()
+ })
+ })
+
+ describe('afterEach', () => {
+ it('afterEach hooks retry on failure, but only run higher-level afterEach hooks', () => {
+ runIsolatedCypress({
+ hooks: [{ type: 'afterEach', fail: 2 }],
+ suites: {
+ 's1': {
+ hooks: [{ type: 'afterEach', fail: 1 }, 'afterEach', 'after'],
+ tests: ['t1'],
+ },
+
+ },
+ }, { config: { retries: 2 } })
+ .then(shouldHaveTestResults(1, 0))
+ .then(() => {
+ cy.contains('Attempt 1')
+ .click()
+ .then(shouldBeOpen)
+
+ cy.get('.attempt-1 .hook-item .collapsible:contains(after each (1))').find('.command-state-failed')
+ cy.get('.attempt-1 .hook-item .collapsible:contains(after each (2))')
+ cy.get('.attempt-1 .hook-item .collapsible:contains(after each (3))').should('not.exist')
+ cy.get('.attempt-1 .hook-item .collapsible:contains(after all)').should('not.exist')
+
+ cy.contains('Attempt 2').click()
+ .then(shouldBeOpen)
+
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after each (1))')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after each (2))')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after each (3))').find('.command-state-failed')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after all)').should('not.exist')
+
+ cy.get('.attempt-tag').should('have.length', 3)
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after each (1))')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after each (2))')
+ cy.get('.attempt-2 .hook-item .collapsible:contains(after each (3))')
+ cy.get('.attempt-3 .hook-item .collapsible:contains(after all)')
+ })
+
+ cy.percySnapshot()
+ })
+
+ it('afterEach retried tests skip remaining tests in suite', () => {
+ runIsolatedCypress({ suites: {
+ 'afterEach hooks': {
+ hooks: [{ type: 'afterEach', fail: true }],
+ tests: ['fails in afterEach', 'skips this'],
+ },
+
+ } }, { config: { retries: 1 } })
+ .then(shouldHaveTestResults(0, 1, 0))
+
+ cy.percySnapshot()
+ })
+ })
+
+ describe('afterAll', () => {
+ it('only run afterAll hook on last attempt', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: [
+ 'before',
+ 'beforeEach',
+ 'afterEach',
+ 'after',
+ ],
+ tests: [
+ { name: 'test 1' },
+ { name: 'test 2' },
+ { name: 'test 3', fail: 1 },
+ ],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(shouldHaveTestResults(3, 0))
+ .then(() => {
+ cy.contains('test 3').click()
+ getAttemptTag('test 3').first().click()
+ cy.contains('.attempt-1', 'after all').should('not.exist')
+ cy.contains('.attempt-2', 'after all')
+ })
+ })
+
+ it('tests do not retry when afterAll fails', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: [
+ 'before',
+ 'beforeEach',
+ 'beforeEach',
+ 'afterEach',
+ 'afterEach',
+ { type: 'after', fail: 1 },
+ ],
+ tests: [{ name: 'test 1' }],
+ },
+ },
+ }, { config: { retries: 1 } })
+ .then(shouldHaveTestResults(0, 1))
+ .then(() => {
+ cy.contains('Although you have test retries')
+ cy.get('.runnable-err-print').click()
+ cy.get('@console_error').its('lastCall').should('be.calledWithMatch', 'Error')
+ })
+
+ cy.percySnapshot()
+ })
+ })
+
+ describe('can configure retries', () => {
+ const haveCorrectError = ($el) => cy.wrap($el).last().parentsUntil('.collapsible').last().parent().find('.runnable-err').should('contain', 'Unspecified AssertionError')
+
+ it('via config value', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': () => {
+ it('[no retry]', { retries: 0 }, () => assert(false))
+ it('[1 retry]', { retries: 1 }, () => assert(false))
+ it('[2 retries]', { retries: 2 }, () => assert(false))
+ it('[open mode, no retry]', { retries: { runMode: 2, openMode: 0 } }, () => assert(false))
+ it('[run mode, retry]', { retries: { runMode: 1, openMode: 0 }, isInteractive: false }, () => assert(false))
+ it('[open mode, 2 retries]', { isInteractive: true }, () => assert(false))
+ describe('suite 2', { retries: 1 }, () => {
+ it('[set retries on suite]', () => assert(false))
+ })
+ },
+ },
+ })
+ .then(shouldHaveTestResults(0, 7))
+ .then(() => {
+ getAttemptTag('[no retry]').should('have.length', 1).then(haveCorrectError)
+ getAttemptTag('[1 retry]').should('have.length', 2).then(haveCorrectError)
+ getAttemptTag('[2 retries]').should('have.length', 3).then(haveCorrectError)
+ getAttemptTag('[open mode, no retry]').should('have.length', 1).then(haveCorrectError)
+ getAttemptTag('[run mode, retry]').should('have.length', 2).then(haveCorrectError)
+ getAttemptTag('[open mode, 2 retries]').should('have.length', 3).then(haveCorrectError)
+ getAttemptTag('[set retries on suite]').should('have.length', 2).then(haveCorrectError)
+ })
+ })
+
+ it('throws when set via this.retries in test', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1' () {
+ it('tries to set mocha retries', function () {
+ this.retries(null)
+ })
+ },
+ },
+ })
+ .then(shouldHaveTestResults(0, 1))
+ .then(() => {
+ cy.get('.runnable-err').should(containText(`it('tries to set mocha retries', { retries: 2 }, () => `))
+ })
+
+ cy.percySnapshot()
+ })
+
+ it('throws when set via this.retries in hook', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1' () {
+ beforeEach(function () {
+ this.retries(0)
+ })
+
+ it('foo', () => {})
+ },
+ },
+ })
+ .then(shouldHaveTestResults(0, 1))
+ .then(() => {
+ cy.get('.runnable-err').should(containText(`describe('suite 1', { retries: 0 }, () => `))
+ })
+
+ cy.percySnapshot()
+ })
+
+ it('throws when set via this.retries in suite', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1' () {
+ this.retries(3)
+ it('test 1', () => {
+ })
+ },
+ },
+ })
+ .then(shouldHaveTestResults(0, 1))
+ .then(() => {
+ cy.get('.runnable-err')
+ .should(containText(`describe('suite 1', { retries: 3 }, () => `))
+ })
+
+ cy.percySnapshot()
+ })
+ })
+})
diff --git a/packages/runner/cypress/integration/runner.mochaEvents.spec.js b/packages/runner/cypress/integration/runner.mochaEvents.spec.js
index a55892fba141..6987ecc7cbd4 100644
--- a/packages/runner/cypress/integration/runner.mochaEvents.spec.js
+++ b/packages/runner/cypress/integration/runner.mochaEvents.spec.js
@@ -3,7 +3,7 @@ const sinon = require('sinon')
const helpers = require('../support/helpers')
const { cleanseRunStateMap, shouldHaveTestResults, getRunState } = helpers
-const { runIsolatedCypress, snapshotMochaEvents, onInitialized, getAutCypress } = helpers.createCypress()
+const { runIsolatedCypress, snapshotMochaEvents, getAutCypress } = helpers.createCypress({ config: { isTextTerminal: true, retries: 0 } })
const simpleSingleTest = {
suites: { 'suite 1': { tests: [{ name: 'test 1' }] } },
@@ -239,17 +239,24 @@ describe('src/cypress/runner', () => {
})
})
- describe('screenshots', () => {
- let onAfterScreenshotListener
-
- beforeEach(() => {
- onInitialized((autCypress) => {
- autCypress.Screenshot.onAfterScreenshot = cy.stub()
- onAfterScreenshotListener = cy.stub()
- autCypress.on('after:screenshot', onAfterScreenshotListener)
- })
+ it('buffer mocha pass event when fail in afterEach hooks', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ suites: {
+ 'suite 1-1': {
+ hooks: [{ type: 'afterEach', fail: true }],
+ tests: ['test 1'],
+ },
+ },
+ },
+ },
+ }).then(({ mochaStubs }) => {
+ expect(_.find(mochaStubs.args, { 1: 'pass' })).not.exist
})
+ })
+ describe('screenshots', () => {
it('screenshot after failed test', () => {
runIsolatedCypress({
suites: {
diff --git a/packages/runner/cypress/integration/runner.ui.spec.js b/packages/runner/cypress/integration/runner.ui.spec.js
index ba63c81f9f1f..66bd90d01a95 100644
--- a/packages/runner/cypress/integration/runner.ui.spec.js
+++ b/packages/runner/cypress/integration/runner.ui.spec.js
@@ -147,6 +147,31 @@ describe('src/cypress/runner', () => {
describe('hook failures', () => {
describe('test failures w/ hooks', () => {
+ it('test [only]', () => {
+ runIsolatedCypress({
+ suites: {
+ 'suite 1': {
+ hooks: ['before', 'beforeEach', 'afterEach', 'after'],
+ tests: [
+ { name: 'test 1' },
+ { name: 'test 2', only: true },
+ { name: 'test 3' },
+ ],
+ },
+ },
+ }).then(shouldHaveTestResults(1, 0))
+ })
+
+ it('test [pending]', () => {
+ runIsolatedCypress(() => {
+ before(() => {})
+ it('t1')
+ it('t2')
+ it('t3')
+ after(() => {})
+ }).then(shouldHaveTestResults(0, 0, 3))
+ })
+
it('fail with [before]', () => {
runIsolatedCypress({
suites: {
@@ -263,5 +288,31 @@ describe('src/cypress/runner', () => {
})
.then(shouldHaveTestResults(0, 1))
})
+
+ it('scrolls each command into view', () => {
+ // HACK to assert on the dom DURING the runIsolatedCypress run
+ // we expect the last command item to be scrolled into view before
+ // the test ends
+ cy.now('get', '.command-number:contains(25)')
+ .then(($el) => {
+ return new Promise((resolve) => {
+ requestAnimationFrame(() => {
+ expect($el).visible
+ resolve()
+ })
+ })
+ })
+ .catch((e) => cy.state('reject')(e))
+
+ runIsolatedCypress(() => {
+ describe('s1', () => {
+ // eslint-disable-next-line
+ it('t1', (done) => {
+ cy.timeout(10)
+ Cypress._.times(25, () => expect(true).ok)
+ })
+ })
+ })
+ })
})
})
diff --git a/packages/runner/cypress/plugins/index.js b/packages/runner/cypress/plugins/index.js
index e5158967e1ca..4e3fd18039e6 100644
--- a/packages/runner/cypress/plugins/index.js
+++ b/packages/runner/cypress/plugins/index.js
@@ -1,11 +1,14 @@
// static file server that serves fixtures needed for testing
require('@packages/driver/cypress/plugins/server')
const { getSnapshot, saveSnapshot } = require('./snapshot/snapshotPlugin')
+const percyHealthCheck = require('@percy/cypress/task')
/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on) => {
+ on('task', percyHealthCheck)
+
on('task', {
getSnapshot,
saveSnapshot,
diff --git a/packages/runner/cypress/plugins/snapshot/snapshotCommand.js b/packages/runner/cypress/plugins/snapshot/snapshotCommand.js
index 4e021a871bb7..1a460ecb2cef 100644
--- a/packages/runner/cypress/plugins/snapshot/snapshotCommand.js
+++ b/packages/runner/cypress/plugins/snapshot/snapshotCommand.js
@@ -21,7 +21,7 @@ function throwErr (e, message, exp, ctx) {
}
}
-function getMatchDeepMessage ({ act, exp }) {
+function getMatchDeepMessage (act, exp) {
return `Expected **${chai.util.objDisplay(act)}** to deep match: **${chai.util.objDisplay(exp)}**`
}
diff --git a/packages/runner/cypress/support/helpers.js b/packages/runner/cypress/support/helpers.js
index 5ecabd962046..dba886e316fe 100644
--- a/packages/runner/cypress/support/helpers.js
+++ b/packages/runner/cypress/support/helpers.js
@@ -37,6 +37,18 @@ const mochaEventCleanseMap = {
end: match.date,
}
+const cleanseRunStateMap = {
+ ...eventCleanseMap,
+ 'err.stack': '[err stack]',
+ wallClockStartedAt: new Date(0),
+ wallClockDuration: 1,
+ fnDuration: 1,
+ afterFnDuration: 1,
+ lifecycle: 1,
+ duration: 1,
+ startTime: new Date(0),
+}
+
const spyOn = (obj, prop, fn) => {
const _fn = obj[prop]
@@ -49,7 +61,7 @@ const spyOn = (obj, prop, fn) => {
}
}
-function createCypress () {
+function createCypress (defaultOptions = {}) {
/**
* @type {sinon.SinonStub}
*/
@@ -84,19 +96,13 @@ function createCypress () {
window.Cypress = backupCypress
})
- let onInitializedListeners = []
-
- const onInitialized = function (fn) {
- onInitializedListeners.push(fn)
- }
-
/**
* Spawns an isolated Cypress runner as the AUT, with provided spec/fixture and optional state/config
* @param {string | ()=>void | {[key:string]: any}} mochaTestsOrFile
* @param {{state?: any, config?: any}} opts
*/
const runIsolatedCypress = (mochaTestsOrFile, opts = {}) => {
- _.defaultsDeep(opts, {
+ _.defaultsDeep(opts, defaultOptions, {
state: {},
config: { video: false },
onBeforeRun () {},
@@ -106,9 +112,9 @@ function createCypress () {
.then({ timeout: 60000 }, (win) => {
win.runnerWs.destroy()
- allStubs = cy.stub().snapshot(enableStubSnapshots)
- mochaStubs = cy.stub().snapshot(enableStubSnapshots)
- setRunnablesStub = cy.stub().snapshot(enableStubSnapshots)
+ allStubs = cy.stub().snapshot(enableStubSnapshots).log(false)
+ mochaStubs = cy.stub().snapshot(enableStubSnapshots).log(false)
+ setRunnablesStub = cy.stub().snapshot(enableStubSnapshots).log(false)
return new Promise((resolve) => {
const runIsolatedCypress = () => {
@@ -118,7 +124,7 @@ function createCypress () {
const emitMap = autCypress.emitMap
const emitThen = autCypress.emitThen
- cy.stub(autCypress, 'automation').snapshot(enableStubSnapshots)
+ cy.stub(autCypress, 'automation').log(false).snapshot(enableStubSnapshots)
.callThrough()
.withArgs('clear:cookies')
.resolves({
@@ -177,7 +183,9 @@ function createCypress () {
spyOn(autCypress.mocha.getRunner(), 'fail', (...args) => {
Cypress.log({
- name: 'Runner Fail',
+ name: 'Runner (fail event)',
+ ended: true,
+ event: true,
message: `${args[1]}`,
state: 'failed',
consoleProps: () => {
@@ -191,28 +199,26 @@ function createCypress () {
// TODO: clean this up, sinon doesn't like wrapping things multiple times
// and this catches that error
try {
- cy.spy(cy.state('window').console, 'log').as('console_log')
- cy.spy(cy.state('window').console, 'error').as('console_error')
+ cy.spy(cy.state('window').console, 'log').as('console_log').log(false)
+ cy.spy(cy.state('window').console, 'error').as('console_error').log(false)
} catch (_e) {
// console was already wrapped, noop
}
- onInitializedListeners.forEach((fn) => fn(autCypress))
- onInitializedListeners = []
autCypress.run((failed) => {
resolve({ failed, mochaStubs, autCypress, win })
})
}
- cy.spy(win.eventManager.reporterBus, 'emit').snapshot(enableStubSnapshots).as('reporterBus')
- cy.spy(win.eventManager.localBus, 'emit').snapshot(enableStubSnapshots).as('localBus')
+ cy.spy(win.eventManager.reporterBus, 'emit').snapshot(enableStubSnapshots).log(false).as('reporterBus')
+ cy.spy(win.eventManager.localBus, 'emit').snapshot(enableStubSnapshots).log(false).as('localBus')
- cy.stub(win.runnerWs, 'emit').snapshot(enableStubSnapshots)
+ cy.stub(win.runnerWs, 'emit').snapshot(enableStubSnapshots).log(false)
.withArgs('watch:test:file')
.callsFake(() => {
autCypress = win.Cypress
- cy.stub(autCypress, 'onSpecWindow').snapshot(enableStubSnapshots).callsFake((specWindow) => {
+ cy.stub(autCypress, 'onSpecWindow').snapshot(enableStubSnapshots).log(false).callsFake((specWindow) => {
autCypress.onSpecWindow.restore()
opts.onBeforeRun({ specWindow, win, autCypress })
@@ -238,7 +244,7 @@ function createCypress () {
specWindow.describe = () => {}
})
- cy.stub(autCypress, 'run').snapshot(enableStubSnapshots).callsFake(runIsolatedCypress)
+ cy.stub(autCypress, 'run').snapshot(enableStubSnapshots).log(false).callsFake(runIsolatedCypress)
})
.withArgs('is:automation:client:connected')
.yieldsAsync(true)
@@ -271,16 +277,17 @@ function createCypress () {
.yieldsAsync({ response: {} })
const c = _.extend({}, Cypress.config(), {
- isTextTerminal: true,
+ isTextTerminal: false,
spec: {
relative: 'relative/path/to/spec.js',
absolute: '/absolute/path/to/spec.js',
+ name: 'empty_spec.js',
},
}, opts.config)
c.state = {}
- cy.stub(win.runnerWs, 'on').snapshot(enableStubSnapshots)
+ cy.stub(win.runnerWs, 'on').snapshot(enableStubSnapshots).log(false)
win.Runner.start(win.document.getElementById('app'), window.btoa(JSON.stringify(c)))
})
@@ -290,7 +297,6 @@ function createCypress () {
return {
runIsolatedCypress,
snapshotMochaEvents,
- onInitialized,
getAutCypress,
}
}
@@ -301,7 +307,7 @@ const createHooks = (win, hooks = []) => {
hook = { type: hook }
}
- let { type, fail, fn } = hook
+ let { type, fail, fn, agents } = hook
if (fn) {
if (hook.eval) {
@@ -321,24 +327,34 @@ const createHooks = (win, hooks = []) => {
if (fail) {
const numFailures = fail
- return win[type](() => {
+ return win[type](function () {
+ const message = `${type} - ${this._runnable.parent.title || 'root'}`
+
+ if (agents) {
+ registerAgents(win)
+ }
+
if (_.isNumber(fail) && fail-- <= 0) {
debug(`hook pass after (${numFailures}) failures: ${type}`)
- win.assert(true, type)
+ win.assert(true, message)
return
}
- debug(`hook fail: ${type}`)
+ if (agents) {
+ failCypressCommand(win, type)
+ } else {
+ debug(`hook fail: ${type}`)
- win.assert(false, type)
+ win.assert(false, message)
- throw new Error(`hook failed: ${type}`)
+ throw new Error(`hook failed: ${type}`)
+ }
})
}
- return win[type](() => {
- win.assert(true, type)
+ return win[type](function () {
+ win.assert(true, `${type} - ${this._runnable.parent.title || 'root'}`)
debug(`hook pass: ${type}`)
})
})
@@ -350,7 +366,7 @@ const createTests = (win, tests = []) => {
test = { name: test }
}
- let { name, pending, fail, fn, only } = test
+ let { name, pending, fail, fn, only, agents } = test
let it = win.it
@@ -379,6 +395,10 @@ const createTests = (win, tests = []) => {
if (fail) {
return it(name, () => {
+ if (agents) {
+ registerAgents(win)
+ }
+
if (_.isNumber(fail) && fail-- === 0) {
debug(`test pass after retry: ${name}`)
win.assert(true, name)
@@ -386,10 +406,14 @@ const createTests = (win, tests = []) => {
return
}
- debug(`test fail: ${name}`)
- win.assert(false, name)
+ if (agents) {
+ failCypressCommand(win, name)
+ } else {
+ debug(`test fail: ${name}`)
+ win.assert(false, name)
- throw new Error(`test fail: ${name}`)
+ throw new Error(`test fail: ${name}`)
+ }
})
}
@@ -400,6 +424,16 @@ const createTests = (win, tests = []) => {
})
}
+const failCypressCommand = (win, name) => win.cy.wrap(name).then(() => win.assert(false, name))
+const registerAgents = (win) => {
+ const obj = { foo: 'bar' }
+
+ win.cy.stub(obj, 'foo')
+ win.cy.wrap(obj).should('exist')
+ win.cy.server()
+ win.cy.route('https://example.com')
+}
+
const createSuites = (win, suites = {}) => {
_.each(suites, (obj, suiteName) => {
let fn = () => {
@@ -434,27 +468,13 @@ const evalFn = (win, fn) => {
}
}
-const cleanseRunStateMap = {
- wallClockStartedAt: new Date(0),
- wallClockDuration: 1,
- fnDuration: 1,
- afterFnDuration: 1,
- lifecycle: 1,
- duration: 1,
- startTime: new Date(0),
- 'err.stack': '[err stack]',
- sourceMappedStack: match.string,
- parsedStack: match.array,
- invocationDetails: stringifyShort,
-}
-
-const shouldHaveTestResults = (expPassed, expFailed) => {
- return ({ failed }) => {
- expect(failed, 'resolve with failure count').eq(failed)
+const shouldHaveTestResults = (expPassed, expFailed, expPending) => {
+ return () => {
expPassed = expPassed || '--'
expFailed = expFailed || '--'
cy.get('header .passed .num').should('have.text', `${expPassed}`)
cy.get('header .failed .num').should('have.text', `${expFailed}`)
+ if (expPending) cy.get('header .pending .num').should('have.text', `${expPending}`)
}
}
diff --git a/packages/runner/cypress/support/index.js b/packages/runner/cypress/support/index.js
index e69de29bb2d1..565e08fd47c7 100644
--- a/packages/runner/cypress/support/index.js
+++ b/packages/runner/cypress/support/index.js
@@ -0,0 +1 @@
+require('@packages/ui-components/cypress/support/customPercyCommand')
diff --git a/packages/server/__snapshots__/1_caught_uncaught_hook_errors_spec.js b/packages/server/__snapshots__/1_caught_uncaught_hook_errors_spec.js
index 5c66ddd225a4..797be373f43c 100644
--- a/packages/server/__snapshots__/1_caught_uncaught_hook_errors_spec.js
+++ b/packages/server/__snapshots__/1_caught_uncaught_hook_errors_spec.js
@@ -1,4 +1,4 @@
-exports['e2e caught and uncaught hooks errors failing1 1'] = `
+exports['e2e caught and uncaught hooks errors / failing1'] = `
====================================================================================================
@@ -110,7 +110,7 @@ Because this error occurred during a \`before all\` hook we are skipping the rem
`
-exports['e2e caught and uncaught hooks errors failing2 1'] = `
+exports['e2e caught and uncaught hooks errors / failing2'] = `
====================================================================================================
@@ -203,7 +203,7 @@ Because this error occurred during a \`before each\` hook we are skipping the re
`
-exports['e2e caught and uncaught hooks errors failing3 1'] = `
+exports['e2e caught and uncaught hooks errors / failing3'] = `
====================================================================================================
@@ -287,7 +287,7 @@ Because this error occurred during a \`before each\` hook we are skipping all of
`
-exports['e2e caught and uncaught hooks errors failing4 1'] = `
+exports['e2e caught and uncaught hooks errors / failing4'] = `
====================================================================================================
diff --git a/packages/server/__snapshots__/3_plugins_spec.js b/packages/server/__snapshots__/3_plugins_spec.js
index 6f8fd40476fc..ebe43b1b2a64 100644
--- a/packages/server/__snapshots__/3_plugins_spec.js
+++ b/packages/server/__snapshots__/3_plugins_spec.js
@@ -311,7 +311,7 @@ exports['e2e plugins calls after:screenshot for cy.screenshot() and failure scre
│ Failing: 1 │
│ Pending: 0 │
│ Skipped: 0 │
- │ Screenshots: 4 │
+ │ Screenshots: 3 │
│ Video: true │
│ Duration: X seconds │
│ Spec Ran: after_screenshot_spec.coffee │
@@ -323,7 +323,6 @@ exports['e2e plugins calls after:screenshot for cy.screenshot() and failure scre
- /XXX/XXX/XXX/screenshot-replacement.png (YxX)
- /XXX/XXX/XXX/cypress/screenshots/after_screenshot_spec.coffee/ignored-values.png (YxX)
- /XXX/XXX/XXX/cypress/screenshots/after_screenshot_spec.coffee/invalid-return.png (YxX)
- - /XXX/XXX/XXX/screenshot-replacement.png (YxX)
(Video)
@@ -446,3 +445,139 @@ The following are valid events:
[stack trace lines]
`
+
+exports['e2e plugins does not report more screenshots than exist if user overwrites screenshot in afterScreenshot hook 1'] = `
+
+====================================================================================================
+
+ (Run Starting)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Cypress: 1.2.3 │
+ │ Browser: FooBrowser 88 │
+ │ Specs: 1 found (after_screenshot_overwrite_spec.coffee) │
+ │ Searched: cypress/integration/after_screenshot_overwrite_spec.coffee │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+────────────────────────────────────────────────────────────────────────────────────────────────────
+
+ Running: after_screenshot_overwrite_spec.coffee (1 of 1)
+
+
+ ✓ cy.screenshot() - replacement
+ ✓ cy.screenshot() - replacement
+ ✓ cy.screenshot() - replacement
+
+ 3 passing
+
+
+ (Results)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Tests: 3 │
+ │ Passing: 3 │
+ │ Failing: 0 │
+ │ Pending: 0 │
+ │ Skipped: 0 │
+ │ Screenshots: 1 │
+ │ Video: true │
+ │ Duration: X seconds │
+ │ Spec Ran: after_screenshot_overwrite_spec.coffee │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+ (Screenshots)
+
+ - /XXX/XXX/XXX/screenshot-replacement.png (2x2)
+
+
+ (Video)
+
+ - Started processing: Compressing to 32 CRF
+ - Finished processing: /XXX/XXX/XXX/cypress/videos/after_screenshot_overwrite_spec (X second)
+ .coffee.mp4
+
+
+====================================================================================================
+
+ (Run Finished)
+
+
+ Spec Tests Passing Failing Pending Skipped
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ ✔ after_screenshot_overwrite_spec.cof XX:XX 3 3 - - - │
+ │ fee │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+ ✔ All specs passed! XX:XX 3 3 - - -
+
+
+`
+
+exports['e2e plugins does not report more screenshots than exist if user overwrites previous screenshot in afterScreenshot 1'] = `
+
+====================================================================================================
+
+ (Run Starting)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Cypress: 1.2.3 │
+ │ Browser: FooBrowser 88 │
+ │ Specs: 1 found (after_screenshot_overwrite_spec.coffee) │
+ │ Searched: cypress/integration/after_screenshot_overwrite_spec.coffee │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+────────────────────────────────────────────────────────────────────────────────────────────────────
+
+ Running: after_screenshot_overwrite_spec.coffee (1 of 1)
+
+
+ ✓ cy.screenshot() - replacement
+ ✓ cy.screenshot() - replacement
+ ✓ cy.screenshot() - replacement
+
+ 3 passing
+
+
+ (Results)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Tests: 3 │
+ │ Passing: 3 │
+ │ Failing: 0 │
+ │ Pending: 0 │
+ │ Skipped: 0 │
+ │ Screenshots: 1 │
+ │ Video: true │
+ │ Duration: X seconds │
+ │ Spec Ran: after_screenshot_overwrite_spec.coffee │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+ (Screenshots)
+
+ - /XXX/XXX/XXX/screenshot-replacement.png (2x2)
+
+
+ (Video)
+
+ - Started processing: Compressing to 32 CRF
+ - Finished processing: /XXX/XXX/XXX/cypress/videos/after_screenshot_overwrite_spec (X second)
+ .coffee.mp4
+
+
+====================================================================================================
+
+ (Run Finished)
+
+
+ Spec Tests Passing Failing Pending Skipped
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ ✔ after_screenshot_overwrite_spec.cof XX:XX 3 3 - - - │
+ │ fee │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+ ✔ All specs passed! XX:XX 3 3 - - -
+
+
+`
diff --git a/packages/server/__snapshots__/3_retries_spec.ts.js b/packages/server/__snapshots__/3_retries_spec.ts.js
new file mode 100644
index 000000000000..39bea32e843c
--- /dev/null
+++ b/packages/server/__snapshots__/3_retries_spec.ts.js
@@ -0,0 +1,134 @@
+exports['retries / supports retries'] = `
+
+====================================================================================================
+
+ (Run Starting)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Cypress: 1.2.3 │
+ │ Browser: FooBrowser 88 │
+ │ Specs: 1 found (fail-twice.js) │
+ │ Searched: cypress/integration/fail-twice.js │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+────────────────────────────────────────────────────────────────────────────────────────────────────
+
+ Running: fail-twice.js (1 of 1)
+
+
+ (Attempt 1 of 3) fail twice
+ (Attempt 2 of 3) fail twice
+ ✓ fail twice
+
+ 1 passing
+
+
+ (Results)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Tests: 1 │
+ │ Passing: 1 │
+ │ Failing: 0 │
+ │ Pending: 0 │
+ │ Skipped: 0 │
+ │ Screenshots: 2 │
+ │ Video: true │
+ │ Duration: X seconds │
+ │ Spec Ran: fail-twice.js │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+ (Screenshots)
+
+ - /XXX/XXX/XXX/cypress/screenshots/fail-twice.js/fail twice (failed).png (1280x720)
+ - /XXX/XXX/XXX/cypress/screenshots/fail-twice.js/fail twice (failed) (attempt 2).p (1280x720)
+ ng
+
+
+ (Video)
+
+ - Started processing: Compressing to 32 CRF
+ - Finished processing: /XXX/XXX/XXX/cypress/videos/fail-twice.js.mp4 (X second)
+
+
+====================================================================================================
+
+ (Run Finished)
+
+
+ Spec Tests Passing Failing Pending Skipped
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ ✔ fail-twice.js XX:XX 1 1 - - - │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+ ✔ All specs passed! XX:XX 1 1 - - -
+
+
+`
+
+exports['retries / warns about retries plugin'] = `
+We've detected that the incompatible plugin \`cypress-plugin-retries\` is installed at \`node_modules/cypress-plugin-retries\`.
+
+Test retries is now supported in Cypress version \`5.0.0\`.
+
+Remove the plugin from your dependencies to silence this warning.
+
+https://on.cypress.io/test-retries
+
+
+====================================================================================================
+
+ (Run Starting)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Cypress: 1.2.3 │
+ │ Browser: FooBrowser 88 │
+ │ Specs: 1 found (main.spec.js) │
+ │ Searched: cypress/integration/main.spec.js │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+────────────────────────────────────────────────────────────────────────────────────────────────────
+
+ Running: main.spec.js (1 of 1)
+
+
+ ✓ foo
+
+ 1 passing
+
+
+ (Results)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Tests: 1 │
+ │ Passing: 1 │
+ │ Failing: 0 │
+ │ Pending: 0 │
+ │ Skipped: 0 │
+ │ Screenshots: 0 │
+ │ Video: true │
+ │ Duration: X seconds │
+ │ Spec Ran: main.spec.js │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+ (Video)
+
+ - Started processing: Compressing to 32 CRF
+ - Finished processing: /XXX/XXX/XXX/cypress/videos/main.spec.js.mp4 (X second)
+
+
+====================================================================================================
+
+ (Run Finished)
+
+
+ Spec Tests Passing Failing Pending Skipped
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ ✔ main.spec.js XX:XX 1 1 - - - │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+ ✔ All specs passed! XX:XX 1 1 - - -
+
+
+`
diff --git a/packages/server/__snapshots__/3_runnable_execution_spec.ts.js b/packages/server/__snapshots__/3_runnable_execution_spec.ts.js
index 06dc92d31c09..3fe12b45bce5 100644
--- a/packages/server/__snapshots__/3_runnable_execution_spec.ts.js
+++ b/packages/server/__snapshots__/3_runnable_execution_spec.ts.js
@@ -24,9 +24,12 @@ exports['e2e runnable execution / cannot navigate in before hook and test'] = `
✓ test
1) causes domain navigation
+ navigation error in beforeEach
+ 2) "before each" hook for "never gets here"
+
2 passing
- 1 failing
+ 2 failing
1) suite
causes domain navigation:
@@ -51,15 +54,40 @@ You may need to restructure some of your test code to avoid this problem.
https://on.cypress.io/cannot-visit-different-origin-domain
[stack trace lines]
+ 2) navigation error in beforeEach
+ "before each" hook for "never gets here":
+ CypressError: \`cy.visit()\` failed because you are attempting to visit a URL that is of a different origin.
+
+The new URL is considered a different origin because the following parts of the URL are different:
+
+ > port
+
+You may only \`cy.visit()\` same-origin URLs within a single test.
+
+The previous URL you visited was:
+
+ > 'http://localhost:4545'
+
+You're attempting to visit this URL:
+
+ > 'http://localhost:5656'
+
+You may need to restructure some of your test code to avoid this problem.
+
+https://on.cypress.io/cannot-visit-different-origin-domain
+
+Because this error occurred during a \`before each\` hook we are skipping the remaining tests in the current suite: \`navigation error in beforeEach\`
+ [stack trace lines]
+
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
- │ Tests: 3 │
+ │ Tests: 4 │
│ Passing: 2 │
- │ Failing: 1 │
+ │ Failing: 2 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 0 │
@@ -83,9 +111,9 @@ https://on.cypress.io/cannot-visit-different-origin-domain
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
- │ ✖ beforehook-and-test-navigation.js XX:XX 3 2 1 - - │
+ │ ✖ beforehook-and-test-navigation.js XX:XX 4 2 2 - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
- ✖ 1 of 1 failed (100%) XX:XX 3 2 1 - -
+ ✖ 1 of 1 failed (100%) XX:XX 4 2 2 - -
`
diff --git a/packages/server/__snapshots__/5_screenshots_spec.js b/packages/server/__snapshots__/5_screenshots_spec.js
index e4fef3d1c010..b513571f7ce3 100644
--- a/packages/server/__snapshots__/5_screenshots_spec.js
+++ b/packages/server/__snapshots__/5_screenshots_spec.js
@@ -29,8 +29,11 @@ exports['e2e screenshots / passes'] = `
✓ accepts screenshot after multiple tries if somehow app has pixels that match helper pixels
✓ can capture element screenshots
✓ retries each screenshot for up to XX:XX
+ (Attempt 1 of 3) screenshots in a retried test
+ (Attempt 2 of 3) screenshots in a retried test
+ 2) screenshots in a retried test
✓ ensures unique paths for non-named screenshots
- 2) ensures unique paths when there's a non-named screenshot and a failure
+ 3) ensures unique paths when there's a non-named screenshot and a failure
✓ properly resizes the AUT iframe
- does not take a screenshot for a pending test
✓ adds padding to element screenshot when specified
@@ -41,10 +44,10 @@ exports['e2e screenshots / passes'] = `
✓ can clip fullPage screenshots
✓ can clip element screenshots
before hooks
- 3) "before all" hook for "empty test 1"
+ 4) "before all" hook for "empty test 1"
each hooks
- 4) "before each" hook for "empty test 2"
- 5) "after each" hook for "empty test 2"
+ 5) "before each" hook for "empty test 2"
+ 6) "after each" hook for "empty test 2"
really long test title aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
✓ takes a screenshot
✓ takes another screenshot
@@ -52,7 +55,7 @@ exports['e2e screenshots / passes'] = `
20 passing
1 pending
- 5 failing
+ 6 failing
1) taking screenshots
generates pngs on failure:
@@ -60,11 +63,16 @@ exports['e2e screenshots / passes'] = `
[stack trace lines]
2) taking screenshots
+ screenshots in a retried test:
+ Error: fail
+ [stack trace lines]
+
+ 3) taking screenshots
ensures unique paths when there's a non-named screenshot and a failure:
Error: failing on purpose
[stack trace lines]
- 3) taking screenshots
+ 4) taking screenshots
before hooks
"before all" hook for "empty test 1":
Error: before hook failing
@@ -72,7 +80,7 @@ exports['e2e screenshots / passes'] = `
Because this error occurred during a \`before all\` hook we are skipping the remaining tests in the current suite: \`before hooks\`
[stack trace lines]
- 4) taking screenshots
+ 5) taking screenshots
each hooks
"before each" hook for "empty test 2":
Error: before each hook failed
@@ -80,7 +88,7 @@ Because this error occurred during a \`before all\` hook we are skipping the rem
Because this error occurred during a \`before each\` hook we are skipping the remaining tests in the current suite: \`each hooks\`
[stack trace lines]
- 5) taking screenshots
+ 6) taking screenshots
each hooks
"after each" hook for "empty test 2":
Error: after each hook failed
@@ -94,12 +102,12 @@ Because this error occurred during a \`after each\` hook we are skipping the rem
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
- │ Tests: 25 │
+ │ Tests: 26 │
│ Passing: 20 │
- │ Failing: 4 │
+ │ Failing: 5 │
│ Pending: 1 │
│ Skipped: 0 │
- │ Screenshots: 28 │
+ │ Screenshots: 34 │
│ Video: true │
│ Duration: X seconds │
│ Spec Ran: screenshots_spec.js │
@@ -121,6 +129,17 @@ Because this error occurred during a \`after each\` hook we are skipping the rem
- /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/element.png (400x300)
- /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/taking screenshots -- retri (200x1300)
es each screenshot for up to XX:XX.png
+ - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/retrying-test.png (1000x1316)
+ - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/taking screenshots -- scree (1280x720)
+ nshots in a retried test (failed).png
+ - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/retrying-test (attempt 2).p (1000x1316)
+ ng
+ - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/taking screenshots -- scree (1280x720)
+ nshots in a retried test (failed) (attempt 2).png
+ - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/retrying-test (attempt 3).p (1000x1316)
+ ng
+ - /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/taking screenshots -- scree (1280x720)
+ nshots in a retried test (failed) (attempt 3).png
- /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/taking screenshots -- ensur (1280x720)
es unique paths for non-named screenshots.png
- /XXX/XXX/XXX/cypress/screenshots/screenshots_spec.js/taking screenshots -- ensur (1280x720)
@@ -167,9 +186,9 @@ Because this error occurred during a \`after each\` hook we are skipping the rem
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
- │ ✖ screenshots_spec.js XX:XX 25 20 4 1 - │
+ │ ✖ screenshots_spec.js XX:XX 26 20 5 1 - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
- ✖ 1 of 1 failed (100%) XX:XX 25 20 4 1 -
+ ✖ 1 of 1 failed (100%) XX:XX 26 20 5 1 -
`
diff --git a/packages/server/__snapshots__/5_spec_isolation_spec.js b/packages/server/__snapshots__/5_spec_isolation_spec.js
index 93dd31c25ea3..74edb00023b7 100644
--- a/packages/server/__snapshots__/5_spec_isolation_spec.js
+++ b/packages/server/__snapshots__/5_spec_isolation_spec.js
@@ -24,8 +24,8 @@ exports['e2e spec isolation fails'] = {
"reporter": "spec",
"reporterStats": {
"suites": 5,
- "tests": 4,
- "passes": 3,
+ "tests": 5,
+ "passes": 1,
"pending": 1,
"failures": 3,
"start": "2018-02-01T20:14:19.323Z",
@@ -35,14 +35,6 @@ exports['e2e spec isolation fails'] = {
"hooks": [
{
"hookId": "h1",
- "hookName": "before all",
- "title": [
- "\"before all\" hook"
- ],
- "body": "function () {\n if (Cypress.browser.family === 'chromium' && Cypress.browser.name !== 'electron') {\n return Cypress.automation('remote:debugger:protocol', {\n command: 'Emulation.setDeviceMetricsOverride',\n params: {\n width: 1280,\n height: 720,\n deviceScaleFactor: 1,\n mobile: false,\n screenWidth: 1280,\n screenHeight: 720\n }\n }).then(function () {\n // can't tell expect() not to log, so manually throwing here\n if (window.devicePixelRatio !== 1) {\n throw new Error('Setting devicePixelRatio to 1 failed');\n }\n });\n }\n}"
- },
- {
- "hookId": "h2",
"hookName": "before each",
"title": [
"\"before each\" hook"
@@ -50,7 +42,7 @@ exports['e2e spec isolation fails'] = {
"body": "function() {\n throw new Error(\"fail1\");\n }"
},
{
- "hookId": "h3",
+ "hookId": "h2",
"hookName": "after each",
"title": [
"\"after each\" hook"
@@ -58,7 +50,7 @@ exports['e2e spec isolation fails'] = {
"body": "function() {\n throw new Error(\"fail2\");\n }"
},
{
- "hookId": "h4",
+ "hookId": "h3",
"hookName": "after all",
"title": [
"\"after all\" hook"
@@ -76,29 +68,31 @@ exports['e2e spec isolation fails'] = {
],
"state": "failed",
"body": "function() {}",
- "stack": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]",
- "error": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`",
- "timings": {
- "lifecycle": 100,
- "before all": [
- {
- "hookId": "h1",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "before each": [
- {
- "hookId": "h2",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ]
- },
- "failedFromHookId": "h2",
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ "displayError": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "before each": [
+ {
+ "hookId": "h1",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": "h1",
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
},
{
"testId": "r6",
@@ -109,13 +103,18 @@ exports['e2e spec isolation fails'] = {
],
"state": "pending",
"body": "",
- "stack": null,
- "error": null,
- "timings": null,
- "failedFromHookId": null,
- "wallClockStartedAt": null,
- "wallClockDuration": null,
- "videoTimestamp": null
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "pending",
+ "error": null,
+ "timings": null,
+ "failedFromHookId": null,
+ "wallClockStartedAt": null,
+ "wallClockDuration": null,
+ "videoTimestamp": null
+ }
+ ]
},
{
"testId": "r8",
@@ -126,26 +125,35 @@ exports['e2e spec isolation fails'] = {
],
"state": "failed",
"body": "function() {}",
- "stack": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]",
- "error": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`",
- "timings": {
- "lifecycle": 100,
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
- },
- "after each": [
- {
- "hookId": "h3",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ]
- },
- "failedFromHookId": "h3",
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ "displayError": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ },
+ "after each": [
+ {
+ "hookId": "h2",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": "h2",
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
},
{
"testId": "r9",
@@ -156,13 +164,18 @@ exports['e2e spec isolation fails'] = {
],
"state": "skipped",
"body": "function() {}",
- "stack": null,
- "error": null,
- "timings": null,
- "failedFromHookId": null,
- "wallClockStartedAt": null,
- "wallClockDuration": null,
- "videoTimestamp": null
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "skipped",
+ "error": null,
+ "timings": null,
+ "failedFromHookId": null,
+ "wallClockStartedAt": null,
+ "wallClockDuration": null,
+ "videoTimestamp": null
+ }
+ ]
},
{
"testId": "r11",
@@ -173,19 +186,24 @@ exports['e2e spec isolation fails'] = {
],
"state": "passed",
"body": "function() {}",
- "stack": null,
- "error": null,
- "timings": {
- "lifecycle": 100,
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "passed",
+ "error": null,
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ },
+ "failedFromHookId": null,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
}
- },
- "failedFromHookId": null,
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ ]
},
{
"testId": "r12",
@@ -196,26 +214,35 @@ exports['e2e spec isolation fails'] = {
],
"state": "failed",
"body": "function() {}",
- "stack": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n [stack trace lines]",
- "error": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`",
- "timings": {
- "lifecycle": 100,
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
- },
- "after all": [
- {
- "hookId": "h4",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ]
- },
- "failedFromHookId": "h4",
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ "displayError": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n [stack trace lines]",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ },
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": "h3",
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
}
],
"error": null,
@@ -225,6 +252,7 @@ exports['e2e spec isolation fails'] = {
"screenshotId": "some-random-id",
"name": null,
"testId": "r4",
+ "testAttemptIndex": 0,
"takenAt": "2018-02-01T20:14:19.323Z",
"path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here -- before each hook (failed).png",
"height": 720,
@@ -234,6 +262,7 @@ exports['e2e spec isolation fails'] = {
"screenshotId": "some-random-id",
"name": null,
"testId": "r8",
+ "testAttemptIndex": 0,
"takenAt": "2018-02-01T20:14:19.323Z",
"path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed).png",
"height": 720,
@@ -243,6 +272,7 @@ exports['e2e spec isolation fails'] = {
"screenshotId": "some-random-id",
"name": null,
"testId": "r12",
+ "testAttemptIndex": 0,
"takenAt": "2018-02-01T20:14:19.323Z",
"path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- after hooks -- fails on this -- after all hook (failed).png",
"height": 720,
@@ -280,16 +310,7 @@ exports['e2e spec isolation fails'] = {
"end": "2018-02-01T20:14:19.323Z",
"duration": 1234
},
- "hooks": [
- {
- "hookId": "h1",
- "hookName": "before all",
- "title": [
- "\"before all\" hook"
- ],
- "body": "function () {\n if (Cypress.browser.family === 'chromium' && Cypress.browser.name !== 'electron') {\n return Cypress.automation('remote:debugger:protocol', {\n command: 'Emulation.setDeviceMetricsOverride',\n params: {\n width: 1280,\n height: 720,\n deviceScaleFactor: 1,\n mobile: false,\n screenWidth: 1280,\n screenHeight: 720\n }\n }).then(function () {\n // can't tell expect() not to log, so manually throwing here\n if (window.devicePixelRatio !== 1) {\n throw new Error('Setting devicePixelRatio to 1 failed');\n }\n });\n }\n}"
- }
- ],
+ "hooks": [],
"tests": [
{
"testId": "r3",
@@ -299,26 +320,28 @@ exports['e2e spec isolation fails'] = {
],
"state": "failed",
"body": "function() {\n return cy.wrap(true, {\n timeout: 100\n }).should(\"be.false\");\n }",
- "stack": "AssertionError: Timed out retrying: expected true to be false\n [stack trace lines]",
- "error": "Timed out retrying: expected true to be false",
- "timings": {
- "lifecycle": 100,
- "before all": [
- {
- "hookId": "h1",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
+ "displayError": "AssertionError: Timed out retrying: expected true to be false\n [stack trace lines]",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "name": "AssertionError",
+ "message": "Timed out retrying: expected true to be false",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ },
+ "failedFromHookId": null,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
}
- },
- "failedFromHookId": null,
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ ]
},
{
"testId": "r4",
@@ -328,19 +351,28 @@ exports['e2e spec isolation fails'] = {
],
"state": "failed",
"body": "function() {\n throw new Error(\"fails2\");\n }",
- "stack": "Error: fails2\n [stack trace lines]",
- "error": "fails2",
- "timings": {
- "lifecycle": 100,
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
+ "displayError": "Error: fails2\n [stack trace lines]",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fails2",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ },
+ "failedFromHookId": null,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
}
- },
- "failedFromHookId": null,
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ ]
}
],
"error": null,
@@ -350,6 +382,7 @@ exports['e2e spec isolation fails'] = {
"screenshotId": "some-random-id",
"name": null,
"testId": "r3",
+ "testAttemptIndex": 0,
"takenAt": "2018-02-01T20:14:19.323Z",
"path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails1 (failed).png",
"height": 720,
@@ -359,6 +392,7 @@ exports['e2e spec isolation fails'] = {
"screenshotId": "some-random-id",
"name": null,
"testId": "r4",
+ "testAttemptIndex": 0,
"takenAt": "2018-02-01T20:14:19.323Z",
"path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_spec.coffee/simple failing spec -- fails2 (failed).png",
"height": 720,
@@ -403,18 +437,10 @@ exports['e2e spec isolation fails'] = {
"title": [
"\"before all\" hook"
],
- "body": "function () {\n if (Cypress.browser.family === 'chromium' && Cypress.browser.name !== 'electron') {\n return Cypress.automation('remote:debugger:protocol', {\n command: 'Emulation.setDeviceMetricsOverride',\n params: {\n width: 1280,\n height: 720,\n deviceScaleFactor: 1,\n mobile: false,\n screenWidth: 1280,\n screenHeight: 720\n }\n }).then(function () {\n // can't tell expect() not to log, so manually throwing here\n if (window.devicePixelRatio !== 1) {\n throw new Error('Setting devicePixelRatio to 1 failed');\n }\n });\n }\n}"
- },
- {
- "hookId": "h2",
- "hookName": "before all",
- "title": [
- "\"before all\" hook"
- ],
"body": "function() {\n return cy.wait(100);\n }"
},
{
- "hookId": "h3",
+ "hookId": "h2",
"hookName": "before each",
"title": [
"\"before each\" hook"
@@ -422,7 +448,7 @@ exports['e2e spec isolation fails'] = {
"body": "function() {\n return cy.wait(200);\n }"
},
{
- "hookId": "h5",
+ "hookId": "h4",
"hookName": "after each",
"title": [
"\"after each\" hook"
@@ -430,7 +456,7 @@ exports['e2e spec isolation fails'] = {
"body": "function() {\n return cy.wait(200);\n }"
},
{
- "hookId": "h4",
+ "hookId": "h3",
"hookName": "after all",
"title": [
"\"after all\" hook"
@@ -447,45 +473,45 @@ exports['e2e spec isolation fails'] = {
],
"state": "passed",
"body": "function() {\n return cy.wrap(\"t1\").should(\"eq\", \"t1\");\n }",
- "stack": null,
- "error": null,
- "timings": {
- "lifecycle": 100,
- "before all": [
- {
- "hookId": "h1",
- "fnDuration": 400,
- "afterFnDuration": 200
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "passed",
+ "error": null,
+ "timings": {
+ "lifecycle": 100,
+ "before all": [
+ {
+ "hookId": "h1",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ],
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ],
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
},
- {
- "hookId": "h2",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "before each": [
- {
- "hookId": "h3",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
- },
- "after each": [
- {
- "hookId": "h5",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ]
- },
- "failedFromHookId": null,
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ "failedFromHookId": null,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
},
{
"testId": "r4",
@@ -495,33 +521,38 @@ exports['e2e spec isolation fails'] = {
],
"state": "passed",
"body": "function() {\n return cy.wrap(\"t2\").should(\"eq\", \"t2\");\n }",
- "stack": null,
- "error": null,
- "timings": {
- "lifecycle": 100,
- "before each": [
- {
- "hookId": "h3",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
- },
- "after each": [
- {
- "hookId": "h5",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ]
- },
- "failedFromHookId": null,
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "passed",
+ "error": null,
+ "timings": {
+ "lifecycle": 100,
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ],
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": null,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
},
{
"testId": "r5",
@@ -531,40 +562,45 @@ exports['e2e spec isolation fails'] = {
],
"state": "passed",
"body": "function() {\n return cy.wrap(\"t3\").should(\"eq\", \"t3\");\n }",
- "stack": null,
- "error": null,
- "timings": {
- "lifecycle": 100,
- "before each": [
- {
- "hookId": "h3",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
- },
- "after each": [
- {
- "hookId": "h5",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "after all": [
- {
- "hookId": "h4",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ]
- },
- "failedFromHookId": null,
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "passed",
+ "error": null,
+ "timings": {
+ "lifecycle": 100,
+ "before each": [
+ {
+ "hookId": "h2",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ],
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ },
+ "after each": [
+ {
+ "hookId": "h4",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ],
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": null,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
}
],
"error": null,
@@ -604,14 +640,6 @@ exports['e2e spec isolation fails'] = {
"hooks": [
{
"hookId": "h1",
- "hookName": "before all",
- "title": [
- "\"before all\" hook"
- ],
- "body": "function () {\n if (Cypress.browser.family === 'chromium' && Cypress.browser.name !== 'electron') {\n return Cypress.automation('remote:debugger:protocol', {\n command: 'Emulation.setDeviceMetricsOverride',\n params: {\n width: 1280,\n height: 720,\n deviceScaleFactor: 1,\n mobile: false,\n screenWidth: 1280,\n screenHeight: 720\n }\n }).then(function () {\n // can't tell expect() not to log, so manually throwing here\n if (window.devicePixelRatio !== 1) {\n throw new Error('Setting devicePixelRatio to 1 failed');\n }\n });\n }\n}"
- },
- {
- "hookId": "h2",
"hookName": "before each",
"title": [
"\"before each\" hook"
@@ -628,33 +656,31 @@ exports['e2e spec isolation fails'] = {
],
"state": "passed",
"body": "function() {\n return cy.wrap(true).should(\"be.true\");\n }",
- "stack": null,
- "error": null,
- "timings": {
- "lifecycle": 100,
- "before all": [
- {
- "hookId": "h1",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "before each": [
- {
- "hookId": "h2",
- "fnDuration": 400,
- "afterFnDuration": 200
- }
- ],
- "test": {
- "fnDuration": 400,
- "afterFnDuration": 200
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "passed",
+ "error": null,
+ "timings": {
+ "lifecycle": 100,
+ "before each": [
+ {
+ "hookId": "h1",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ],
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ },
+ "failedFromHookId": null,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
}
- },
- "failedFromHookId": null,
- "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
- "wallClockDuration": 1234,
- "videoTimestamp": 9999
+ ]
}
],
"error": null,
@@ -677,3 +703,492 @@ exports['e2e spec isolation fails'] = {
"cypressVersion": "9.9.9",
"config": {}
}
+
+exports['e2e spec_isolation / failing with retries enabled'] = `
+
+====================================================================================================
+
+ (Run Starting)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Cypress: 1.2.3 │
+ │ Browser: FooBrowser 88 │
+ │ Specs: 1 found (simple_failing_hook_spec.coffee) │
+ │ Searched: cypress/integration/simple_failing_hook_spec.coffee │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+────────────────────────────────────────────────────────────────────────────────────────────────────
+
+ Running: simple_failing_hook_spec.coffee (1 of 1)
+
+
+ simple failing hook spec
+ beforeEach hooks
+ (Attempt 1 of 2) never gets here
+ 1) "before each" hook for "never gets here"
+ pending
+ - is pending
+ afterEach hooks
+ (Attempt 1 of 2) runs this
+ 2) "after each" hook for "runs this"
+ after hooks
+ ✓ runs this
+ 3) "after all" hook for "fails on this"
+
+
+ 1 passing
+ 1 pending
+ 3 failing
+
+ 1) simple failing hook spec
+ beforeEach hooks
+ "before each" hook for "never gets here":
+ Error: fail1
+
+Because this error occurred during a \`before each\` hook we are skipping the remaining tests in the current suite: \`beforeEach hooks\`
+ [stack trace lines]
+
+ 2) simple failing hook spec
+ afterEach hooks
+ "after each" hook for "runs this":
+ Error: fail2
+
+Because this error occurred during a \`after each\` hook we are skipping the remaining tests in the current suite: \`afterEach hooks\`
+ [stack trace lines]
+
+ 3) simple failing hook spec
+ after hooks
+ "after all" hook for "fails on this":
+ Error: fail3
+
+Because this error occurred during a \`after all\` hook we are skipping the remaining tests in the current suite: \`after hooks\`
+
+Although you have test retries enabled, we do not retry tests when \`before all\` or \`after all\` hooks fail
+ [stack trace lines]
+
+
+
+
+ (Results)
+
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ Tests: 6 │
+ │ Passing: 1 │
+ │ Failing: 3 │
+ │ Pending: 1 │
+ │ Skipped: 1 │
+ │ Screenshots: 5 │
+ │ Video: true │
+ │ Duration: X seconds │
+ │ Spec Ran: simple_failing_hook_spec.coffee │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+
+
+ (Screenshots)
+
+ - /XXX/XXX/XXX/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing (1280x720)
+ hook spec -- beforeEach hooks -- never gets here (failed).png
+ - /XXX/XXX/XXX/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing (1280x720)
+ hook spec -- beforeEach hooks -- never gets here -- before each hook (failed) (a
+ ttempt 2).png
+ - /XXX/XXX/XXX/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing (1280x720)
+ hook spec -- afterEach hooks -- runs this -- after each hook (failed).png
+ - /XXX/XXX/XXX/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing (1280x720)
+ hook spec -- afterEach hooks -- runs this -- after each hook (failed) (attempt 2
+ ).png
+ - /XXX/XXX/XXX/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing (1280x720)
+ hook spec -- after hooks -- fails on this -- after all hook (failed).png
+
+
+ (Video)
+
+ - Started processing: Compressing to 32 CRF
+ - Finished processing: /XXX/XXX/XXX/cypress/videos/simple_failing_hook_spec.coffee (X second)
+ .mp4
+
+
+====================================================================================================
+
+ (Run Finished)
+
+
+ Spec Tests Passing Failing Pending Skipped
+ ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
+ │ ✖ simple_failing_hook_spec.coffee XX:XX 6 1 3 1 1 │
+ └────────────────────────────────────────────────────────────────────────────────────────────────┘
+ ✖ 1 of 1 failed (100%) XX:XX 6 1 3 1 1
+
+
+`
+
+exports['failing with retries enabled'] = {
+ "startedTestsAt": "2018-02-01T20:14:19.323Z",
+ "endedTestsAt": "2018-02-01T20:14:19.323Z",
+ "totalDuration": 5555,
+ "totalSuites": 5,
+ "totalTests": 6,
+ "totalFailed": 3,
+ "totalPassed": 1,
+ "totalPending": 1,
+ "totalSkipped": 1,
+ "runs": [
+ {
+ "stats": {
+ "suites": 5,
+ "tests": 6,
+ "passes": 1,
+ "pending": 1,
+ "skipped": 1,
+ "failures": 3,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockEndedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234
+ },
+ "reporter": "spec",
+ "reporterStats": {
+ "suites": 5,
+ "tests": 5,
+ "passes": 1,
+ "pending": 1,
+ "failures": 3,
+ "start": "2018-02-01T20:14:19.323Z",
+ "end": "2018-02-01T20:14:19.323Z",
+ "duration": 1234
+ },
+ "hooks": [
+ {
+ "hookId": "h1",
+ "hookName": "before each",
+ "title": [
+ "\"before each\" hook"
+ ],
+ "body": "function() {\n throw new Error(\"fail1\");\n }"
+ },
+ {
+ "hookId": "h2",
+ "hookName": "after each",
+ "title": [
+ "\"after each\" hook"
+ ],
+ "body": "function() {\n throw new Error(\"fail2\");\n }"
+ },
+ {
+ "hookId": "h3",
+ "hookName": "after all",
+ "title": [
+ "\"after all\" hook"
+ ],
+ "body": "function() {\n throw new Error(\"fail3\");\n }"
+ }
+ ],
+ "tests": [
+ {
+ "testId": "r4",
+ "title": [
+ "simple failing hook spec",
+ "beforeEach hooks",
+ "never gets here"
+ ],
+ "state": "failed",
+ "body": "function() {}",
+ "displayError": "Error: fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`\n [stack trace lines]",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fail1\n\nBecause this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `beforeEach hooks`",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "before each": [
+ {
+ "hookId": "h1",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": "h1",
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ },
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fail1",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "before each": [
+ {
+ "hookId": "h1",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ],
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ },
+ "failedFromHookId": "h1",
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
+ },
+ {
+ "testId": "r6",
+ "title": [
+ "simple failing hook spec",
+ "pending",
+ "is pending"
+ ],
+ "state": "pending",
+ "body": "",
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "pending",
+ "error": null,
+ "timings": null,
+ "failedFromHookId": null,
+ "wallClockStartedAt": null,
+ "wallClockDuration": null,
+ "videoTimestamp": null
+ }
+ ]
+ },
+ {
+ "testId": "r8",
+ "title": [
+ "simple failing hook spec",
+ "afterEach hooks",
+ "runs this"
+ ],
+ "state": "failed",
+ "body": "function() {}",
+ "displayError": "Error: fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`\n [stack trace lines]",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fail2\n\nBecause this error occurred during a `after each` hook we are skipping the remaining tests in the current suite: `afterEach hooks`",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ },
+ "after each": [
+ {
+ "hookId": "h2",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": "h2",
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ },
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fail2",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ },
+ "after each": [
+ {
+ "hookId": "h2",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": "h2",
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
+ },
+ {
+ "testId": "r9",
+ "title": [
+ "simple failing hook spec",
+ "afterEach hooks",
+ "does not run this"
+ ],
+ "state": "skipped",
+ "body": "function() {}",
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "skipped",
+ "error": null,
+ "timings": null,
+ "failedFromHookId": null,
+ "wallClockStartedAt": null,
+ "wallClockDuration": null,
+ "videoTimestamp": null
+ }
+ ]
+ },
+ {
+ "testId": "r11",
+ "title": [
+ "simple failing hook spec",
+ "after hooks",
+ "runs this"
+ ],
+ "state": "passed",
+ "body": "function() {}",
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "passed",
+ "error": null,
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ },
+ "failedFromHookId": null,
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
+ },
+ {
+ "testId": "r12",
+ "title": [
+ "simple failing hook spec",
+ "after hooks",
+ "fails on this"
+ ],
+ "state": "failed",
+ "body": "function() {}",
+ "displayError": "Error: fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n\nAlthough you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail\n [stack trace lines]",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "name": "Error",
+ "message": "fail3\n\nBecause this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `after hooks`\n\nAlthough you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail",
+ "stack": "[stack trace lines]"
+ },
+ "timings": {
+ "lifecycle": 100,
+ "test": {
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ },
+ "after all": [
+ {
+ "hookId": "h3",
+ "fnDuration": 400,
+ "afterFnDuration": 200
+ }
+ ]
+ },
+ "failedFromHookId": "h3",
+ "wallClockStartedAt": "2018-02-01T20:14:19.323Z",
+ "wallClockDuration": 1234,
+ "videoTimestamp": 9999
+ }
+ ]
+ }
+ ],
+ "error": null,
+ "video": "/foo/bar/.projects/e2e/cypress/videos/simple_failing_hook_spec.coffee.mp4",
+ "screenshots": [
+ {
+ "screenshotId": "some-random-id",
+ "name": null,
+ "testId": "r4",
+ "testAttemptIndex": 0,
+ "takenAt": "2018-02-01T20:14:19.323Z",
+ "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here (failed).png",
+ "height": 720,
+ "width": 1280
+ },
+ {
+ "screenshotId": "some-random-id",
+ "name": null,
+ "testId": "r4",
+ "testAttemptIndex": 1,
+ "takenAt": "2018-02-01T20:14:19.323Z",
+ "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- beforeEach hooks -- never gets here -- before each hook (failed) (attempt 2).png",
+ "height": 720,
+ "width": 1280
+ },
+ {
+ "screenshotId": "some-random-id",
+ "name": null,
+ "testId": "r8",
+ "testAttemptIndex": 0,
+ "takenAt": "2018-02-01T20:14:19.323Z",
+ "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed).png",
+ "height": 720,
+ "width": 1280
+ },
+ {
+ "screenshotId": "some-random-id",
+ "name": null,
+ "testId": "r8",
+ "testAttemptIndex": 1,
+ "takenAt": "2018-02-01T20:14:19.323Z",
+ "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- afterEach hooks -- runs this -- after each hook (failed) (attempt 2).png",
+ "height": 720,
+ "width": 1280
+ },
+ {
+ "screenshotId": "some-random-id",
+ "name": null,
+ "testId": "r12",
+ "testAttemptIndex": 0,
+ "takenAt": "2018-02-01T20:14:19.323Z",
+ "path": "/foo/bar/.projects/e2e/cypress/screenshots/simple_failing_hook_spec.coffee/simple failing hook spec -- after hooks -- fails on this -- after all hook (failed).png",
+ "height": 720,
+ "width": 1280
+ }
+ ],
+ "spec": {
+ "name": "simple_failing_hook_spec.coffee",
+ "relative": "cypress/integration/simple_failing_hook_spec.coffee",
+ "absolute": "/foo/bar/.projects/e2e/cypress/integration/simple_failing_hook_spec.coffee",
+ "specType": "integration"
+ },
+ "shouldUploadVideo": true
+ }
+ ],
+ "browserPath": "path/to/browser",
+ "browserName": "FooBrowser",
+ "browserVersion": "88",
+ "osName": "FooOS",
+ "osVersion": "1234",
+ "cypressVersion": "9.9.9",
+ "config": {}
+}
diff --git a/packages/server/__snapshots__/7_record_spec.js b/packages/server/__snapshots__/7_record_spec.js
index c4c3303effa1..75d9ba2d15c2 100644
--- a/packages/server/__snapshots__/7_record_spec.js
+++ b/packages/server/__snapshots__/7_record_spec.js
@@ -11,7 +11,7 @@ exports['e2e record passing passes 1'] = `
│ e, record_uncaught_spec.coffee) │
│ Searched: cypress/integration/record* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -247,7 +247,7 @@ We dynamically generated a new test to display this failure.
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -348,7 +348,7 @@ exports['e2e record api interaction errors create instance does not update insta
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
Warning: We encountered an error talking to our servers.
@@ -407,7 +407,7 @@ StatusCodeError: 500 - "Internal Server Error"
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -424,7 +424,7 @@ exports['e2e record api interaction errors update instance does not update insta
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -488,7 +488,7 @@ StatusCodeError: 500 - "Internal Server Error"
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -505,7 +505,7 @@ exports['e2e record api interaction errors update instance stdout warns but proc
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -570,7 +570,7 @@ StatusCodeError: 500 - "Internal Server Error"
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -626,7 +626,7 @@ exports['e2e record video recording does not upload when not enabled 1'] = `
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -684,7 +684,7 @@ exports['e2e record video recording does not upload when not enabled 1'] = `
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -701,7 +701,7 @@ exports['e2e record api interaction errors uploading assets warns but proceeds 1
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -766,7 +766,7 @@ exports['e2e record api interaction errors uploading assets warns but proceeds 1
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -882,7 +882,7 @@ exports['e2e record parallelization passes in parallel with group 1'] = `
│ e, record_uncaught_spec.coffee) │
│ Searched: cypress/integration/record* │
│ Params: Tag: nightly, Group: prod-e2e, Parallel: true │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -940,7 +940,7 @@ exports['e2e record parallelization passes in parallel with group 1'] = `
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -958,7 +958,7 @@ exports['e2e record parallelization passes in parallel with group 2'] = `
│ e, record_uncaught_spec.coffee) │
│ Searched: cypress/integration/record* │
│ Params: Tag: nightly, Group: prod-e2e, Parallel: true │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -1152,7 +1152,7 @@ We dynamically generated a new test to display this failure.
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -1286,7 +1286,7 @@ exports['e2e record api interaction errors create instance 500 does not proceed
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: nightly, Group: foo, Parallel: true │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
We encountered an unexpected error talking to our servers.
@@ -1314,7 +1314,7 @@ exports['e2e record api interaction errors update instance 500 does not proceed
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: nightly, Group: foo, Parallel: true │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -1402,7 +1402,7 @@ StatusCodeError: 500 - "Internal Server Error"
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: nightly, Group: foo, Parallel: true │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
We encountered an unexpected error talking to our servers.
@@ -1467,7 +1467,7 @@ StatusCodeError: 500 - "Internal Server Error"
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -1611,7 +1611,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -1669,7 +1669,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -1691,7 +1691,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -1749,7 +1749,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -1771,7 +1771,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -1829,7 +1829,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -1851,7 +1851,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -1909,7 +1909,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -1931,7 +1931,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -1989,7 +1989,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -2011,7 +2011,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -2069,7 +2069,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
@@ -2095,7 +2095,7 @@ Details:
│ Specs: 1 found (record_pass_spec.coffee) │
│ Searched: cypress/integration/record_pass* │
│ Params: Tag: false, Group: false, Parallel: false │
- │ Run URL: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12 │
+ │ Run URL: https://dashboard.cypress.io/projects/cjvoj7/runs/12 │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -2153,7 +2153,7 @@ Details:
───────────────────────────────────────────────────────────────────────────────────────────────────────
- Recorded Run: https://dashboard.cypress.io/#/projects/cjvoj7/runs/12
+ Recorded Run: https://dashboard.cypress.io/projects/cjvoj7/runs/12
`
diff --git a/packages/server/__snapshots__/8_reporters_spec.js b/packages/server/__snapshots__/8_reporters_spec.js
index 706d8c13fa0e..55b815c5dfd0 100644
--- a/packages/server/__snapshots__/8_reporters_spec.js
+++ b/packages/server/__snapshots__/8_reporters_spec.js
@@ -224,15 +224,13 @@ exports['e2e reporters mochawesome fails with mochawesome-1.5.2 npm custom repor
pending
- is pending
afterEach hooks
- ✓ runs this
2) "after each" hook for "runs this"
after hooks
✓ runs this
- ✓ fails on this
3) "after all" hook for "fails on this"
- 3 passing
+ 1 passing
1 pending
3 failing
@@ -404,15 +402,13 @@ exports['e2e reporters mochawesome fails with mochawesome-2.3.1 npm custom repor
pending
- is pending
afterEach hooks
- ✓ runs this
2) "after each" hook for "runs this"
after hooks
✓ runs this
- ✓ fails on this
3) "after all" hook for "fails on this"
- 3 passing
+ 1 passing
1 pending
3 failing
@@ -584,15 +580,13 @@ exports['e2e reporters mochawesome fails with mochawesome-3.0.1 npm custom repor
pending
- is pending
afterEach hooks
- ✓ runs this
2) "after each" hook for "runs this"
after hooks
✓ runs this
- ✓ fails on this
3) "after all" hook for "fails on this"
- 3 passing
+ 1 passing
1 pending
3 failing
diff --git a/packages/server/__snapshots__/reporter_spec.js b/packages/server/__snapshots__/reporter_spec.js
index 5d5fdae8205a..6678e29bf06a 100644
--- a/packages/server/__snapshots__/reporter_spec.js
+++ b/packages/server/__snapshots__/reporter_spec.js
@@ -27,17 +27,21 @@ exports['lib/reporter #stats has reporterName stats, reporterStats, etc 1'] = {
],
"state": "failed",
"body": "",
- "stack": [
- 1,
- 2,
- 3
- ],
- "error": "foo",
- "timings": null,
- "failedFromHookId": null,
- "wallClockStartedAt": null,
- "wallClockDuration": null,
- "videoTimestamp": null
+ "displayError": "at foo:1:1\nat bar:1:1\nat baz:1:1",
+ "attempts": [
+ {
+ "state": "failed",
+ "error": {
+ "message": "foo",
+ "stack": "at foo:1:1\nat bar:1:1\nat baz:1:1"
+ },
+ "timings": null,
+ "failedFromHookId": null,
+ "wallClockStartedAt": null,
+ "wallClockDuration": null,
+ "videoTimestamp": null
+ }
+ ]
},
{
"testId": "r5",
@@ -48,13 +52,18 @@ exports['lib/reporter #stats has reporterName stats, reporterStats, etc 1'] = {
],
"state": "pending",
"body": "",
- "stack": null,
- "error": null,
- "timings": null,
- "failedFromHookId": null,
- "wallClockStartedAt": null,
- "wallClockDuration": null,
- "videoTimestamp": null
+ "displayError": null,
+ "attempts": [
+ {
+ "state": "pending",
+ "error": null,
+ "timings": null,
+ "failedFromHookId": null,
+ "wallClockStartedAt": null,
+ "wallClockDuration": null,
+ "videoTimestamp": null
+ }
+ ]
}
]
}
diff --git a/packages/server/lib/api.js b/packages/server/lib/api.js
index 176274721b43..a9f547bfc3ee 100644
--- a/packages/server/lib/api.js
+++ b/packages/server/lib/api.js
@@ -268,7 +268,7 @@ module.exports = {
json: true,
timeout: options.timeout != null ? options.timeout : SIXTY_SECONDS,
headers: {
- 'x-route-version': '2',
+ 'x-route-version': '3',
},
body: _.pick(options, [
'stats',
diff --git a/packages/server/lib/browsers/firefox-util.ts b/packages/server/lib/browsers/firefox-util.ts
index 41b329a90c69..82b08cb06e9f 100644
--- a/packages/server/lib/browsers/firefox-util.ts
+++ b/packages/server/lib/browsers/firefox-util.ts
@@ -70,6 +70,9 @@ const getPrimaryTab = Bluebird.method((browser) => {
})
const attachToTabMemory = Bluebird.method((tab) => {
+ // TODO: figure out why tab.memory is sometimes undefined
+ if (!tab.memory) return
+
if (tab.memory.isAttached) {
return
}
@@ -186,6 +189,9 @@ export default {
const gc = (tab) => {
return () => {
+ // TODO: figure out why tab.memory is sometimes undefined
+ if (!tab.memory) return
+
let start = Date.now()
return tab.memory.forceGarbageCollection()
@@ -198,6 +204,9 @@ export default {
const cc = (tab) => {
return () => {
+ // TODO: figure out why tab.memory is sometimes undefined
+ if (!tab.memory) return
+
let start = Date.now()
return tab.memory.forceCycleCollection()
diff --git a/packages/server/lib/config.js b/packages/server/lib/config.js
index d927f8dcaa5c..5de52ab03c43 100644
--- a/packages/server/lib/config.js
+++ b/packages/server/lib/config.js
@@ -80,7 +80,8 @@ screenshotOnRunFailure
watchForFileChanges
waitForAnimations resolvedNodeVersion
nodeVersion resolvedNodePath
-firefoxGcInterval\
+firefoxGcInterval
+retries
`)
// NOTE: If you add a config value, make sure to update the following
@@ -180,6 +181,7 @@ const CONFIG_DEFAULTS = {
experimentalSourceRewriting: false,
experimentalShadowDomSupport: false,
experimentalFetchPolyfill: false,
+ retries: { runMode: 0, openMode: 0 },
}
const validationRules = {
@@ -228,6 +230,7 @@ const validationRules = {
experimentalSourceRewriting: v.isBoolean,
experimentalShadowDomSupport: v.isBoolean,
experimentalFetchPolyfill: v.isBoolean,
+ retries: v.isValidRetriesConfig,
}
const convertRelativeToAbsolutePaths = (projectRoot, obj, defaults = {}) => {
diff --git a/packages/server/lib/errors.js b/packages/server/lib/errors.js
index 509a50118dfe..fe9e18f81abd 100644
--- a/packages/server/lib/errors.js
+++ b/packages/server/lib/errors.js
@@ -925,9 +925,19 @@ const getMsgByType = function (type, arg1 = {}, arg2, arg3) {
If you don't require screenshots or videos to be stored you can safely ignore this warning.`
case 'EXPERIMENTAL_SAMESITE_REMOVED':
return stripIndent`\
- The \`experimentalGetCookiesSameSite\` configuration option was removed in Cypress version 5.0.0. Yielding the \`sameSite\` property is now the default behavior of the \`cy.cookie\` commands.
+ The \`experimentalGetCookiesSameSite\` configuration option was removed in Cypress version \`5.0.0\`. Yielding the \`sameSite\` property is now the default behavior of the \`cy.cookie\` commands.
You can safely remove this option from your config.`
+ case 'INCOMPATIBLE_PLUGIN_RETRIES':
+ return stripIndent`\
+ We've detected that the incompatible plugin \`cypress-plugin-retries\` is installed at \`${arg1}\`.
+
+ Test retries is now supported in Cypress version \`5.0.0\`.
+
+ Remove the plugin from your dependencies to silence this warning.
+
+ https://on.cypress.io/test-retries
+ `
default:
}
}
diff --git a/packages/server/lib/modes/record.js b/packages/server/lib/modes/record.js
index ea0023bdf20a..a74d858f6841 100644
--- a/packages/server/lib/modes/record.js
+++ b/packages/server/lib/modes/record.js
@@ -227,7 +227,6 @@ const updateInstance = (options = {}) => {
error,
video,
hooks,
- stdout: null, // don't send stdout with the instance payload to prevent requests that are too large. stdout will later get uploaded separately anyway.
instanceId,
screenshots,
reporterStats,
diff --git a/packages/server/lib/modes/run.js b/packages/server/lib/modes/run.js
index cc8bb57c46f6..50155414ebe6 100644
--- a/packages/server/lib/modes/run.js
+++ b/packages/server/lib/modes/run.js
@@ -916,7 +916,16 @@ module.exports = {
browserOpts.automationMiddleware = {
onAfterResponse: (message, data, resp) => {
if (message === 'take:screenshot' && resp) {
- screenshots.push(this.screenshotMetadata(data, resp))
+ const existingScreenshot = _.findIndex(screenshots, { path: resp.path })
+
+ if (existingScreenshot !== -1) {
+ // NOTE: saving screenshots to the same path will overwrite the previous one
+ // so we shouldn't report more screenshots than exist on disk.
+ // this happens when cy.screenshot is used in a retried test
+ screenshots.splice(existingScreenshot, 1, this.screenshotMetadata(data, resp))
+ } else {
+ screenshots.push(this.screenshotMetadata(data, resp))
+ }
}
return resp
@@ -1112,12 +1121,14 @@ module.exports = {
const { tests, stats } = obj
+ const attempts = _.flatMap(tests, (test) => test.attempts)
+
const hasFailingTests = _.get(stats, 'failures') > 0
// if we have a video recording
if (startedVideoCapture && tests && tests.length) {
// always set the video timestamp on tests
- obj.tests = Reporter.setVideoTimestamp(startedVideoCapture, tests)
+ Reporter.setVideoTimestamp(startedVideoCapture, attempts)
}
// we should upload the video if we upload on passes (by default)
@@ -1160,6 +1171,7 @@ module.exports = {
screenshotId: random.id(),
name: data.name || null,
testId: data.testId,
+ testAttemptIndex: data.testAttemptIndex,
takenAt: resp.takenAt,
path: resp.path,
height: resp.dimensions.height,
diff --git a/packages/server/lib/plugins/index.js b/packages/server/lib/plugins/index.js
index f40cf579b0c0..d9a2f3b271cc 100644
--- a/packages/server/lib/plugins/index.js
+++ b/packages/server/lib/plugins/index.js
@@ -2,6 +2,7 @@ const _ = require('lodash')
const cp = require('child_process')
const path = require('path')
const debug = require('debug')('cypress:server:plugins')
+const resolve = require('resolve')
const Promise = require('bluebird')
const errors = require('../errors')
const util = require('./util')
@@ -38,6 +39,17 @@ const registerHandler = (handler) => {
const init = (config, options) => {
debug('plugins.init', config.pluginsFile)
+ // test and warn for incompatible plugin
+ try {
+ const retriesPluginPath = path.dirname(resolve.sync('cypress-plugin-retries', {
+ basedir: options.projectRoot,
+ }))
+
+ options.onWarning(errors.get('INCOMPATIBLE_PLUGIN_RETRIES', path.relative(options.projectRoot, retriesPluginPath)))
+ } catch (e) {
+ // noop, incompatible plugin not installed
+ }
+
return new Promise((_resolve, _reject) => {
// provide a safety net for fulfilling the promise because the
// 'handleError' function below can potentially be triggered
diff --git a/packages/server/lib/reporter.js b/packages/server/lib/reporter.js
index b702a390734a..84119a80fd73 100644
--- a/packages/server/lib/reporter.js
+++ b/packages/server/lib/reporter.js
@@ -1,11 +1,13 @@
const _ = require('lodash')
const path = require('path')
+const stackUtils = require('./util/stack_utils')
// mocha-* is used to allow us to have later versions of mocha specified in devDependencies
// and prevents accidently upgrading this one
// TODO: look into upgrading this to version in driver
const Mocha = require('mocha-7.0.1')
const mochaReporters = require('mocha-7.0.1/lib/reporters')
const mochaCreateStatsCollector = require('mocha-7.0.1/lib/stats-collector')
+const mochaColor = mochaReporters.Base.color
const debug = require('debug')('cypress:server:reporter')
const Promise = require('bluebird')
@@ -99,6 +101,10 @@ const createRunnable = function (obj, parent) {
runnable.sync = obj.sync
runnable.duration = obj.duration
runnable.state = obj.state != null ? obj.state : 'skipped' // skipped by default
+ runnable._retries = obj._retries
+ // shouldn't need to set _currentRetry, but we'll do it anyways
+ runnable._currentRetry = obj._currentRetry
+
if (runnable.body == null) {
runnable.body = body
}
@@ -110,10 +116,42 @@ const createRunnable = function (obj, parent) {
return runnable
}
+const mochaProps = {
+ 'currentRetry': '_currentRetry',
+ 'retries': '_retries',
+}
+
+const toMochaProps = (testProps) => {
+ return _.each(mochaProps, (val, key) => {
+ if (testProps.hasOwnProperty(key)) {
+ testProps[val] = testProps[key]
+
+ return delete testProps[key]
+ }
+ })
+}
+
const mergeRunnable = (eventName) => {
return (function (testProps, runnables) {
+ toMochaProps(testProps)
+
const runnable = runnables[testProps.id]
+ if (eventName === 'test:before:run') {
+ if (testProps._currentRetry > runnable._currentRetry) {
+ debug('test retried:', testProps.title)
+ const prevAttempts = runnable.prevAttempts || []
+
+ delete runnable.prevAttempts
+ const prevAttempt = _.cloneDeep(runnable)
+
+ delete runnable.failedFromHookId
+ delete runnable.err
+ delete runnable.hookName
+ testProps.prevAttempts = prevAttempts.concat([prevAttempt])
+ }
+ }
+
return _.extend(runnable, testProps)
})
}
@@ -172,6 +210,12 @@ const setDate = function (obj, runnables, stats) {
return null
}
+const orNull = function (prop) {
+ if (prop == null) return null
+
+ return prop
+}
+
const events = {
'start': setDate,
'end': setDate,
@@ -180,11 +224,13 @@ const events = {
'test': mergeRunnable('test'),
'test end': mergeRunnable('test end'),
'hook': safelyMergeRunnable,
+ 'retry': true,
'hook end': safelyMergeRunnable,
'pass': mergeRunnable('pass'),
'pending': mergeRunnable('pending'),
'fail': mergeErr,
'test:after:run': mergeRunnable('test:after:run'), // our own custom event
+ 'test:before:run': mergeRunnable('test:before:run'), // our own custom event
}
const reporters = {
@@ -201,6 +247,7 @@ class Reporter {
this.reporterName = reporterName
this.projectRoot = projectRoot
this.reporterOptions = reporterOptions
+ this.normalizeTest = this.normalizeTest.bind(this)
}
setRunnables (rootRunnable) {
@@ -219,6 +266,18 @@ class Reporter {
this.runner = new Mocha.Runner(rootRunnable)
mochaCreateStatsCollector(this.runner)
+ if (this.reporterName === 'spec') {
+ this.runner.on('retry', (test) => {
+ const runnable = this.runnables[test.id]
+ const padding = ' '.repeat(runnable.titlePath().length)
+ const retryMessage = mochaColor('medium', `(Attempt ${test.currentRetry + 1} of ${test.retries + 1})`)
+
+ // Log: `(Attempt 1 of 2) test title` when a test retries
+ // eslint-disable-next-line no-console
+ return console.log(`${padding}${retryMessage} ${test.title}`)
+ })
+ }
+
this.reporter = new this.mocha._reporter(this.runner, {
reporterOptions: this.reporterOptions,
})
@@ -260,7 +319,7 @@ class Reporter {
args = this.parseArgs(event, args)
if (args) {
- return (this.runner != null ? this.runner.emit.apply(this.runner, args) : undefined)
+ return this.runner && this.runner.emit.apply(this.runner, args)
}
}
@@ -292,39 +351,32 @@ class Reporter {
}
normalizeTest (test = {}) {
- let wcs
- const get = (prop) => {
- return _.get(test, prop, null)
- }
-
- // use this or null
- wcs = get('wallClockStartedAt')
-
- if (wcs) {
- // convert to actual date object
- wcs = new Date(wcs)
- }
-
- // wallClockDuration:
- // this is the 'real' duration of wall clock time that the
- // user 'felt' when the test run. it includes everything
- // from hooks, to the test itself, to lifecycle, and event
- // async browser compute time. this number is likely higher
- // than summing the durations of the timings.
- //
- return {
- testId: get('id'),
+ const normalizedTest = {
+ testId: orNull(test.id),
title: getParentTitle(test),
- state: get('state'),
- body: get('body'),
- stack: get('err.stack'),
- error: get('err.message'),
- timings: get('timings'),
- failedFromHookId: get('failedFromHookId'),
- wallClockStartedAt: wcs,
- wallClockDuration: get('wallClockDuration'),
- videoTimestamp: null, // always start this as null
+ state: orNull(test.state),
+ body: orNull(test.body),
+ displayError: orNull(test.err && test.err.stack),
+ attempts: _.map([test].concat(test.prevAttempts || []), (attempt) => {
+ const err = attempt.err && {
+ name: attempt.err.name,
+ message: attempt.err.message,
+ stack: stackUtils.stackWithoutMessage(attempt.err.stack),
+ }
+
+ return {
+ state: orNull(attempt.state),
+ error: orNull(err),
+ timings: orNull(attempt.timings),
+ failedFromHookId: orNull(attempt.failedFromHookId),
+ wallClockStartedAt: orNull(attempt.wallClockStartedAt && new Date(attempt.wallClockStartedAt)),
+ wallClockDuration: orNull(attempt.wallClockDuration),
+ videoTimestamp: null,
+ }
+ }),
}
+
+ return normalizedTest
}
end () {
diff --git a/packages/server/lib/screenshots.js b/packages/server/lib/screenshots.js
index d5974c6991bf..52e84ffe7b49 100644
--- a/packages/server/lib/screenshots.js
+++ b/packages/server/lib/screenshots.js
@@ -340,6 +340,10 @@ const getPath = function (data, ext, screenshotsFolder) {
names[index] = `${names[index]} (failed)`
}
+ if (data.testAttemptIndex > 0) {
+ names[index] = `${names[index]} (attempt ${data.testAttemptIndex + 1})`
+ }
+
const withoutExt = path.join(screenshotsFolder, ...specNames, ...names)
return ensureUniquePath(withoutExt, ext)
@@ -484,7 +488,7 @@ module.exports = {
const duration = new Date() - new Date(data.startTime)
details = _.extend({}, data, details, { duration })
- details = _.pick(details, 'size', 'takenAt', 'dimensions', 'multipart', 'pixelRatio', 'name', 'specName', 'testFailure', 'path', 'scaled', 'blackout', 'duration')
+ details = _.pick(details, 'testAttemptIndex', 'size', 'takenAt', 'dimensions', 'multipart', 'pixelRatio', 'name', 'specName', 'testFailure', 'path', 'scaled', 'blackout', 'duration')
if (!plugins.has('after:screenshot')) {
return Promise.resolve(details)
diff --git a/packages/server/lib/util/stack_utils.ts b/packages/server/lib/util/stack_utils.ts
new file mode 100644
index 000000000000..1018a367a2a5
--- /dev/null
+++ b/packages/server/lib/util/stack_utils.ts
@@ -0,0 +1,44 @@
+import _ from 'lodash'
+
+const stackLineRegex = /^\s*(at )?.*@?\(?.*\:\d+\:\d+\)?$/
+
+// returns tuple of [message, stack]
+export const splitStack = (stack: string) => {
+ const lines = stack.split('\n')
+
+ return _.reduce(lines, (memo, line) => {
+ if (memo.messageEnded || stackLineRegex.test(line)) {
+ memo.messageEnded = true
+ memo[1].push(line)
+ } else {
+ memo[0].push(line)
+ }
+
+ return memo
+ }, [[], []] as any[] & {messageEnded: boolean})
+}
+
+export const unsplitStack = (messageLines, stackLines) => {
+ return _.castArray(messageLines).concat(stackLines).join('\n')
+}
+
+export const getStackLines = (stack) => {
+ const [, stackLines] = splitStack(stack)
+
+ return stackLines
+}
+
+export const stackWithoutMessage = (stack) => {
+ return getStackLines(stack).join('\n')
+}
+
+export const replacedStack = (err, newStack) => {
+ // if err already lacks a stack or we've removed the stack
+ // for some reason, keep it stackless
+ if (!err.stack) return err.stack
+
+ const errString = err.toString()
+ const stackLines = getStackLines(newStack)
+
+ return unsplitStack(errString, stackLines)
+}
diff --git a/packages/server/lib/util/validation.js b/packages/server/lib/util/validation.js
index 3dfcb9b13264..72f25304797d 100644
--- a/packages/server/lib/util/validation.js
+++ b/packages/server/lib/util/validation.js
@@ -103,6 +103,21 @@ const isValidBrowserList = (key, browsers) => {
return true
}
+const isValidRetriesConfig = (key, value) => {
+ const isNullOrNumber = isOneOf([_.isNumber, _.isNull])
+
+ if (
+ isNullOrNumber(value)
+ || (_.isEqual(_.keys(value), ['runMode', 'openMode']))
+ && isNullOrNumber(value.runMode)
+ && isNullOrNumber(value.openMode)
+ ) {
+ return true
+ }
+
+ return errMsg(key, value, 'a number or null or an object with keys "openMode" and "runMode" with values of numbers or nulls')
+}
+
const isValidFirefoxGcInterval = (key, value) => {
const isIntervalValue = (val) => {
if (isNumber(val)) {
@@ -122,6 +137,24 @@ const isValidFirefoxGcInterval = (key, value) => {
return errMsg(key, value, 'a positive number or null or an object with "openMode" and "runMode" as keys and positive numbers or nulls as values')
}
+const isOneOf = (...values) => {
+ return (key, value) => {
+ if (values.some((v) => {
+ if (typeof value === 'function') {
+ return value(v)
+ }
+
+ return v === value
+ })) {
+ return true
+ }
+
+ const strings = values.map(str).join(', ')
+
+ return errMsg(key, value, `one of these values: ${strings}`)
+ }
+}
+
module.exports = {
isValidBrowser,
@@ -129,6 +162,8 @@ module.exports = {
isValidFirefoxGcInterval,
+ isValidRetriesConfig,
+
isNumber (key, value) {
if (value == null || isNumber(value)) {
return true
@@ -214,17 +249,5 @@ module.exports = {
validate("example", "else") // error message string
```
*/
- isOneOf (...values) {
- return (key, value) => {
- if (values.some((v) => {
- return v === value
- })) {
- return true
- }
-
- const strings = values.map(str).join(', ')
-
- return errMsg(key, value, `one of these values: ${strings}`)
- }
- },
+ isOneOf,
}
diff --git a/packages/server/package.json b/packages/server/package.json
index dd1141e14a65..2b23e600ea82 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -124,7 +124,7 @@
"@babel/core": "7.9.0",
"@babel/preset-env": "7.9.0",
"@cypress/debugging-proxy": "2.0.1",
- "@cypress/json-schemas": "5.34.2",
+ "@cypress/json-schemas": "5.35.0",
"@cypress/sinon-chai": "1.1.0",
"@packages/desktop-gui": "*",
"@packages/electron": "*",
diff --git a/packages/server/test/e2e/1_caught_uncaught_hook_errors_spec.js b/packages/server/test/e2e/1_caught_uncaught_hook_errors_spec.js
index c629420088c6..f292ed4678fc 100644
--- a/packages/server/test/e2e/1_caught_uncaught_hook_errors_spec.js
+++ b/packages/server/test/e2e/1_caught_uncaught_hook_errors_spec.js
@@ -8,35 +8,27 @@ describe('e2e caught and uncaught hooks errors', () => {
},
})
- it('failing1', function () {
- return e2e.exec(this, {
- spec: 'hook_caught_error_failing_spec.coffee',
- snapshot: true,
- expectedExitCode: 3,
- })
+ e2e.it('failing1', {
+ spec: 'hook_caught_error_failing_spec.coffee',
+ snapshot: true,
+ expectedExitCode: 3,
})
- it('failing2', function () {
- return e2e.exec(this, {
- spec: 'hook_uncaught_error_failing_spec.coffee',
- snapshot: true,
- expectedExitCode: 1,
- })
+ e2e.it('failing2', {
+ spec: 'hook_uncaught_error_failing_spec.coffee',
+ snapshot: true,
+ expectedExitCode: 1,
})
- it('failing3', function () {
- return e2e.exec(this, {
- spec: 'hook_uncaught_root_error_failing_spec.coffee',
- snapshot: true,
- expectedExitCode: 1,
- })
+ e2e.it('failing3', {
+ spec: 'hook_uncaught_root_error_failing_spec.coffee',
+ snapshot: true,
+ expectedExitCode: 1,
})
- it('failing4', function () {
- return e2e.exec(this, {
- spec: 'hook_uncaught_error_events_failing_spec.coffee',
- snapshot: true,
- expectedExitCode: 1,
- })
+ e2e.it('failing4', {
+ spec: 'hook_uncaught_error_events_failing_spec.coffee',
+ snapshot: true,
+ expectedExitCode: 1,
})
})
diff --git a/packages/server/test/e2e/3_plugins_spec.js b/packages/server/test/e2e/3_plugins_spec.js
index c218039ed88c..c7428f701533 100644
--- a/packages/server/test/e2e/3_plugins_spec.js
+++ b/packages/server/test/e2e/3_plugins_spec.js
@@ -150,6 +150,15 @@ describe('e2e plugins', function () {
})
})
+ // https://github.com/cypress-io/cypress/issues/8079
+ it('does not report more screenshots than exist if user overwrites previous screenshot in afterScreenshot', function () {
+ return e2e.exec(this, {
+ spec: 'after_screenshot_overwrite_spec.coffee',
+ project: pluginAfterScreenshot,
+ snapshot: true,
+ })
+ })
+
it('fails when invalid event is registered', function () {
return e2e.exec(this, {
spec: 'app_spec.js',
diff --git a/packages/server/test/e2e/3_retries_spec.ts b/packages/server/test/e2e/3_retries_spec.ts
new file mode 100644
index 000000000000..1129093470a3
--- /dev/null
+++ b/packages/server/test/e2e/3_retries_spec.ts
@@ -0,0 +1,21 @@
+import e2e from '../support/helpers/e2e'
+import Fixtures from '../support/helpers/fixtures'
+
+const it = e2e.it
+
+describe('retries', () => {
+ e2e.setup()
+
+ it('supports retries', {
+ project: Fixtures.projectPath('retries-2'),
+ spec: 'fail-twice.js',
+ snapshot: true,
+ })
+
+ it('warns about retries plugin', {
+ project: Fixtures.projectPath('plugin-retries'),
+ spec: 'main.spec.js',
+ stubPackage: 'cypress-plugin-retries',
+ snapshot: true,
+ })
+})
diff --git a/packages/server/test/e2e/3_runnable_execution_spec.ts b/packages/server/test/e2e/3_runnable_execution_spec.ts
index 361475a13526..769d05ba9d4b 100644
--- a/packages/server/test/e2e/3_runnable_execution_spec.ts
+++ b/packages/server/test/e2e/3_runnable_execution_spec.ts
@@ -24,7 +24,7 @@ describe('e2e runnable execution', () => {
project: Fixtures.projectPath('hooks-after-rerun'),
spec: 'beforehook-and-test-navigation.js',
snapshot: true,
- expectedExitCode: 1,
+ expectedExitCode: 2,
})
e2e.it('runnables run correct number of times with navigation', {
diff --git a/packages/server/test/e2e/5_screenshots_spec.js b/packages/server/test/e2e/5_screenshots_spec.js
index 3862dd90ddba..7dafd8a1d2b1 100644
--- a/packages/server/test/e2e/5_screenshots_spec.js
+++ b/packages/server/test/e2e/5_screenshots_spec.js
@@ -63,7 +63,7 @@ describe('e2e screenshots', () => {
// the test title as the file name
e2e.it('passes', {
spec: 'screenshots_spec.js',
- expectedExitCode: 4,
+ expectedExitCode: 5,
snapshot: true,
timeout: 180000,
onStdout: e2e.normalizeWebpackErrors,
diff --git a/packages/server/test/e2e/5_spec_isolation_spec.js b/packages/server/test/e2e/5_spec_isolation_spec.js
index 9756d610294a..4eb22675fbb5 100644
--- a/packages/server/test/e2e/5_spec_isolation_spec.js
+++ b/packages/server/test/e2e/5_spec_isolation_spec.js
@@ -90,9 +90,12 @@ const expectRunsToHaveCorrectStats = (runs = []) => {
expectStartToBeBeforeEnd(run, 'stats.wallClockStartedAt', 'stats.wallClockEndedAt')
expectStartToBeBeforeEnd(run, 'reporterStats.start', 'reporterStats.end')
- // grab all the wallclock durations for all tests
+ // grab all the wallclock durations for all test (and retried attempts)
// because our duration should be at least this
- const wallClocks = _.sumBy(run.tests, 'wallClockDuration')
+
+ const attempts = _.flatMap(run.tests, (test) => test.attempts)
+
+ const wallClocks = _.sumBy(attempts, 'wallClockDuration')
// ensure each run's duration is around the sum
// of all tests wallclock duration
@@ -100,7 +103,7 @@ const expectRunsToHaveCorrectStats = (runs = []) => {
run,
'stats.wallClockDuration',
wallClocks,
- wallClocks + 200, // add 200ms to account for padding
+ wallClocks + 400, // add 400ms to account for padding
1234,
)
@@ -108,7 +111,7 @@ const expectRunsToHaveCorrectStats = (runs = []) => {
run,
'reporterStats.duration',
wallClocks,
- wallClocks + 200, // add 200ms to account for padding
+ wallClocks + 400, // add 400ms to account for padding
1234,
)
@@ -118,11 +121,17 @@ const expectRunsToHaveCorrectStats = (runs = []) => {
run.spec.absolute = e2e.normalizeStdout(run.spec.absolute)
+ _.each(run.tests, (test) => {
+ if (test.displayError) {
+ test.displayError = e2e.normalizeStdout(test.displayError)
+ }
+ })
+
// now make sure that each tests wallclock duration
// is around the sum of all of its timings
- run.tests.forEach((test) => {
+ attempts.forEach((attempt) => {
// cannot sum an object, must use array of values
- const timings = _.sumBy(_.values(test.timings), (val) => {
+ const timings = _.sumBy(_.values(attempt.timings), (val) => {
if (_.isArray(val)) {
// array for hooks
return _.sumBy(val, addFnAndAfterFn)
@@ -137,7 +146,7 @@ const expectRunsToHaveCorrectStats = (runs = []) => {
})
expectDurationWithin(
- test,
+ attempt,
'wallClockDuration',
timings,
timings + 80, // add 80ms to account for padding
@@ -145,21 +154,21 @@ const expectRunsToHaveCorrectStats = (runs = []) => {
)
// now reset all the test timings
- normalizeTestTimings(test, 'timings')
+ normalizeTestTimings(attempt, 'timings')
// normalize stack
- if (test.stack) {
- test.stack = e2e.normalizeStdout(test.stack)
+ if (attempt.error) {
+ attempt.error.stack = e2e.normalizeStdout(attempt.error.stack).trim()
}
- if (test.wallClockStartedAt) {
- const d = new Date(test.wallClockStartedAt)
+ if (attempt.wallClockStartedAt) {
+ const d = new Date(attempt.wallClockStartedAt)
- expect(d.toJSON()).to.eq(test.wallClockStartedAt)
- test.wallClockStartedAt = STATIC_DATE
+ expect(d.toJSON()).to.eq(attempt.wallClockStartedAt)
+ attempt.wallClockStartedAt = STATIC_DATE
- expect(test.videoTimestamp).to.be.a('number')
- test.videoTimestamp = 9999
+ expect(attempt.videoTimestamp).to.be.a('number')
+ attempt.videoTimestamp = 9999
}
})
@@ -252,4 +261,46 @@ describe('e2e spec_isolation', () => {
})
},
})
+
+ e2e.it('failing with retries enabled', {
+ spec: 'simple_failing_hook_spec.coffee',
+ outputPath,
+ snapshot: true,
+ expectedExitCode: 3,
+ config: {
+ retries: 1,
+ },
+ async onRun (execFn) {
+ await execFn()
+ const json = await fs.readJsonAsync(outputPath)
+
+ expect(json.config).to.be.an('object')
+ expect(json.config.projectName).to.eq('e2e')
+ expect(json.config.projectRoot).to.eq(e2ePath)
+ json.config = {}
+ expect(json.browserPath).to.be.a('string')
+ expect(json.browserName).to.be.a('string')
+ expect(json.browserVersion).to.be.a('string')
+ expect(json.osName).to.be.a('string')
+ expect(json.osVersion).to.be.a('string')
+ expect(json.cypressVersion).to.be.a('string')
+
+ _.extend(json, {
+ browserPath: 'path/to/browser',
+ browserName: 'FooBrowser',
+ browserVersion: '88',
+ osName: 'FooOS',
+ osVersion: '1234',
+ cypressVersion: '9.9.9',
+ })
+
+ expect(json.totalTests).to.eq(_.sum([json.totalFailed, json.totalPassed, json.totalPending, json.totalSkipped]))
+ expectStartToBeBeforeEnd(json, 'startedTestsAt', 'endedTestsAt')
+ expectDurationWithin(json, 'totalDuration', _.sumBy(json.runs, 'stats.wallClockDuration'), _.sumBy(json.runs, 'stats.wallClockDuration'), 5555)
+ expect(json.runs).to.have.length(1)
+ expectRunsToHaveCorrectStats(json.runs)
+
+ snapshot('failing with retries enabled', json)
+ },
+ })
})
diff --git a/packages/server/test/e2e/7_record_spec.js b/packages/server/test/e2e/7_record_spec.js
index 51bd2bdebd2f..3a98528e9015 100644
--- a/packages/server/test/e2e/7_record_spec.js
+++ b/packages/server/test/e2e/7_record_spec.js
@@ -192,7 +192,7 @@ const defaultRoutes = [
}, {
method: 'put',
url: '/instances/:id',
- req: 'putInstanceRequest@2.0.0',
+ req: 'putInstanceRequest@3.0.0',
resSchema: 'putInstanceResponse@2.0.0',
res: sendUploadUrls,
}, {
@@ -239,6 +239,7 @@ describe('e2e record', () => {
})
.get('stdout')
.then((stdout) => {
+ console.log(stdout)
expect(stdout).to.include('Run URL:')
expect(stdout).to.include(runUrl)
@@ -260,6 +261,7 @@ describe('e2e record', () => {
// grab the second set of 5
const secondInstanceSet = urls.slice(5, 10)
+ console.log(secondInstanceSet)
expect(secondInstanceSet).to.have.members([
`POST /runs/${runId}/instances`,
`PUT /instances/${instanceId}`,
@@ -338,7 +340,7 @@ describe('e2e record', () => {
expect(secondInstancePut.body.error).to.be.null
expect(secondInstancePut.body.tests).to.have.length(2)
- expect(secondInstancePut.body.hooks).to.have.length(2)
+ expect(secondInstancePut.body.hooks).to.have.length(1)
expect(secondInstancePut.body.screenshots).to.have.length(1)
expect(secondInstancePut.body.stats.tests).to.eq(2)
expect(secondInstancePut.body.stats.failures).to.eq(1)
@@ -362,7 +364,7 @@ describe('e2e record', () => {
expect(thirdInstancePut.body.error).to.be.null
expect(thirdInstancePut.body.tests).to.have.length(2)
- expect(thirdInstancePut.body.hooks).to.have.length(1)
+ expect(thirdInstancePut.body.hooks).to.have.length(0)
expect(thirdInstancePut.body.screenshots).to.have.length(1)
expect(thirdInstancePut.body.stats.tests).to.eq(2)
expect(thirdInstancePut.body.stats.passes).to.eq(1)
@@ -387,7 +389,7 @@ describe('e2e record', () => {
expect(fourthInstancePut.body.error).to.be.null
expect(fourthInstancePut.body.tests).to.have.length(1)
- expect(fourthInstancePut.body.hooks).to.have.length(1)
+ expect(fourthInstancePut.body.hooks).to.have.length(0)
expect(fourthInstancePut.body.screenshots).to.have.length(1)
expect(fourthInstancePut.body.stats.tests).to.eq(1)
expect(fourthInstancePut.body.stats.failures).to.eq(1)
@@ -869,7 +871,7 @@ describe('e2e record', () => {
routes[2] = {
method: 'put',
url: '/instances/:id',
- req: 'putInstanceRequest@2.0.0',
+ req: 'putInstanceRequest@3.0.0',
res (req, res) {
return res.sendStatus(500)
},
@@ -1169,7 +1171,7 @@ describe('e2e record', () => {
}, {
method: 'put',
url: '/instances/:id',
- req: 'putInstanceRequest@2.0.0',
+ req: 'putInstanceRequest@3.0.0',
res (req, res) {
return res.sendStatus(500)
},
@@ -1216,7 +1218,7 @@ describe('e2e record', () => {
}, {
method: 'put',
url: '/instances/:id',
- req: 'putInstanceRequest@2.0.0',
+ req: 'putInstanceRequest@3.0.0',
resSchema: 'putInstanceResponse@2.0.0',
res: sendUploadUrls,
}, {
@@ -1287,7 +1289,7 @@ describe('e2e record', () => {
}, {
method: 'put',
url: '/instances/:id',
- req: 'putInstanceRequest@2.0.0',
+ req: 'putInstanceRequest@3.0.0',
resSchema: 'putInstanceResponse@2.0.0',
res: sendUploadUrls,
}, {
diff --git a/packages/server/test/e2e/8_reporters_spec.js b/packages/server/test/e2e/8_reporters_spec.js
index c22481e8009c..f2349eb97cc9 100644
--- a/packages/server/test/e2e/8_reporters_spec.js
+++ b/packages/server/test/e2e/8_reporters_spec.js
@@ -117,7 +117,7 @@ describe('e2e reporters', () => {
.then((xml) => {
expect(xml).to.include('