Add a button to cancel a pending registrant change - #240
Open
OlegPhenomenon wants to merge 1 commit into
Open
OlegPhenomenon wants to merge 1 commit into
OlegPhenomenon wants to merge 1 commit into
Conversation
A registrant change that went pending could not be called back from the portal: the registrar had to wait 48 hours for it to expire or ask the registry to clear it by hand. The registry now exposes DELETE /repp/v1/domains/:domain_id/pending_update (internetee/registry#2939). Wire it up and show the button on the domain page whenever the domain carries pendingUpdate, next to the existing gate that hides Delete for pendingDelete domains. While here, fix the pendingUpdate status label. The key carried a stray quote, so it parsed as `pendingUpdate"` and the status chip rendered an empty title while its tooltip worked. The new button sits right next to that chip. The same defect affects the server-side status keys, and statuses.en.yml declares an `et:` root; both are left for a separate cleanup.
Contributor
🚀 Deploy Complete!
(Environment ready for testing) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Portal side of internetee/registry#2939. Depends on internetee/registry#2946, which adds the endpoint.
What
A registrant change that went pending could not be called back from the portal — the registrar had to wait 48 hours for it to expire, or ask the registry to clear it by hand.
The registry now exposes
DELETE /repp/v1/domains/:domain_id/pending_update. This wires it up:ApiConnector::Domains::PendingUpdateCanceller— modelled onRenewer, the existing connector that overridesurl_with_idfor a sub-resource.DomainsController#cancel_pending_update— same shape asregenerate_transfer_code.resources :domains, as with the other domain actions.pendingUpdate, mirroring the existing gate that hides Delete forpendingDeletedomains. Turbodata-turbo-method="delete"with a confirmation, as on the transfer-code regenerate link.domains.show.cancel_pending_update/_confirmin bothen.ymlandet.yml.Errors need no special handling: the endpoint returns
2304with HTTP 400 when there is no pending update, whichhandle_error_responsealready turns into aflash.alert.Drive-by fix
statuses.{en,et}.ymlhad a stray quote in thependingUpdatekey, so it parsed aspendingUpdate"andt("statuses.domain.pendingUpdate")never resolved — the status chip rendered an empty title while its tooltip worked. The new button sits right next to that chip, so it is fixed here.Two related defects are not touched, to keep this PR focused:
server*keys andclientDeleteProhibited_text;statuses.en.ymldeclares anet:root, so it is overridden bystatuses.et.ymland there are no English status labels at all.Worth a separate cleanup PR.
Tests
spec/controllers/domains_controller_spec.rbgets an entry in theoptionstable plus the two cassettes. The success cassette returns a real1000payload so the controller's@response.domain[:name]is exercised rather than short-circuited.Full suite: 255 examples, 1 failure —
spec/features/managing_account_spec.rb:11, which fails on a cleanmaintoo (verified by stashing).