Skip to content
Snippets Groups Projects
Unverified Commit 03b0c2ba authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3210329 by mherchel, Gauravmahlawat: Olivero: Invalid aria attribute on...

Issue #3210329 by mherchel, Gauravmahlawat: Olivero: Invalid aria attribute on sticky-header-toggle on fresh page load
parent 67e76624
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ module.exports = {
'Congratulations and welcome to the Drupal community!',
)
.assert.not.visible(buttonSelector)
.assert.attributeEquals(buttonSelector, 'aria-checked', 'false')
.getLocationInView('footer.site-footer', () => {
browser.assert.visible(buttonSelector);
browser.assert.not.visible('#site-header__inner');
......
......@@ -73,7 +73,7 @@
'Drupal.olivero.stickyHeaderState',
);
if (!stickyHeaderState) return null;
if (!stickyHeaderState) return false;
const item = JSON.parse(stickyHeaderState);
const now = new Date();
......@@ -82,7 +82,7 @@
if (now.getTime() > item.expiry) {
// If the item is expired, delete the item from storage and return null.
localStorage.removeItem('Drupal.olivero.stickyHeaderState');
return null;
return false;
}
return item.value;
}
......
......@@ -45,13 +45,13 @@
function getStickyHeaderStorage() {
var stickyHeaderState = localStorage.getItem('Drupal.olivero.stickyHeaderState');
if (!stickyHeaderState) return null;
if (!stickyHeaderState) return false;
var item = JSON.parse(stickyHeaderState);
var now = new Date();
if (now.getTime() > item.expiry) {
localStorage.removeItem('Drupal.olivero.stickyHeaderState');
return null;
return false;
}
return item.value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment