Files
Investidor-V2/tools/portal-functional-lease-visible-qa.cjs
T
nala 287e991486
tests / ci (push) Waiting to run
oportunidades 7
2026-10-13 11:40:29 +02:00

8 lines
1.3 KiB
JavaScript

// Read-only final presentation: do not repeat the already completed workflow.
const{start,assert,sanitized}=require('./portal-functional-qa-lib.cjs');
void(async()=>{const q=await start('functional-lease-visible-chromium-20261011');let ctx,page;try{
({ctx,page}=await q.context('promoter'));await q.login(page,'promoter');const r=await q.open(page,'/minhas-oportunidades/54/view');assert.equal(r.status(),200);
const rent=page.locator('[id="canonical.real_estate.rent"]'),period=page.locator('[id="canonical.real_estate.rent_periodicity"]');await rent.waitFor();assert.equal(await rent.inputValue(),'4500');assert.equal(await period.inputValue(),'monthly');await rent.scrollIntoViewIfNeeded();assert(await rent.isVisible());assert(await period.isVisible());await q.shot(page,'lease-published-rent-visible',false);
q.proof.checks={published_values_visible:true,read_only:true};q.proof.rent=4500;q.proof.periodicity='monthly';q.proof.result='passed';q.save();console.log(JSON.stringify({result:'passed',rent:4500,periodicity:'monthly',mutation_requests_excluding_login:0,active_writes:0}));
}catch(e){q.proof.result='failed';q.proof.failure=sanitized(e);q.save();console.log(JSON.stringify({result:'failed',failure:q.proof.failure}));process.exitCode=1;}finally{if(ctx)await ctx.close();await q.browser.close();}})();