Testing While Developing (Part 2): Selectors, Assertions, and User Events
dev.to·19h·
Discuss: DEV
Flag this post

In the previous post, we set up our basic testing configuration and used the visit command to load our app. Now, we’re ready to make our tests a little more meaningful.

In this part, we’ll focus on three key features:

  • Selectors – how we find elements in our UI
  • Assertions – how we verify what’s on screen
  • User events – how we simulate real interactions

Let’s dive in.

Before You Start

If you’re following along from Part 1, you can continue as is. But if you want to reset your repo or make sure you’re on the correct branch:

# Repo git clone git@github.com:BRIKEV/twd-docs-tutorial.git
git reset --hard
git clean -d -f
git checkout 02-assertions
npm run serve:dev


S…

Similar Posts

Loading similar posts...