-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 [Frontend] Fix: Pricing plan creation and Edit #7702
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
Conversation
There was a problem hiding this 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 fixes frontend issues by replacing the “Templates” tab with a “Tutorials” tab across tests and UI components, and streamlines pricing plan editing by fetching plans synchronously and adjusting the editor’s object handling.
- Rename dashboard template browser to tutorials in tests and components
- Update navigation bar and search filter to use tutorials terminology
- Refactor pricing plan edit flow to use
getPricingPlanand remove deep cloning
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/utils/auto.js | Renamed __dashboardTemplatesBrowser → __dashboardTutorialsBrowser and updated related calls. |
| tests/e2e-playwright/tests/conftest.py | Swapped template tab selector for tutorials and updated test IDs. |
| tests/e2e-frontend/tests/navigationBar/navigationBar.spec.js | Changed tab check from templates to tutorials. |
| services/static-webserver/client/source/class/osparc/store/Templates.js | Added getTemplate method that checks __tutorials then __hypertools. |
| services/static-webserver/client/source/class/osparc/pricing/Plans.js | Switched to synchronous getPricingPlan and guarded null case. |
| services/static-webserver/client/source/class/osparc/pricing/PlanEditor.js | Removed deep clone of pricingPlan and updated ID getter call. |
| services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilter.js | Redirected filter resourceType "template" → "tutorial". |
| services/static-webserver/client/source/class/osparc/dashboard/Dashboard.js | Replaced templates tab definition with tutorials tab. |
Files not reviewed (3)
- services/static-webserver/client/source/resource/osparc/tours/osparc_tours.json: Language not supported
- services/static-webserver/client/source/resource/osparc/tours/s4l_tours.json: Language not supported
- services/static-webserver/client/source/resource/osparc/tours/s4llite_tours.json: Language not supported
Comments suppressed due to low confidence (4)
tests/e2e-playwright/tests/conftest.py:647
- The search bar filter ID is still using "template" even though the tab has been renamed to tutorials. Update this to "searchBarFilter-textField-tutorial" to match the new tab.
const _textbox = page.get_by_test_id("searchBarFilter-textField-template")
tests/e2e-frontend/tests/navigationBar/navigationBar.spec.js:177
- [nitpick] The visibility predicate
isTemplatesVisibleandtemplatesLabeldo not match the tutorials tab. Either rename these variables to reflect tutorials or add a separate predicate for tutorials.
await checkButton("tutorialsTabBtn", isTemplatesVisible, templatesLabel);
tests/e2e/utils/auto.js:223
- The function
__filterTemplatesByTextnow drives the tutorial browser. Rename this to__filterTutorialsByText(and update calls) to avoid confusion.
async function __filterTemplatesByText(page, templateName) {
services/static-webserver/client/source/class/osparc/pricing/PlanEditor.js:39
- Removing the deep clone means edits will mutate the original plan object, which can introduce side effects. Consider cloning (
deepCloneObject) again or freezing the original to prevent unintended mutations.
this.__pricingPlan = pricingPlan;
|
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7702 +/- ##
=======================================
Coverage 87.54% 87.55%
=======================================
Files 1814 1814
Lines 70414 70414
Branches 1144 1144
=======================================
+ Hits 61646 61648 +2
+ Misses 8457 8454 -3
- Partials 311 312 +1
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@Mergifyio queue |
🟠 Waiting for conditions to match
|
matusdrobuliak66
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks



What do these changes do?
Found by @matusdrobuliak66
Related issue/s
How to test
Dev-ops