-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(gui): Hide subscribe button udeng 1552 #339
Conversation
I'm stacking all my PR's on top of #338 because otherwise we fail on the vuln-check. |
gui/packages/ubuntupro/lib/pages/subscription_status/subscribe_now_page.dart
Show resolved
Hide resolved
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.
Nice. Small nitpick, feel free to ignore it.
gui/packages/ubuntupro/lib/pages/subscription_status/subscription_status_model.dart
Outdated
Show resolved
Hide resolved
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.
.approved()
b4bf3f7
to
407ae02
Compare
For the private beta we've been advised to avoid the usage of MS Store purchase. The intended customers will use the scaled deployment. A greyed out button requires some explanation IMHO, Thus the tooltip. Only rendered in the disabled case.
But not yet e2e. We don't have one with the purchase scenario just yet.
... instead of a question.
407ae02
to
b52f3ab
Compare
The base branch was changed.
…cks (#345) This PR augments the end to end tests by adding test cases for the purchasing workflow, following a similar recipe to the existing "organization provided" and 'manually input" token test scenarios. We add one more function to the `end_to_end_test.dart` file, handling the automation of the referred workflow, triggering a MS Store purchase action. That requires both the MS Store mock as well as the Contracts backend mock. Those are started by the test code (Go) prior to running the Ubuntu Pro for Windows app, ports are selected dynamically and the final addresses are supplied to the clients of the mock via environment variables. That, in turn, requires the MSIX to be built with the mock-aware store API, as well as a mock-aware CS backend URL (selected by a build tag). This is basically the contents I presented in one Desktop Team pulse review demo, but augmented with two simulated purchase failure scenarios (due CS backend outage or MS Store internal failure) and adapted to the changes introduced in #339 . One race condition in the storemockserver was found and fixed as part of this journey.
For the private beta we must avoid the MS Store purchase scenario. We agreed on a team meeting to do so using an environment variable as the toggle for that feature. The name choosen was
UP4W_ALLOW_STORE_PURCHASE
.If set to a true-ish value, then the button is enabled as we are used to, otherwise the button is disabled and a tooltip gives a hint on why ("Coming soon" :) ). The tooltip is rendered on hover. There is no tooltip on the enabled case, even though the code shows there is a
Tooltip
widget there, it renders nothing when themessage
parameter is empty.Here's how it looks when disabled: