Calculator not passing tests but works when I try it

My calculator is not finished, but it should pass more tests than it does (doesn’t go past test 7). Working with it it clearly clears the fields and adds numbers properly. I don’t understand.
Compiled App:
GitHub Code:

You can view which tests are failing by clicking on number of tests passed(Red box in below image)


I know that, but why are they tests failing but it seems to work when I try it myself?

It seems FCC test suites need specific structure


<div class="Display">
     <div id="screen">
        <p id="display"></p>
<div class="display">...

I modified it according to FCC provided solution here

with structure

<div id="display">0</div>
<div class="keypad">....

It passed test no. 9

You should try copying FCC structure, maybe that’s the issue

1 Like

Thanks, It’s really weird and finicky on the calculator’s template. It works when I edit the HTML in the browser like you did, but somehow it won’t work when I correct it in the code. This is so frustrating.

I visited your compiled app once again, but haven’t found the changes

Note that, div with id display and the output div must be adjacent to div with class keypad