Implement ErpAuthService with TDD approach: - Add login(), close(), getSession(), isActive() methods - Use Playwright chromium with headless:false for debugging - Manage browser lifecycle and session state - Handle authentication flow with ERP_LOCATORS - Add integration tests for login scenarios - Add unit tests for session management - Fix dotenv config path in test setup Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
16 lines
397 B
TypeScript
16 lines
397 B
TypeScript
import { beforeAll, afterAll } from 'vitest';
|
|
import dotenv from 'dotenv';
|
|
import path from 'path';
|
|
|
|
// Load environment variables from project root
|
|
dotenv.config({ path: path.resolve(process.cwd(), '.env') });
|
|
|
|
beforeAll(async () => {
|
|
// Global test setup
|
|
console.log('Test suite starting...');
|
|
});
|
|
|
|
afterAll(async () => {
|
|
// Global test teardown
|
|
console.log('Test suite completed.');
|
|
}); |