Load the missing promo module, add a prominent creation button and place Promos beside Overview. Use existing AAL2-guarded server RPCs with selected plan, subscription duration and code validity; preserve form input, honest clipboard feedback and scope async responses. Full PR QA succeeded in run 35547013076. No live data, SQL, MFA or unfinished training branch changes. Preserve normal main QA and exact-asset/browser publication verification.
22 lines
1.3 KiB
JavaScript
22 lines
1.3 KiB
JavaScript
import fs from 'node:fs/promises';
|
|
import {chromium} from '@playwright/test';
|
|
import {bootPromoFixture,exercisePromoCreation} from './promo-entry-fixture.mjs';
|
|
const base=new URL(process.env.TIMEWEB_BASE_URL||'https://app.caterium.ru');
|
|
if(base.protocol!=='https:')throw new Error('HTTPS required');
|
|
const output='production-ui-results';await fs.mkdir(output,{recursive:true});
|
|
const browser=await chromium.launch(),results=[];
|
|
try{
|
|
for(const width of [390,1440]){
|
|
const context=await browser.newContext({viewport:{width,height:900},serviceWorkers:'block'});
|
|
try{
|
|
const page=await context.newPage();await bootPromoFixture(page,base.href);
|
|
await page.screenshot({path:`${output}/promo-entry-${width}.png`,animations:'disabled'});
|
|
await exercisePromoCreation(page);
|
|
await page.locator('#ctmPromoPanel').screenshot({path:`${output}/promo-form-${width}.png`,animations:'disabled'});
|
|
results.push({width,loadedFromApp:true,headerEntry:true,threePlans:true,syntheticCreation:true});
|
|
console.log(`PASS published promo UI ${width}px: real loader, visible entry, three plans, selected duration, synthetic creation`);
|
|
}finally{await context.close();}
|
|
}
|
|
await fs.writeFile(`${output}/promo-entry.json`,JSON.stringify({backend:'synthetic and network-blocked; no real codes created',results},null,2));
|
|
}finally{await browser.close();}
|