Uploaded June 2022 | Updated November 2026, 19 hours ago
In this video, you will learn how to write component tests with Cypress. Not only will you learn the basics of component testing with Cypress, but you will also learn some more advanced techniques like how to mock an API endpoint with the intercept command.
Docs: docs.cypress.io/guides/component-testing/writing-your-first-component-test
Repo: github.com/cypress-io/cypress-realworld-testing-course-app
Have questions? Join the official Cypress Discord: discord.gg/cMjUZg7
Timestamps
00:00 - Intro
00:23 - Subscribe Component
01:37 - Why you need to import CSS into Cypress
03:40 - How to import Tailwind CSS into Cypress
04:32 - Test: allows users to subscribe to our newsletter
05:44 - Why we are getting a 404 error
06:38 - Using the intercept command to fix our test
07:35 - Refactoring our tests with a custom Cypress command
08:30 - Test: does NOT allow already subscribed email addresses
09:22 - Wrap Up
In this video, you will learn how to write component tests with Cypress. Not only will you learn the basics of component testing with Cypress, but you will also learn some more advanced techniques like how to mock an API endpoint with the intercept command.
Docs: docs.cypress.io/guides/component-testing/writing-your-first-component-test
Repo: github.com/cypress-io/cypress-realworld-testing-course-app
Have questions? Join the official Cypress Discord: discord.gg/cMjUZg7
Timestamps
00:00 - Intro
00:23 - Subscribe Component
01:37 - Why you need to import CSS into Cypress
03:40 - How to import Tailwind CSS into Cypress
04:32 - Test: allows users to subscribe to our newsletter
05:44 - Why we are getting a 404 error
06:38 - Using the intercept command to fix our test
07:35 - Refactoring our tests with a custom Cypress command
08:30 - Test: does NOT allow already subscribed email addresses
09:22 - Wrap Up










