2bde490e9e
TaxBaik CI/CD / build-and-deploy (push) Successful in 51s
- Add Serilog for structured logging (Console + File) - Implement TelegramNotificationService for admin alerts - Log successful/failed login attempts with Telegram notifications - Add application startup/shutdown logging - Log important events to Telegram Chat ID: -5585148480 - Configuration: Telegram:BotToken and Telegram:ChatId in appsettings Features: - Automatic daily log rotation - Structured logging with timestamps - Environment-aware alerts - Error and info level Telegram messages Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
51 lines
2.0 KiB
TypeScript
51 lines
2.0 KiB
TypeScript
import { test } from '@playwright/test';
|
|
|
|
test('check dashboard metrics', async ({ page }) => {
|
|
const baseUrl = 'http://178.104.200.7/taxbaik';
|
|
|
|
// Login
|
|
await page.goto(`${baseUrl}/admin/login`);
|
|
await page.fill('input[placeholder="사용자명"]', 'test_admin');
|
|
await page.fill('input[placeholder="비밀번호"]', 'TestAdmin@123456');
|
|
await page.click('button[type="submit"]');
|
|
await page.waitForURL(/admin\/dashboard/);
|
|
|
|
// Wait for page load
|
|
await page.waitForSelector('.admin-page-hero', { timeout: 5000 });
|
|
await page.waitForTimeout(2000);
|
|
|
|
// Check for metric cards
|
|
const metrics = page.locator('.admin-metric-card');
|
|
const metricCount = await metrics.count();
|
|
console.log(`\nFound ${metricCount} metric cards`);
|
|
|
|
// Log each metric value
|
|
for (let i = 0; i < Math.min(metricCount, 4); i++) {
|
|
const metric = metrics.nth(i);
|
|
const text = await metric.textContent();
|
|
console.log(` Metric ${i + 1}: ${text?.trim().slice(0, 100)}`);
|
|
}
|
|
|
|
// Check for data in main content area
|
|
const contentText = await page.locator('body').textContent();
|
|
const has총문의 = contentText?.includes('총 문의') || false;
|
|
const has신규문의 = contentText?.includes('신규 문의') || false;
|
|
const has활성공지 = contentText?.includes('활성 공지') || false;
|
|
const has예정세무신고 = contentText?.includes('예정 세무신고') || false;
|
|
|
|
console.log(`\nDashboard content check:`);
|
|
console.log(` - 총 문의: ${has총문의}`);
|
|
console.log(` - 신규 문의: ${has신규문의}`);
|
|
console.log(` - 활성 공지: ${has활성공지}`);
|
|
console.log(` - 예정 세무신고: ${has예정세무신고}`);
|
|
|
|
// Try to get text content from specific areas
|
|
const dashContent = await page.locator('.admin-content').textContent();
|
|
if (dashContent) {
|
|
console.log(`\nDashboard content length: ${dashContent.length}`);
|
|
// Check if there are numbers
|
|
const numbers = dashContent.match(/\d+/g) || [];
|
|
console.log(`Numbers found: ${numbers.slice(0, 10).join(', ')}`);
|
|
}
|
|
});
|