chore: Implement authentication fixes for TestDataManager and update user management tests
- Refactored TestDataManager to use authenticated context with Playwright's newContext method. - Updated auth-fixtures to ensure proper authentication state is inherited for API requests. - Created constants.ts to avoid circular imports and manage shared constants. - Fixed critical bug in auth setup that caused E2E tests to fail due to improper imports. - Re-enabled user management tests with updated selectors and added comments regarding current issues. - Documented environment configuration issues causing cookie domain mismatches in skipped tests. - Generated QA report detailing test results and recommendations for further action.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Shared test constants
|
||||
*
|
||||
* This file contains constants used across test files.
|
||||
* Extracted to avoid circular imports with test setup files.
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname, join } from 'path';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
/**
|
||||
* Path to the authentication storage state file.
|
||||
* Created by auth.setup.ts during the setup project phase.
|
||||
* Used by browser contexts and API request contexts to inherit authentication.
|
||||
*/
|
||||
export const STORAGE_STATE = join(__dirname, '../playwright/.auth/user.json');
|
||||
Reference in New Issue
Block a user