Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow workspace adapter to specify the template for the workspace list page #531

Conversation

wkirdp
Copy link
Collaborator

@wkirdp wkirdp commented Oct 25, 2024

  • Add a new "workspace_list_template_name" attribute to the workspace adapter with a default path "anvil_consortium_manager/workspace_list.html"
  • Update the WorkspaceListByType view to use the new adapter.
  • Add adapter tests to check that the correct template is being used.
  • Update docs

… adapter with a default path "anvil_consortium_manager/workspace_list.html"

- Update the WorkspaceListByType view to use the new adapter.
- Add adapter tests to check that the correct template is being used.
- Update docs
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.74%. Comparing base (5947b1c) to head (86ef0d6).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #531   +/-   ##
=======================================
  Coverage   99.74%   99.74%           
=======================================
  Files         134      135    +1     
  Lines       24152    24197   +45     
=======================================
+ Hits        24090    24135   +45     
  Misses         62       62           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@amstilp amstilp left a comment

Choose a reason for hiding this comment

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

@wkirdp please add two test in test_views.WorkspaceListByTypeTest to check that the appropriate template is being used:

  • the default template is used when the default adapter is used
  • the custom template is used when a custom adapter is used

For the second test, you can look at some other tests to see how to register a new adapter in a test.

@amstilp amstilp self-requested a review October 29, 2024 22:38
@amstilp amstilp merged commit cfd2770 into main Oct 29, 2024
13 checks 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.

2 participants