Ready to get started?

Join Adocasts Plus for $8/mo, or sign into an existing Adocasts Plus account, to get access to all of our lessons.

robot mascot smiling

Pragmatic Testing in AdonisJS with Japa #7.0

The Browser Client

In This Lesson

We'll softly introduce Browser Testing, which allows powerful DOM assertions, in AdonisJS using Japa's Browser Client and Playwright. We'll get everything installed and configured and write our first simple test.

Created by
@tomgobich
Published

Notes Used to Craft this Lesson

Unlike the API Client, where we are making API requests similar to Axios and asserting against the responses, the Browser Client allows us to run tests with an actual browser. This gives us powerful assertion abilities against the actual HTML document that is rendered. So, for example, we'd be able to assert that a specific input is disabled using a query selector.

There is a ton of depth with this plugin; it could be a series on its own. Our focus here is just going to be a soft introduction to it. Needless to say, since we'll be testing with actual browsers here, these are going to be the slowest of our tests.

Join the Discussion 0 comments

Create a free account to join in on the discussion
robot comment bubble

Be the first to comment!