Speaker: In the last section,
we started writing out some comments to guide ourselves
through this integration test we're working on.
In this section, we're gonna continue
by putting together some implementation for this first step.
So we want to try to render out our entire application.
We can do that by rendering an instance
of our root component and passing at the app.
The app component contains all the other components
inside of our application.
So by rendering these two things together,
it's going to essentially display our entire application.
So underneath that first comment,
we'll write out 'const wrapped' is 'mount with root',
and we'll pass that thing our app like so.
You'll notice that we're not passing any initial state
to the root component.
That's because there is no initial state
that we want to provide to our Redux store.
The entire purpose of this test
is to confirm that our application can reach out
to that JSON API and fetch a list of comments by itself.
So I'm gonna save this file
and I'm gonna flip back over to my terminal
and just make sure that all my tests are still passing.
So if I flip back over
you might notice that you have one failing test.
So let's see what it is.
So it looks like the failure
is coming from our comment box component.
You'll recall that inside there
we put together a test
to make sure that we have exactly one text area
and one button.
But, just a moment ago
we added a second button tag to the comment box.
That button has purpose of fetching our list of comments.
So, that's why we're seeing the failure here.
We expected to see only one button tag,
but in fact there were two.
So let's very quickly go and fix that up.
I'm gonna open up my test, 'commentbox.test.js' file,
and I'll find the hazard text area and a button test.
So now, rather than finding one button,
I'm going to expect to find two.
And then I will also update
the description of this file as well.
So, we have a text area and two buttons.
Okay, so that should probably be it.
Let's flip back over to our terminal
and just make sure that our tests are still passing.
Alright, so back over here
I'll wait just a second for the test to go.
And you can see
that our comment box test file has passed successfully.
Alright, let's take a quick pause right here.
When we come back to the next section,
we're going to continue working
on our integration test over here.
So, quick break and I'll see you in just a minute.