+[{"event_type":"HookRunStarted","hook_run":{"framework":"Cypress","uuid":"e7c2eb8a-7469-4254-8084-d29961defdf1","name":"example to-do app \"after each\" hook","body":{"lang":"javascript","code":"() => {\n const attributes = Cypress.mocha.getRunner().suite.ctx.currentTest;\n cy.window().then(async win => {\n let shouldScanTestForAccessibility = shouldScanForAccessibility(attributes);\n if (!shouldScanTestForAccessibility) return cy.wrap({});\n cy.wrap(performScan(win), {\n timeout: 30000\n }).then(() => {\n try {\n let os_data;\n if (Cypress.env(\"OS\")) {\n os_data = Cypress.env(\"OS\");\n } else {\n os_data = Cypress.platform === 'linux' ? 'mac' : \"win\";\n }\n let filePath = '';\n if (attributes.invocationDetails !== undefined && attributes.invocationDetails.relativeFile !== undefined) {\n filePath = attributes.invocationDetails.relativeFile;\n }\n const payloadToSend = {\n \"saveResults\": shouldScanTestForAccessibility,\n \"testDetails\": {\n \"name\": attributes.title,\n \"testRunId\": '5058',\n // variable not consumed, shouldn't matter what we send\n \"filePath\": filePath,\n \"scopeList\": [filePath, attributes.title]\n },\n \"platform\": {\n \"os_name\": os_data,\n \"os_version\": Cypress.env(\"OS_VERSION\"),\n \"browser_name\": Cypress.browser.name,\n \"browser_version\": Cypress.browser.version\n }\n };\n browserStackLog(`Saving accessibility test results`);\n cy.wrap(saveTestResults(win, payloadToSend), {\n timeout: 30000\n }).then(() => {\n browserStackLog(`Saved accessibility test results`);\n });\n } catch (er) {}\n });\n });\n}"},"scope":"example to-do app","scopes":["example to-do app"],"identifier":"example to-do app \"after each\" hook","file_name":"cypress/e2e/1-getting-started/todo.cy.js","vc_filepath":"cypress/e2e/1-getting-started/todo.cy.js","location":"cypress/e2e/1-getting-started/todo.cy.js","result":"pending","duration_in_ms":null,"started_at":"2024-07-20T17:13:44.248Z","finished_at":null,"failure":[],"failure_type":null,"retry_of":null,"meta":{"steps":[]},"hook_type":"AFTER_EACH","test_run_id":"a2993bc7-9e6f-4cd4-8226-629ca7cd8489"}},{"event_type":"HookRunFinished","hook_run":{"framework":"Cypress","uuid":"e7c2eb8a-7469-4254-8084-d29961defdf1","name":"example to-do app \"after each\" hook","body":{"lang":"javascript","code":"() => {\n const attributes = Cypress.mocha.getRunner().suite.ctx.currentTest;\n cy.window().then(async win => {\n let shouldScanTestForAccessibility = shouldScanForAccessibility(attributes);\n if (!shouldScanTestForAccessibility) return cy.wrap({});\n cy.wrap(performScan(win), {\n timeout: 30000\n }).then(() => {\n try {\n let os_data;\n if (Cypress.env(\"OS\")) {\n os_data = Cypress.env(\"OS\");\n } else {\n os_data = Cypress.platform === 'linux' ? 'mac' : \"win\";\n }\n let filePath = '';\n if (attributes.invocationDetails !== undefined && attributes.invocationDetails.relativeFile !== undefined) {\n filePath = attributes.invocationDetails.relativeFile;\n }\n const payloadToSend = {\n \"saveResults\": shouldScanTestForAccessibility,\n \"testDetails\": {\n \"name\": attributes.title,\n \"testRunId\": '5058',\n // variable not consumed, shouldn't matter what we send\n \"filePath\": filePath,\n \"scopeList\": [filePath, attributes.title]\n },\n \"platform\": {\n \"os_name\": os_data,\n \"os_version\": Cypress.env(\"OS_VERSION\"),\n \"browser_name\": Cypress.browser.name,\n \"browser_version\": Cypress.browser.version\n }\n };\n browserStackLog(`Saving accessibility test results`);\n cy.wrap(saveTestResults(win, payloadToSend), {\n timeout: 30000\n }).then(() => {\n browserStackLog(`Saved accessibility test results`);\n });\n } catch (er) {}\n });\n });\n}"},"scope":"example to-do app","scopes":["example to-do app"],"identifier":"example to-do app \"after each\" hook","file_name":"cypress/e2e/1-getting-started/todo.cy.js","vc_filepath":"cypress/e2e/1-getting-started/todo.cy.js","location":"cypress/e2e/1-getting-started/todo.cy.js","result":"passed","duration_in_ms":11,"finished_at":"2024-07-20T17:13:44.267Z","failure":[],"failure_type":null,"retry_of":null,"meta":{"steps":[]},"hook_type":"AFTER_EACH","test_run_id":"a2993bc7-9e6f-4cd4-8226-629ca7cd8489"}},{"event_type":"LogCreated","logs":[]},{"event_type":"TestRunFinished","test_run":{"framework":"Cypress","uuid":"a2993bc7-9e6f-4cd4-8226-629ca7cd8489","name":"displays two todo items by default","body":{"lang":"javascript","code":"() => {\n // We use the `cy.get()` command to get all elements that match the selector.\n // Then, we use `should` to assert that there are two matched items,\n // which are the two default items.\n // cy.wrap(new Promise((resolve) => {\n // setTimeout(async () => {\n // await customLog('This is the log 2 from settimeout');\n // resolve();\n // }, 10000);\n // }), {timeout: 20000})\n cy.get('.todo-list li').should('have.length', 2);\n\n // We can go even further and check that the default todos each contain\n // the correct text. We use the `first` and `last` functions\n // to get just the first and last matched elements individually,\n // and then perform an assertion with `should`.\n cy.get('.todo-list li').first().should('have.text', 'Pay electric bill');\n cy.get('.todo-list li').last().should('have.text', 'Walk the dog');\n cy.wait(3000);\n\n // cy.getAccessibilityResults().then(res => {\n // cy.task('log', res);\n // })\n }"},"scope":"example to-do app","scopes":["example to-do app"],"identifier":"example to-do app displays two todo items by default","file_name":"cypress/e2e/1-getting-started/todo.cy.js","vc_filepath":"cypress/e2e/1-getting-started/todo.cy.js","location":"cypress/e2e/1-getting-started/todo.cy.js","result":"passed","duration_in_ms":4344,"started_at":"2024-07-20T17:13:37.873Z","finished_at":"2024-07-20T17:13:44.277Z","failure":[],"failure_type":null,"retry_of":null,"meta":{"steps":[]},"hooks":[]}},{"event_type":"LogCreated","logs":[]},{"event_type":"HookRunFinished","hook_run":{"framework":"Cypress","uuid":"2b9ca0bd-9484-4313-b556-fb9d2c773df3","name":"example to-do app \"before each\" hook","body":{"lang":"javascript","code":"() => {\n // Cypress starts out with a blank slate for each test\n // so we must tell it to visit our website with the `cy.visit()` command.\n // Since we want to visit the same URL at the start of all our tests,\n // we include it in our beforeEach function so that it runs before each test\n // await customLog(\"hello world beforeeach\")\n cy.visit('https://example.cypress.io/todo');\n }"},"scope":"example to-do app","scopes":["example to-do app"],"identifier":"example to-do app \"before each\" hook","file_name":"cypress/e2e/1-getting-started/todo.cy.js","vc_filepath":"cypress/e2e/1-getting-started/todo.cy.js","location":"cypress/e2e/1-getting-started/todo.cy.js","result":"passed","duration_in_ms":0,"started_at":"2024-07-20T17:13:37.887Z","finished_at":"2024-07-20T17:13:37.887Z","failure":[],"failure_type":null,"retry_of":null,"meta":{"steps":[]},"hook_type":"BEFORE_EACH","test_run_id":"a2993bc7-9e6f-4cd4-8226-629ca7cd8489"}},{"event_type":"LogCreated","logs":[]}]
0 commit comments