سامانه صدور فاکتور و حسابداری
test: accept cement substring in cement-block and target exact matching product
davoodmehraban89 committed
Oct 11, 2026 at 14:43 UTC
8a40d89c603baeb5de82d9ba3079938cdd36b716
1 file changed
+3
-2
scripts/ux-hardening-r2.spec.js
+3
-2
@@ -99,12 +99,13 @@ test('existing invoice row rehydrates after cloud data arrives, displays an uncl
99
await page.screenshot({path:process.env.FINORA_PRODUCT_SEARCH_SCREENSHOT+'_block.png',fullPage:false});
100
}
101
await input.fill('سيــمان'.replace(/ـ/g,''));
102
- await expect(page.locator('body > .finora-combobox-list .finora-combobox-option')).toHaveCount(1);
102
+ // Both cement and cement-block products legitimately match the shared word.
103
+ await expect(page.locator('body > .finora-combobox-list .finora-combobox-option')).toHaveCount(2);
104
await expect(page.locator('body > .finora-combobox-list')).toContainText('سیمان تیپ ۲');
105
if(process.env.FINORA_PRODUCT_SEARCH_SCREENSHOT){
106
await page.screenshot({path:process.env.FINORA_PRODUCT_SEARCH_SCREENSHOT+'_cement.png',fullPage:false});
107
}
107
- await page.locator('body > .finora-combobox-list .finora-combobox-option').click();
108
+ await page.locator('body > .finora-combobox-list .finora-combobox-option').filter({hasText:'سیمان تیپ ۲'}).click();
109
await expect(page.locator('#rehydrate-product')).toHaveValue('C3');
110
await expect(page.locator('#result-unit')).toHaveValue('کیسه');
111
await expect(page.locator('#result-price')).toHaveValue('150000');