-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
[#2159] Display the Approve Partner button on the top with a tooltip #2163
[#2159] Display the Approve Partner button on the top with a tooltip #2163
Conversation
…lication Details' text
…parnter in question hasn't yet made a request for an approval, whilst showing a tooltip in the latter case
…ocking Partner API
@rhian-cs thanks for the PR! I've got a few suggestions now that I see the snapshots.
Otherwise I think this is looking great! |
… to the container
</div> | ||
</div> | ||
<div id="approve-application-button"> | ||
<% tooltip_message = "Partner has not requested approval yet. Partners are able to request approval going into 'My Organization' and clicking 'Request Approval' button" %> |
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.
<% tooltip_message = "Partner has not requested approval yet. Partners are able to request approval going into 'My Organization' and clicking 'Request Approval' button" %> | |
<% tooltip_message = "Partner has not requested approval yet. Partners are able to request approval by going into 'My Organization' and clicking 'Request Approval' button." %> |
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.
This looks good and I really like the specs you've added.
However, I would hold off until we deprecate the API calls as mentioned in one of my comments.
spec/system/partner_system_spec.rb
Outdated
def stub_get_partner_request(partner_id) | ||
allow(ENV).to receive(:[]).and_return(ENV) | ||
allow(ENV).to receive(:[]).with("PARTNER_REGISTER_URL").and_return("https://partner-register.com") | ||
allow(ENV).to receive(:[]).with("PARTNER_BASE_URL").and_return("https://partner-register.com") | ||
allow(ENV).to receive(:[]).with("PARTNER_KEY").and_return("partner-key") | ||
|
||
partner_response = File.read("spec/fixtures/partner_api/partner.json") | ||
|
||
stub_request(:get, "https://partner-register.com/#{partner_id}") | ||
.to_return(status: 200, body: partner_response, headers: {}) | ||
end |
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.
This might be deprecated very soon as the update to main
to merge the two applications has been merged in. That means, we won't need to make this API call once we've updated the controller to directly retrieve from the partner's database rather than go through the API.
I think we can hold off on this until that change which should be coming soon
…test for that change
Hello there! |
…stable without hovering the button
@rhian-cs nice work! LGTM
Yeh, it is a pretty large test suite. I personally just push up code and see if the CI can do it faster for me :) |
Resolves #2159
Description
In the Approve Partner screen, the Approve Partner button was at the bottom of the page.
Since the page is quite long, it would be interesting if the user could see the button either at the top or while they're scrolling the page.
Two options were suggested by @edwinthinks. The first is placing the button at the top of the page, beside the "Application Details" header. However, this may encourage the user to not read the application instead and just click Approve. The other option would be to add a fixed button that scrolls with the user, which is what I did.
To test the changes I also added a fixture to help mock the Partner API.
Type of change
How Has This Been Tested?
Manual testing:
Automated testing:
For each of the partners above (one invited and one awaiting review) I added the following tests:
Screenshots
Before changes
The Approve Partner button was at the bottom of the page, only visible and enabled for "awaiting review" partners and had no tooltip.
The button was never visible when the user was at the top of the page.
In case the user scrolled down, viewing a "invited" partner, the button was not visible:
In case the user scrolled down, viewing an "awaiting review" partner, the button was visible:
After changes
The button is now at a fixed position at the bottom right of the screen. The button is always visible, but disabled for "invited" partners. It also displays a tooltip for "invited" partners.
Desktop view:
When scrolling to the bottom of the page:
Mobile view:
Tooltip: