@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / e5839db
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 15:45 UTC

Stabilize Office C8 browser smoke auth isolation

davoodmehraban89 committed Oct 1, 2026 at 20:48 UTC e5839dbfc265174233fc0497683e2cb47d5f3759
1 file changed +5 -2
scripts/office-slice-c8.spec.js
+5 -2
@@ -1,8 +1,11 @@
1 const {test,expect}=require('@playwright/test');
2 +async function isolatePolicyEditor(page){
3 + await page.addStyleTag({content:'#auth-screen{display:none!important;pointer-events:none!important}'});
4 +}
5 test('Office C8 policy editor publishes a two-stage policy',async({page})=>{
6 await page.goto('http://127.0.0.1:4173/index.html',{waitUntil:'domcontentloaded'});
7 + await isolatePolicyEditor(page);
8 await page.evaluate(()=>{
5 - const auth=document.getElementById('auth-screen');if(auth)auth.style.display='none';
9 window.currentUser={organizationId:'11111111-1111-1111-1111-111111111111'};
10 window.hasFinoraCapability=(moduleKey,capability)=>moduleKey==='office_automation'&&capability==='configure';
11 window.__c8Calls=[];
@@ -44,8 +47,8 @@ test('Office C8 policy editor publishes a two-stage policy',async({page})=>{
47 });
48 test('Office C8 policy publish control is authority-safe',async({page})=>{
49 await page.goto('http://127.0.0.1:4173/index.html',{waitUntil:'domcontentloaded'});
50 + await isolatePolicyEditor(page);
51 await page.evaluate(()=>{
48 - const auth=document.getElementById('auth-screen');if(auth)auth.style.display='none';
52 window.currentUser={organizationId:'22222222-2222-2222-2222-222222222222'};
53 window.hasFinoraCapability=()=>false;
54 window.sb={rpc:async()=>({data:[],error:null})};