Bug 1824164

Summary: Activate Subscription Watch button should get disable once opt-in
Product: Red Hat Hybrid Cloud Console (console.redhat.com) Reporter: Nikhil Kathole <nkathole>
Component: Subscription WatchAssignee: Kevin Howell <khowell>
Status: CLOSED WORKSFORME QA Contact: Jon Allen <jallen>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: ccabrera, sghai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-20 04:28:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nikhil Kathole 2020-04-15 13:16:35 UTC
Description of problem:

Once user click on "Activate Subscription Watch", it send request and shows "Data can take up to 24 hours to be processed and will appear on this page when ready". But refreshing page again shows button for "Activate Subscription Watch". It should get disable once user, opt-in for SWatch.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Go to Subscription Watch
2. Click on "Activate Subscription Watch"
3. refresh page

Actual results:
Refreshing page again shows button for "Activate Subscription Watch" again.

Expected results:
 It should get disable once user, opt-in for SWatch.

Additional info:

Comment 1 CD Cabrera 2020-04-15 15:30:19 UTC
The concern is valid, however as of 20200415 aspects of the API are not in place within the environments and can lead to false positives. 

What should be happening: 
Refreshing the page should have brought up the graph NOT the opt-in form again. Disabling the button should not be necessary. The opt-in should be almost immediate to an end-user, it simply would display a zeroed out graph display, no data.

Solution:
Once the API is in place this needs to be retested, confirming the opt-in form should not display again once a user has "opted in" and refreshed the page. This nullifies the need to disable the button.


Additional:
An end-user should never be able to get to the opt-in form multiple times unless they navigate directly towards it. The reason... the path to the opt-in view is a redirect that utilizes the existing product route/path/url masking the original GUI route. A normal end-user would not reasonably know this. If testing needs to confirm this navigate directly towards "/subscriptions/optin".

As a fallback the GUI team is coordinating with the API team to look at additionally disabling the button in the unlikely event a user is able to navigate directly towards the form again. But this is in addition to the actual solution.

Comment 2 Nikhil Kathole 2020-04-20 04:28:26 UTC
Thanks David. It is working fine now.