Testing Web Apps with Cypress

Input Testing Exercise

Steve Kinney

Steve Kinney

Temporal
Testing Web Apps with Cypress

Check out a free preview of the full Testing Web Apps with Cypress course

The "Input Testing Exercise" Lesson is part of the full, Testing Web Apps with Cypress course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to write tests for a variety of input elements including new elements like radio groups, color pickers, and file upload components.

Preview
Close

Transcript from the "Input Testing Exercise" Lesson

[00:00:00]
>> You get one that you don't have to do is kind of there as an extension that if we have time, we'll talk about or at least allude to but if we go in to the obstacle course. You can see that there are a whole bunch of input fails, you got your good old fashioned text input, you've got a select, you've got a bunch of checks boxes that then should render like a list.

[00:00:26]
You might wanna play around with it first and see, exactly what should come out the other end, you've got a radio button, you've got a color input, good luck typing into that. You've got a date input and careful viewers will notice that the localization, I'm currently in Minnesota USA, is American.

[00:00:48]
But the actual value that it stores Is so we've got that rating filter and you do not this'll technically set a string. So you could theoretically set it by with the value with invoke there's a plugin later that we can talk about for actually loading files. So this is technically becomes a string, so there's kind of the answer there as well.

[00:01:09]
But basically going through and getting the tests to basically show the value over here that they should, given for whatever you choose to do for the input fields themselves. The goal here is just kind of learn how do you control different input fields, and stuff along those lines but I kind of gave you most of the answers in the last section, so now it's just about applying it.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now