woocommerce/plugins/woocommerce-blocks/tests/utils/compatibility-notice.js

17 lines
374 B
JavaScript

export async function preventCompatibilityNotice() {
await page.evaluate( () => {
window.localStorage.setItem(
'wc-blocks_dismissed_compatibility_notices',
'["checkout"]'
);
} );
}
export async function reactivateCompatibilityNotice() {
await page.evaluate( () => {
window.localStorage.removeItem(
'wc-blocks_dismissed_compatibility_notices'
);
} );
}