feat(playwright-cli): add comprehensive test generation, tracing, and video recording documentation
Chore App Build, Test, and Push Docker Images / build-and-push (push) Failing after 2m29s
Chore App Build, Test, and Push Docker Images / build-and-push (push) Failing after 2m29s
- Introduced detailed documentation for test generation workflow in Playwright CLI, covering planning, generating, and healing tests. - Added tracing capabilities documentation, including usage, output files, and best practices for debugging and performance analysis. - Included video recording instructions, emphasizing best practices for capturing browser automation sessions with chapter markers and overlays. - Implemented user tutorial authentication setup and tutorial tests for parent mode in the E2E testing framework. - Created JSON files for user tutorial state management, ensuring isolated test environments.
This commit is contained in:
@@ -52,6 +52,9 @@ E2E_DELETE_PIN = '5678'
|
||||
E2E_CC_EMAIL = 'e2e-cc@test.com'
|
||||
E2E_CC_PASSWORD = 'E2eCCPass1!'
|
||||
E2E_CC_PIN = '3456'
|
||||
E2E_TUTORIAL_EMAIL = 'e2e-tutorial@test.com'
|
||||
E2E_TUTORIAL_PASSWORD = 'E2eTutorialPass1!'
|
||||
E2E_TUTORIAL_PIN = '7890'
|
||||
|
||||
|
||||
def send_verification_email(to_email, token):
|
||||
@@ -499,6 +502,7 @@ def e2e_create_delete_user():
|
||||
verified=True,
|
||||
role='user',
|
||||
pin=E2E_DELETE_PIN,
|
||||
tutorial_enabled=False,
|
||||
)
|
||||
users_db.insert(user.to_dict())
|
||||
return jsonify({'email': norm_email}), 201
|
||||
@@ -524,6 +528,33 @@ def e2e_create_cc_user():
|
||||
verified=True,
|
||||
role='user',
|
||||
pin=E2E_CC_PIN,
|
||||
tutorial_enabled=False,
|
||||
)
|
||||
users_db.insert(user.to_dict())
|
||||
return jsonify({'email': norm_email}), 201
|
||||
|
||||
|
||||
@auth_api.route('/e2e-create-tutorial-user', methods=['POST'])
|
||||
def e2e_create_tutorial_user():
|
||||
"""Create an isolated e2e test user for tutorial tests. Only available outside production."""
|
||||
if os.environ.get('DB_ENV', 'prod') == 'prod':
|
||||
return jsonify({'error': 'Not available in production'}), 403
|
||||
|
||||
norm_email = normalize_email(E2E_TUTORIAL_EMAIL)
|
||||
# Clean up any children from previous tutorial runs.
|
||||
existing = users_db.get(UserQuery.email == norm_email)
|
||||
if existing:
|
||||
child_db.remove(Query().user_id == existing.get('id'))
|
||||
users_db.remove(UserQuery.email == norm_email)
|
||||
user = User(
|
||||
first_name='E2E',
|
||||
last_name='Tutorial',
|
||||
email=norm_email,
|
||||
password=generate_password_hash(E2E_TUTORIAL_PASSWORD),
|
||||
verified=True,
|
||||
role='user',
|
||||
pin=E2E_TUTORIAL_PIN,
|
||||
tutorial_enabled=False,
|
||||
)
|
||||
users_db.insert(user.to_dict())
|
||||
return jsonify({'email': norm_email}), 201
|
||||
@@ -562,6 +593,7 @@ def e2e_seed():
|
||||
verified=True,
|
||||
role='user',
|
||||
pin=E2E_TEST_PIN,
|
||||
tutorial_enabled=False,
|
||||
)
|
||||
users_db.insert(user.to_dict())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user