Skip to content

[Testing E2E] Add Test Scenario for Instance Setting Page#39

Merged
jinnaWan merged 4 commits into
mainfrom
CB-75
Apr 22, 2025
Merged

[Testing E2E] Add Test Scenario for Instance Setting Page#39
jinnaWan merged 4 commits into
mainfrom
CB-75

Conversation

@jinnaWan
Copy link
Copy Markdown
Collaborator

Summary

image

Test:

  • Add before/after all functionality
  • Add test scenarios for instance setting page

Console tests are flaky as hell

@jinnaWan jinnaWan requested review from Copilot and nut1414 April 22, 2025 13:00
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 several new end-to-end test scenarios for the Instance Setting page, while also enhancing test infrastructure and adding new data-testid attributes for improved element targeting. Key changes include:

  • New E2E tests and fixtures for instance settings, including before_all/after_all actions.
  • Updates to frontend components with additional data-testid attributes for better test reliability.
  • Enhancements in API client and registry actions to support class-level actions in tests.

Reviewed Changes

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

Show a summary per file
File Description
test/e2e/scenarios/test_instance_setting.py Added multiple tests for accessing different instance setting menus and interactions.
test/e2e/scenarios/test_instance_create.py Adjusted timeout configuration to improve stability.
test/e2e/registry/actions.py Introduced class-level action protocols and updated action registration logic.
test/e2e/pages/* Added new page objects and methods to support instance settings navigation.
frontend/src/* Enhanced Instance-related components with new data-testid attributes and improved element targeting.
backend/src/core/startup.py Updated database initialization to cleanup test databases on startup only.
Comments suppressed due to low confidence (2)

frontend/src/components/Instance/Setting/AccessMenu.tsx:81

  • The test id 'reset-root-password' is used on both an input field and a button. Consider using distinct identifiers (e.g., 'reset-root-password-input' and 'reset-root-password-button') to prevent ambiguity in tests.
data-testid="reset-root-password"

test/e2e/pages/instance/instance_setting_page.py:96

  • [nitpick] The method name 'access_menu_should_be_not_be_available' is awkward. Consider renaming it to 'access_menu_should_not_be_available' for clarity.
def access_menu_should_be_not_be_available(self):

@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.

aprob

@jinnaWan jinnaWan merged commit 4d3eb46 into main Apr 22, 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