{"id":15552414,"url":"https://github.com/bahmutov/cypress-slow-down","last_synced_at":"2025-09-26T12:30:49.976Z","repository":{"id":50362182,"uuid":"518218478","full_name":"bahmutov/cypress-slow-down","owner":"bahmutov","description":"Slow down your Cypress tests","archived":false,"fork":false,"pushed_at":"2024-12-17T22:08:25.000Z","size":763,"stargazers_count":46,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T20:11:43.720Z","etag":null,"topics":["cypress-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bahmutov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-26T21:12:15.000Z","updated_at":"2024-08-22T18:33:22.000Z","dependencies_parsed_at":"2023-10-12T13:35:53.834Z","dependency_job_id":"82e7fccb-035d-4a23-be2c-bd683321bcea","html_url":"https://github.com/bahmutov/cypress-slow-down","commit_stats":{"total_commits":38,"total_committers":6,"mean_commits":6.333333333333333,"dds":0.5789473684210527,"last_synced_commit":"e8828e7216bdc47cc18e7a160fa94fa6db4d8d83"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-slow-down","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-slow-down/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-slow-down/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-slow-down/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmutov","download_url":"https://codeload.github.com/bahmutov/cypress-slow-down/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234309705,"owners_count":18811946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress-plugin"],"created_at":"2024-10-02T14:19:06.100Z","updated_at":"2025-09-26T12:30:49.599Z","avatar_url":"https://github.com/bahmutov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cypress-slow-down ![cypress version](https://img.shields.io/badge/cypress-12.17.4-brightgreen) [![ci](https://github.com/bahmutov/cypress-slow-down/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/cypress-slow-down/actions/workflows/ci.yml) [![cypress-slow-down](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/q3727b\u0026style=flat\u0026logo=cypress)](https://dashboard.cypress.io/projects/q3727b/runs)\n\n\u003e Slow down your Cypress tests\n\nWatch the introduction to this plugin in the video [Slow Down Cypress Tests](https://youtu.be/lxx-_nAkQo8). For advanced usage, see the lessons in my [Cypress Plugins course](https://cypress.tips/courses/cypress-plugins).\n\n![One command per second](./images/slow.gif)\n\n## Install\n\nAdd this NPM package to your project\n\n```text\n# install using NPM\n$ npm i -D cypress-slow-down\n# or install using Yarn\n$ yarn add -D cypress-slow-down\n```\n\nInclude the plugin and call its function from your spec or support file\n\n```js\n// cypress/e2e/spec.cy.js\n// https://github.com/bahmutov/cypress-slow-down\nimport { slowCypressDown } from 'cypress-slow-down'\n// slow down each command by the default amount\n// which is 1 second\nslowCypressDown()\n```\n\n## Options\n\nYou can control the delay before each command (in milliseconds)\n\n```js\n// when calling the slowCypressDown function\nslowCypressDown(1000)\n```\n\nYou can also control the delay using the [Cypress environment variable](https://on.cypress.io/environment-variables) `commandDelay`.\n\n```js\n// cypress.config.js\nconst { defineConfig } = require('cypress')\n\nmodule.exports = defineConfig({\n  e2e: {\n    env: {\n      // https://github.com/bahmutov/cypress-slow-down\n      commandDelay: 500,\n    },\n  },\n})\n// cypress/e2e/spec.cy.js\nimport { slowCypressDown } from 'cypress-slow-down'\nslowCypressDown() // slows down each command by 500ms\n```\n\nYou can set the optional `logToConsole` parameter to false to prevent the plugin from logging each delay to the console.\n\n```js\nslowCypressDown(1000, false)\n```\n\n## Disable the slow down\n\nYou can disable the default slowdown by using `false`. For example, from the command line you can pass the boolean value:\n\n```\n$ npx cypress run --env commandDelay=false\n```\n\nOr you can use the [process (OS) environment variable](https://en.wikipedia.org/wiki/Environment_variable)\n\n```\n$ CYPRESS_commandDelay=false npx cypress run\n```\n\nOr you can use the `cypress.config.js` to disable the slowdown\n\n```js\n// cypress.config.js\nconst { defineConfig } = require('cypress')\n\nmodule.exports = defineConfig({\n  e2e: {\n    env: {\n      // https://github.com/bahmutov/cypress-slow-down\n      commandDelay: false,\n    },\n  },\n})\n```\n\n## Change the command delay from DevTools\n\nBecause this plugin uses [cypress-plugin-config](https://github.com/bahmutov/cypress-plugin-config) to read the command delay option, you can change its value or disable the plugin completely from the DevTools console using the command `Cypress.setPluginConfigValue('commandDelay', \u003cvalue\u003e)`\n\n![Change the command delay from the DevTools](./images/set-delay.png)\n\nThe re-run the tests by pressing the key \"R\" or clicking \"Run All Tests\" button.\n\n## Child commands\n\nYou can slow down a part of your test by using the custom dual commands `cy.slowDown(ms)` and `cy.slowDownEnd()`.\n\n```js\n// your spec file\n// cypress/e2e/spec.cy.js\n// https://github.com/bahmutov/cypress-slow-down\nimport { slowCypressDown } from 'cypress-slow-down'\n// registers the cy.slowDown and cy.slowDownEnd commands\nimport 'cypress-slow-down/commands'\n// must enable the plugin using slowCypressDown\n// can disable the slow down by default or use some default delay\nslowCypressDown(false)\n\nit('runs the middle part slowly', () =\u003e {\n  cy.visit('/')\n  cy.get('...').should('...').slowDown(1000)\n  // these commands have 1 second delay\n  ...\n  cy.slowDownEnd()\n  // back to the normal speed\n})\n```\n\n**Tip:** to see how the commands are slowed down you can use the [cypress-timestamps](https://github.com/bahmutov/cypress-timestamps) plugin.\n\n## Small print\n\nAuthor: Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt; \u0026copy; 2022\n\n- [@bahmutov](https://twitter.com/bahmutov)\n- [glebbahmutov.com](https://glebbahmutov.com)\n- [blog](https://glebbahmutov.com/blog)\n- [videos](https://www.youtube.com/glebbahmutov)\n- [presentations](https://slides.com/bahmutov)\n- [cypress.tips](https://cypress.tips)\n- [Cypress Tips \u0026 Tricks Newsletter](https://cypresstips.substack.com/)\n- [my Cypress courses](https://cypress.tips/courses)\n\nLicense: MIT - do anything with the code, but don't blame me if it does not work.\n\nSupport: if you find any problems with this module, email / tweet /\n[open issue](https://github.com/bahmutov/cypress-slow-down/issues) on Github\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-slow-down","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmutov%2Fcypress-slow-down","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-slow-down/lists"}