Skip to content

[Testing E2E] Add Test Scenario for User Manage Page#45

Merged
jinnaWan merged 6 commits into
mainfrom
CB-83
Apr 30, 2025
Merged

[Testing E2E] Add Test Scenario for User Manage Page#45
jinnaWan merged 6 commits into
mainfrom
CB-83

Conversation

@jinnaWan
Copy link
Copy Markdown
Collaborator

@jinnaWan jinnaWan commented Apr 28, 2025

Summary

image

@jinnaWan jinnaWan requested review from Copilot and nut1414 April 28, 2025 13:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces new end-to-end test scenarios for the User Manage page while improving consistency in date formatting across tests.

  • Added a new utility function (format_date_for_instance_card) to format dates for instance cards.
  • Updated multiple test fixtures to use the now_formatted() function instead of datetime.now() for standardized date strings.
  • Extended and adjusted page objects and UI components to support these tests with new data-testid attributes.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/e2e/utils/datetime_utils.py Added date formatting utility for instance cards
test/e2e/scenarios/test_user_manage.py New E2E test scenarios and fixtures for User Manage functionality
test/e2e/scenarios/test_user_billing.py, etc. Replaced datetime.now() with now_formatted() for consistency
test/e2e/pages/admin/user_manage_page.py Updated page object with new data-testid attributes for testing
test/e2e/data/models.py Changed created_at and last_updated_at types for string consistency
frontend/src/pages/Admin/UserManagePage.tsx Added data-testid attributes and updated key extractor for improved tests
frontend/src/components/Common/ItemCard.tsx Added data-testid attribute for card header

@jinnaWan
Copy link
Copy Markdown
Collaborator Author

@nut1414 pls help review

@jinnaWan jinnaWan merged commit 6c61bbe into main Apr 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants