whole-tale / dashboard

Whole Tale Dashboard
http://wholetale.org
MIT License
7 stars 2 forks source link

Disable "Connect Account" / "Connect" buttons when necessary #609

Closed bodom0015 closed 4 years ago

bodom0015 commented 4 years ago

Problem

The "Connect Account" button is clickable even when there are no more available connections.

Fixes #607

Furthermore, the connect-apikey-modal allows users to submit without entering any/all required fields.

Approach

How to Test

Preconditions: Remove all Zenodo and/or Dataverse external account connections

  1. Checkout and run this branch locally, rebuild the dashboard
  2. Login to the WholeTale Dashboard
  3. Navigate to the Settings page
  4. Beside Dataverse and/or Zenodo, click "Connect Account"
    • The connect-apikey-modal should display
    • The "Connect" button at the bottom=right of the modal should be disable
  5. Choose a resource server and enter any value for the API key
    • The "Connect" button should now be enabled
  6. Click "Connect" to submit the new API key
    • The modal should close
    • A new entry should appear under the provider indicating that your are now Authorized on... the resource server you just chose
    • A Disconnect button should appear beside the Authorized on... entry
  7. Repeat for all Dataverse and/or Zenodo resource servers
    • After adding the last Dataverse and/or Zenodo resource server, you should see that the "Connect Account" button becomes disabled