You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ff816c3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: electron/sidebar-smoke.mjs
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,15 @@ export async function verifySidebar(window,recents){
83
83
assert.equal(awaitrun(`(()=>{const s=document.querySelector('.sidebar'),f=s.querySelector('.sidebar-navigation-switch');return f.getBoundingClientRect().width+parseFloat(getComputedStyle(f).marginLeft)+parseFloat(getComputedStyle(f).marginRight)<=${expanded+21};})()`),true,'tab switch fits the sidebar during expansion');
constmotion=awaitrun(`(async()=>{const app=document.querySelector('.app'),sidebar=document.querySelector('.sidebar');const padding=()=>parseFloat(getComputedStyle(sidebar).paddingTop);const start=padding();app.classList.add('immersive-header-hidden');await new Promise(r=>setTimeout(r,70));const middle=padding();await new Promise(r=>setTimeout(r,160));const hidden=padding();app.classList.remove('immersive-header-hidden');await new Promise(r=>setTimeout(r,70));const returning=padding();await new Promise(r=>setTimeout(r,160));return {start,middle,hidden,returning,end:padding()};})()`);
90
+
assert.ok(motion.start>0&&motion.middle>0&&motion.middle<motion.start,'sidebar tab '+tab+' animates while hiding header');
91
+
assert.equal(motion.hidden,0);
92
+
assert.ok(motion.returning>0&&motion.returning<motion.start,'sidebar tab '+tab+' animates while showing header');
0 commit comments