Start a scenario with the cookie consent already answered, so the banner does not show: it sets the cookie __hs_cookie_cat_pref for the site. Use it before the page is opened.
Examples
Given the cookie consent is accepted
And the cookie consent is declined
Given the cookie consent is accepted
And the cookie consent is declined
Given cookie consent is accepted
Pattern
Given(/^(?:the )?cookie consent is (accepted|declined)$/, …)
Part of @webship-js/hubspot-cms-steps (github.com/webship/hubspot-cms-steps), a step pack for Webship-js 2.0.x.