test: remove reminder requirements from order enhancements

This commit is contained in:
pavlov346346-source 2026-09-11 15:21:32 +03:00
parent 232222c7a7
commit a4a698f332

View File

@ -2,16 +2,20 @@ import fs from 'node:fs';
const src=fs.readFileSync('public/core/order-enhancements-v1775.js','utf8');
const perf=fs.readFileSync('public/core/performance.js','utf8');
const checks=[
['line comments persisted',/line\.comment/],
['comment button',/Оставить комментарий/],
['allergy/change comment placeholder',/Аллергия, убрать ингредиент/],
['day reminder',/data-reminder="day"/],
['hour reminder',/data-reminder="hour"/],
['catalog search by number/name',/Поиск по № бокса или названию/],
['delivery included in total',/positions-discount-promo\+delivery/],
['delivery included in total',/total=positions\+d/],
['delivery shown separately',/Доставка<\/span>/],
['grand total shown',/Итого<\/span>/],
['notification support',/new Notification/],
['module loaded',/order-enhancements-v1775\.js/],
];
for(const [name,re] of checks){const target=name==='module loaded'?perf:src;if(!re.test(target))throw new Error(`Missing ${name}`)}
const forbidden=[
['day reminder UI',/data-reminder="day"/],
['hour reminder UI',/data-reminder="hour"/],
['browser notification logic',/new Notification/],
['reminder heading',/Напоминание по заказу/],
];
for(const [name,re] of forbidden){if(re.test(src))throw new Error(`Unexpected ${name}`)}
console.log('order-enhancements-v1775: ok');