051c9d9a94
Same gap as land parcels: business assets were routed into the generic trust fields (trustee/successor/beneficiaries), which don't fit — a business needs a continuity instrument, not a trustee holding title. New "business-continuity" channel in Nomination Registry, modelled on the digital-waqif docs repo's own business-succession framework (Clause 9): - Structure selector (sole proprietorship / partnership / company). Sole proprietorship surfaces an explicit warning: it legally dies with the owner, so the only fast-path options are converting to a company or dedicating as a waqf-owned enterprise. - Instrument selector: partnership continuation clause, shareholder buy-sell agreement (the standard fast-path for company shares, often Takaful-funded), or a direct redirect to Family Waqf Designator for a waqf-owned enterprise (nothing duplicated here — reuses that module). - Dedicated business-continuity-draft.txt export, same treatment as the trust deed and waqfiyya exports. - Death Trigger packet text updated with the business-specific execution action (execute buy-sell / continuation clause, file Takaful claim if funded — a private agreement between owners, not a probate filing). e2e-business.cjs: new suite covering exposed->warning->instrument selection->export->100% coverage->execution packet, plus the waqf-enterprise redirect disabling the Add button. 10/10 passing. Re-verified e2e-uat.cjs (32/32), e2e-fastpath.cjs (16/16), and e2e-trust.cjs (12/12) — 70/70 total, no regressions.
35 lines
1.6 KiB
JavaScript
35 lines
1.6 KiB
JavaScript
const { chromium } = require('playwright');
|
|
const BASE = 'https://moslem04.falahos.my/';
|
|
|
|
async function main() {
|
|
const browser = await chromium.launch();
|
|
const page = await browser.newPage({ viewport: { width: 390, height: 844 } });
|
|
await page.goto(BASE, { waitUntil: 'networkidle' });
|
|
const clickTab = async label => { await page.locator('nav button.tab', { hasText: label }).click(); await page.waitForTimeout(200); };
|
|
|
|
await clickTab('Assets');
|
|
await page.locator('.field:has-text("Description") input').fill('Bakery Sdn Bhd shares');
|
|
await page.locator('.field:has-text("Estimated value") input').fill('300000');
|
|
await page.locator('.form-card select').first().selectOption('Business interest');
|
|
await page.locator('button.btn-primary', { hasText: 'Add asset' }).click();
|
|
await page.waitForTimeout(200);
|
|
|
|
await clickTab('Coverage');
|
|
const rowText = await page.locator('.asset-row', { hasText: 'Bakery' }).textContent();
|
|
console.log('Coverage row for business asset:', rowText.trim());
|
|
|
|
await clickTab('Nominate');
|
|
const assetSelect = page.locator('select').first();
|
|
const val = await assetSelect.evaluate(el => Array.from(el.options).find(o => o.textContent.includes('Bakery'))?.value);
|
|
await assetSelect.selectOption(val);
|
|
await page.waitForTimeout(200);
|
|
const suggestionText = await page.locator('.suggestion').textContent().catch(() => 'NO SUGGESTION');
|
|
console.log('Suggestion for business asset:', suggestionText.trim());
|
|
|
|
const channelOptions = await page.locator('.form-card select').nth(1).locator('option').allTextContents();
|
|
console.log('Available channel types:', channelOptions);
|
|
|
|
await browser.close();
|
|
}
|
|
main();
|