cover calendar provider links in browser QA

This commit is contained in:
2026-09-06 20:08:34 +03:00
parent 528aba16ae
commit 2120414d12
4 changed files with 50 additions and 0 deletions
+23
View File
@@ -33,6 +33,29 @@ try {
await page.getByRole('heading', { name: 'Günlük İhale Bülteni', exact: true }).waitFor({ state: 'attached', timeout: 10_000 });
evidence.checks.dailyBulletinHeading = await page.getByRole('heading', { name: 'Günlük İhale Bülteni', exact: true }).count() === 1;
if (!evidence.checks.dailyBulletinHeading) throw new Error('Günlük bülten başlığı açılmadı.');
const calendarPage = await context.newPage();
try {
await calendarPage.goto(`${url.replace(/\/qa-signin$/, '')}/qa-calendar-links`, { waitUntil: 'networkidle' });
const googleLink = calendarPage.getByRole('link', { name: 'Google Takvim taslağı', exact: true });
const outlookLink = calendarPage.getByRole('link', { name: 'Outlook taslağı', exact: true });
await googleLink.waitFor({ state: 'attached', timeout: 10_000 });
await outlookLink.waitFor({ state: 'attached', timeout: 10_000 });
const [googleHref, outlookHref] = await Promise.all([googleLink.getAttribute('href'), outlookLink.getAttribute('href')]);
const googleUrl = new URL(googleHref);
const outlookUrl = new URL(outlookHref);
evidence.checks.calendarProviderLinks = {
googleHost: googleUrl.hostname,
googleDates: googleUrl.searchParams.get('dates'),
outlookHost: outlookUrl.hostname,
outlookStart: outlookUrl.searchParams.get('startdt'),
outlookEnd: outlookUrl.searchParams.get('enddt'),
};
if (googleUrl.hostname !== 'calendar.google.com' || googleUrl.searchParams.get('dates') !== '20260910T070000Z/20260910T070000Z' ||
outlookUrl.hostname !== 'outlook.live.com' || outlookUrl.searchParams.get('startdt') !== '2026-09-10T07:00:00Z' ||
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)}`);
}
} finally { await calendarPage.close(); }
await page.getByRole('button', { name: 'Ana İhale Listesi', exact: true }).click();
await page.getByRole('button', { name: 'Pazar', exact: true }).click();
await page.getByRole('button', { name: 'Analitik Dashboard', exact: true }).click();