Skip to content

[Testing E2E] Add Test Scenario for Admin Instance Plan Page#43

Merged
jinnaWan merged 5 commits into
mainfrom
CB-79
Apr 26, 2025
Merged

[Testing E2E] Add Test Scenario for Admin Instance Plan Page#43
jinnaWan merged 5 commits into
mainfrom
CB-79

Conversation

@jinnaWan
Copy link
Copy Markdown
Collaborator

@jinnaWan jinnaWan commented Apr 25, 2025

Summary

image

@jinnaWan jinnaWan requested review from Copilot and nut1414 April 25, 2025 07:51
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 comprehensive end‑to‑end tests for the Admin Instance Plan Page and updates related page objects, data models, and configuration files to support the new admin plan functionalities.

  • Adds new e2e test scenarios for creating, editing, and deleting instance plans.
  • Updates page objects and test data models to support the admin UI interactions.
  • Adjusts frontend test IDs and configuration settings in Docker and backend infra.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/e2e/scenarios/test_admin_instance_plan.py New tests for admin instance plan management scenarios.
test/e2e/pages/common/side_nav_bar.py Added admin side navbar items for system, users, plans, and credits.
test/e2e/pages/admin/admin_instance_plan_page.py Introduces a page object for admin instance plan page operations.
test/e2e/pages/admin/init.py Exports the new AdminInstancePlanPage.
test/e2e/data/models.py Modifies InstancePlanData by making instance_plan_id optional.
test/e2e/data/constant.py Updates Currency precision to 4.
frontend/src/pages/Admin/InstancePlanManagePage.tsx Adds data-testid attributes for reliable element selection.
docker/app/docker-compose.yaml Adjusts the VITE_API_URL argument by removing its default value.
backend/src/infra/config.py Enhances LXD_HOST resolution with a fallback strategy.
Comments suppressed due to low confidence (1)

test/e2e/data/models.py:51

  • Ensure that Optional is imported from the typing module to avoid a NameError.
instance_plan_id: Optional[int] = None

Comment thread docker/app/docker-compose.yaml
@jinnaWan
Copy link
Copy Markdown
Collaborator Author

@nut1414 pls help review

Copy link
Copy Markdown
Owner

@nut1414 nut1414 left a comment

Choose a reason for hiding this comment

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

Shouldnot be able to delete plan when insance exist missi g

@jinnaWan
Copy link
Copy Markdown
Collaborator Author

There is no delete button for edit only plan, but if u want it we can have an api test
image

@nut1414
Copy link
Copy Markdown
Owner

nut1414 commented Apr 26, 2025

I mean just assertion for that button. Button should not exist.

@jinnaWan jinnaWan merged commit ce6120a into main Apr 26, 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