Skip to content

feat(tests): add selenium based tests#999

Open
sanjayankur31 wants to merge 1 commit into
developfrom
selenium-tests
Open

feat(tests): add selenium based tests#999
sanjayankur31 wants to merge 1 commit into
developfrom
selenium-tests

Conversation

@sanjayankur31

Copy link
Copy Markdown
Collaborator

Note that this code is LLM generated, and is subject to change/be updated by LLMs.

Co-authored-by: opencode

Note that this code is LLM generated, and is subject to change/be
updated by LLMs.

Co-authored-by: opencode
@sanjayankur31

Copy link
Copy Markdown
Collaborator Author

@filippomc : got opencode to write some selenium based tests, and ran them against v2dev.

============================= test session starts ==============================
platform linux -- Python 3.13.14, pytest-9.1.1, pluggy-1.6.0
rootdir: OSBv2
plugins: xdist-3.8.0
2 workers [32 items]

PASSED (12):
  test_about_dialog.py::TestAboutDialog::test_about_dialog_opens
  test_about_dialog.py::TestAboutDialog::test_about_dialog_closes
  test_auth.py::TestAuth::test_home_page_loads
  test_auth.py::TestAuth::test_login
  test_auth.py::TestAuth::test_logout
  test_auth.py::TestAuth::test_protected_route_redirect
  test_repositories.py::TestRepositories::test_repository_listing_loads
  test_repositories.py::TestRepositories::test_grid_list_toggle
  test_search_filter.py::TestSearchFilter::test_workspace_search_field_exists
  test_search_filter.py::TestSearchFilter::test_repository_search_field_exists
  test_search_filter.py::TestSearchFilter::test_filter_popover_opens
  test_workspaces.py::TestWorkspaces::test_view_public_workspaces

SKIPPED (7):
  test_repositories.py::TestRepositories::test_file_tree_browsing              (API down)
  test_repositories.py::TestRepositories::test_create_workspace_from_repository (API down)
  test_repositories.py::TestRepositories::test_create_workspace_without_file_selection (API down)
  test_workspaces.py::TestWorkspaces::test_clone_workspace                     (API down)
  test_workspaces.py::TestWorkspaces::test_edit_workspace                      (API down)
  test_workspaces.py::TestWorkspaces::test_make_workspace_public               (API down)
  test_workspaces.py::TestWorkspaces::test_make_workspace_private              (API down)

FAILED (13):
  test_auth.py::TestAuth::test_login_logout_round_trip        (slow cluster OAuth redirect)
  test_repositories.py::TestRepositories::test_repository_detail_loads           (API 503)
  test_repositories.py::TestRepositories::test_create_workspace_button_visible   (API 503)
  test_repositories.py::TestRepositories::test_navigate_back_to_repositories     (API 503)
  test_repositories.py::TestRepositories::test_add_repository                    (clear() on div)
  test_user_profile.py::TestUserProfile::test_user_profile_loads                 (API 503)
  test_user_profile.py::TestUserProfile::test_edit_profile_button_visible        (API 503)
  test_user_profile.py::TestUserProfile::test_user_tabs_exist                    (API 503)
  test_user_profile.py::TestUserProfile::test_public_workspaces_tab_clickable    (API 503)
  test_user_profile.py::TestUserProfile::test_edit_profile                       (API 503)
  test_workspaces.py::TestWorkspaces::test_view_workspace_detail                 (API 503)
  test_workspaces.py::TestWorkspaces::test_delete_workspace             (#your-all-workspaces-tab not found)
  test_workspaces.py::TestWorkspaces::test_create_workspace             (workspace not in listing after create)

============= 13 failed, 12 passed, 7 skipped in 144.49s (0:02:24) =============

All tests pass, apart from those that need the workspaces API, as the API seems to be down. On the main page, the spinner keeps spinning, but no workspace cards are shown.

Related bug/feature: if the api is down, perhaps we should show a warning/error to users (although we wouldnt expect this to happen on prod).


Since these are only tests, no harm in them being mostly LLM generated---we'll keep them separate from the main code, and update them as necessary. For actual code, we'll make sure each line is properly reviewed if LLMs are used to assist.

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.

1 participant