سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 23:15 UTC
QA: verify shell scrollbar ownership
davoodmehraban89 committed
Oct 2, 2026 at 11:57 UTC
d0c89b2fdb270c37268256ce344d4fddbe15b8c8
1 file changed
+19
scripts/shell-scrollbars.spec.js
new
+19
@@ -0,0 +1,19 @@
1
+const {test,expect}=require('@playwright/test');
2
+test('desktop shell keeps three independent right-edge vertical scroll owners',async({page})=>{
3
+ await page.setViewportSize({width:1536,height:864});
4
+ await page.goto('http://127.0.0.1:4173/index.html',{waitUntil:'domcontentloaded'});
5
+ const r=await page.evaluate(()=>{
6
+ const rail=document.getElementById('module-rail'),panel=document.getElementById('module-panel-links'),work=document.querySelector('.main-surface');
7
+ const cs=x=>getComputedStyle(x);
8
+ const railChild=rail.firstElementChild,panelChild=panel.firstElementChild,workChild=work.firstElementChild;
9
+ return {
10
+ bodyOverflowY:cs(document.body).overflowY,
11
+ rail:{overflowY:cs(rail).overflowY,direction:cs(rail).direction,childDirection:railChild?cs(railChild).direction:null},
12
+ panel:{overflowY:cs(panel).overflowY,direction:cs(panel).direction,childDirection:panelChild?cs(panelChild).direction:null},
13
+ work:{overflowY:cs(work).overflowY,direction:cs(work).direction,childDirection:workChild?cs(workChild).direction:null,height:cs(work).height}
14
+ };
15
+ });
16
+ expect(r.bodyOverflowY).toBe('hidden');
17
+ for(const x of [r.rail,r.panel,r.work]){expect(x.overflowY).toBe('auto');expect(x.direction).toBe('ltr');expect(x.childDirection).toBe('rtl')}
18
+ expect(parseFloat(r.work.height)).toBeGreaterThan(800);
19
+});