verify print checklist content in browser QA

This commit is contained in:
2026-09-06 19:03:42 +03:00
parent 2c3ae87e9a
commit 8e07a3ddc9
3 changed files with 15 additions and 0 deletions
+6
View File
@@ -55,6 +55,12 @@ try {
await popup.waitForLoadState('domcontentloaded');
evidence.checks.printPopupTitle = await popup.title();
if (evidence.checks.printPopupTitle !== 'Evrak Kontrol Listesi') throw new Error('Yazdırma penceresi beklenen başlığı üretmedi.');
evidence.checks.printPopupTurkishContent = await popup.locator('h1').filter({ hasText: 'EVRAK KONTROL LİSTESİ' }).count() === 1;
evidence.checks.printPopupChecklistItems = await popup.locator('ul li').count();
if (!evidence.checks.printPopupTurkishContent || evidence.checks.printPopupChecklistItems < 1) throw new Error('Evrak çıktısı beklenen Türkçe başlık veya kontrol listesini içermiyor.');
await popup.emulateMedia({ media: 'print' });
evidence.checks.printButtonHidden = await popup.locator('.yazdirma').evaluate(container => getComputedStyle(container).display === 'none');
if (!evidence.checks.printButtonHidden) throw new Error('Yazdırma düğmesi print ortamında gizlenmedi.');
await popup.close();
} finally { await readyPage.close(); }
const overview = await page.goto(`${url.replace(/\/qa-signin$/, '')}/qa-overview`, { waitUntil: 'networkidle' });