mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
Default the cookie banner to be hidden
It should only be shown if JS is available and the cookieMessage JS finds consent has not been set.
This commit is contained in:
@@ -21,6 +21,13 @@ describe("Cookie message", () => {
|
||||
|
||||
beforeAll(() => {
|
||||
|
||||
const cookieMessageStyles = document.createElement('style');
|
||||
|
||||
// add the CSS that hides the cookie message by default
|
||||
cookieMessageStyles.textContent = '.notify-cookie-banner { display: none; }';
|
||||
document.getElementsByTagName('head')[0].appendChild(cookieMessageStyles);
|
||||
|
||||
// protect against any previous tests setting a cookies-policy cookie
|
||||
helpers.deleteCookie('cookies-policy');
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user