Quality Assurance - Functional Tests /w Headless Browser

I’m not sure why my code isn’t passing the tests.
Glitch code link