Adding Cucumber Tests
Up until now, you have seen two types of automated tests: Vitest unit tests and Playwright end-to-end tests. This chapter adds a third type of test: Cucumber (https://cucumber.io).
Just like Playwright, Cucumber has its own test runner, which is typically set up to drive your application in the same way as Playwright does. The difference is that Cucumber tests are not written in JavaScript code.
Cucumber tests are contained within feature files that contain tests formatted in a special syntax known as Gherkin. These tests, known as features and organized into scenarios, read like plain English. That has a couple of advantages.
First, they can be written and understood by the whole team, not just developers. That means you can extend test-first practices outside of the development team.
Second, the absence of code encourages you to write tests that focus on user behavior rather than the technical details of the software. That, in turn, encourages you...