Drum Machine Project: I do not understand why the tests are failing

Hi,

I was able to complete the projects about the Random Quote Machine and the Javascript Calculator. However, I am having problems with the Drum Machine project on the Front-End track.

You can check out my code here: https://codepen.io/pdelfino/pen/abmgXyo

I know that the code is ugly and the interface has not a pleasant aesthetics. In addition, I am aware that I did not solve the part involving the keyDown commands yet.

However, I cannot understand why most of the tests are failing.

For instance:

1 - Why is the last test about the display failing?

As you can see in codepen, clicks will change the result being displayed which has a proper id HTML tag.

2 - Why are tests 3 and 4 failing?

Thank you for your attention

Test 3 is failing because the class you have on the buttons is drump-pad and it needs to be drum-pad. Also, you have the same id for all of the buttons which is invalid HTML.

Test 4 is failing because you aren’t using the src attribute on the audio element to set the source of the audio file.

Again, id’s must be unique. You can’t have the same id for both the h1 and its parent div.

Be sure to read the error messages for the failing tests very carefully. They pretty much tell you exactly what is wrong.

1 Like

Check your class names

You have the class drump-pad it should be drum-pad.

1 Like