guard calendar links when source time is missing

This commit is contained in:
2026-09-06 20:16:42 +03:00
parent fb89ebadae
commit 58ba35abc2
5 changed files with 46 additions and 13 deletions
+12
View File
@@ -55,6 +55,18 @@ try {
outlookUrl.searchParams.get('enddt') !== '2026-09-10T07:00:00Z') {
throw new Error(`Takvim provider bağlantısı kaynak son tarihi korumuyor: ${JSON.stringify(evidence.checks.calendarProviderLinks)}`);
}
const missingCalendarPage = await context.newPage();
try {
await missingCalendarPage.goto(`${url.replace(/\/qa-signin$/, '')}/qa-calendar-links?missing=1`, { waitUntil: 'networkidle' });
evidence.checks.calendarMissingTimeGuard = {
googleDisabled: await missingCalendarPage.getByText('Google Takvim (saat gerekli)', { exact: true }).count() === 1,
outlookDisabled: await missingCalendarPage.getByText('Outlook (saat gerekli)', { exact: true }).count() === 1,
providerLinks: await missingCalendarPage.locator('a').filter({ hasText: /Google Takvim taslağı|Outlook taslağı/ }).count(),
};
if (!evidence.checks.calendarMissingTimeGuard.googleDisabled || !evidence.checks.calendarMissingTimeGuard.outlookDisabled || evidence.checks.calendarMissingTimeGuard.providerLinks !== 0) {
throw new Error(`Saat bilinmiyorken takvim bağlantısı pasifleşmedi: ${JSON.stringify(evidence.checks.calendarMissingTimeGuard)}`);
}
} finally { await missingCalendarPage.close(); }
} finally { await calendarPage.close(); }
await page.getByRole('button', { name: 'Ana İhale Listesi', exact: true }).click();
await page.getByRole('button', { name: 'Pazar', exact: true }).click();