TDD Example: Add data- Attribute @gleb
TDD Example: Add data- Attribute  @gleb
Uploaded January 2025 | Updated September 2026, 1 week ago
This video shows how I practice test-driven development using end-to-end Cypress tests while modifying the application. We need to add "data-todo-id" attribute with the item's unique id. Before modifying the HTML / Vue markup I update the test to check for that attribute. The test fails, since the attribute does not exist yet. To make the test pass, I update the application. Once the test is green again, the feature is done. Find the source code in the repo github.com/bahmutov/todomvc-callback-example and my entire course about TDD with Cypress at https://cypress.tips/courses
TDD Example: Add data- AttributeWhen It ReloadsCheck Every Box In Cypress Tests Without FlakeSee All Chrome Browser Command Line Flags Cypress Uses To Launch The BrowserAdd Random Todo Examplecypress-magic-backend And Your Test Network InterceptsCypress Grep UI Plugins With Dennis BergevinGitHub Copilot Vs Cursor AI: Change Comments Into Commands ExampleGitHub Copilot Agent ModeRetry Network RequestsText VariantsLesson n2: Table Pagination Solution
gleb bahmutov |

TDD Example: Add data- Attribute

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER