No.
The first failing test is this:
7. At any time, pressing the clear button clears the input and output values, and returns the calculator to its initialized state; 0 should be shown in the element with the id of "display"
When I look, it appears to do it, but I have to ask:
<input type='text' class='col-12' id='display' placeholder={this.state.answer} />
Why is that an input
? Do you want people to directly input to the display?
In any case, looking at the repo I see that this is the test:
it(`At any time, pressing the clear button clears the input
and output values, and returns the calculator to its initialized state; 0
should be shown in the element with the id of "display"`, function () {
clickButtonsById([_5, _x, _1, _plus, _5, _plus, _9, _2, _eq, _AC]);
assert.strictEqual(
getInputValue(document.getElementById('display')),
'0',
'Element with with id="display" should show 0 '
);
});
According to the error message after those operations, it is expecting ā0ā there and it is getting an empty string. I donāt get that, but I do get an empty string when the app first starts up. I also notice that sometimes that value is a number and sometimes it is a string (usually not a good practice - though doesnāt seem to be the problem here).
But ultimately I donāt want to dig too deeply into this until you stop manipulating the DOM. I donāt know what is what - what React is seeing, what the virtual DOM is, what the actual DOM is, what the test are seeingā¦