'Cucumber JS with Gherkin and mink tests break when I use scroll-behavior: smooth;

I have cucumber-mink tests that usually pass. But as soon as I add one line of css code, several tests break with error messages such as.

Error: Node is either not visible or not an HTMLElement

This is the code.

html {
  scroll-behavior: smooth;
}

After I remove it, everything passes again. I have tried page.waitForNavigation() and I am having issues trying to get a screenshot when it fails.

I am not sure how smooth scroll could break testing. But I guess something is throwing off cucumber's ability to find elements on the page.

I have not been able to find ANY other example of anyone facing this issue.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source