Sorting the List of Songs
You’ll learn how to sort the list of songs using query params in an Ember application in this lesson.
We'll cover the following
Writing a test for sorting
Now, we will implement this feature using a test-first approach. Let’s first create a separate file for testing the songs page because we only have one for bands:
ember g acceptance-test songs
Following TDD principles, let’s write a test that we expect to fail. We don’t have to include everything we hope to implement by the time we finish the feature in the test. We will move little by little and possibly learn a thing or two along the way.
So, let’s begin by making sure the songs are sorted alphabetically when first arriving at the page:
Get hands-on with 1200+ tech skills courses.