Skip to content

Latest commit

 

History

History
69 lines (56 loc) · 2.17 KB

TESTING_SCENARIOS.md

File metadata and controls

69 lines (56 loc) · 2.17 KB

Testing

Here are a few scenarios to make sure the plugin is working as expected.

Basic communication

  • Follow the "Setting up" steps on the readme file to configure the Hub and at least two Nodes.
  • Make sure RAS is enabled in all sites
  • As a reader, register to one of the Nodes
  • Wait a couple of minutes for the async actions to run
  • Visit the Event Log panel on the Hub and confirm the user registration event on the Node is there
  • Still on the Hub, check your Users list and confirm the user email registered on the Node was created as a Network Reader in the Hub
  • On the second Node, check that the reader was also created (it might take another couple of minutes)

See the troubleshooting section in the developer docs to learn how to follow the events.

Specific events

reader_registered is covered in the instructions above

donation_new and donation_subscription_cancelled

  • In one of the Nodes, make a one-time donation using the Donation block.
  • Check that the donation_new event shows up in the Hub's Event log
  • Wait until another Node pulls the event
  • Confirm an account is created (if it wasn't already)
  • Authenticate as the reader in the Node that pulled the event
  • Open DevTools and confirm there's a reader data entry in the localStorage with:
{
  "np_reader_1_network_donor": {
    "https://node.com": {
      "1234567890": "once"
    }
  }
}
  • Back in the Node that originated the order, place a monthly donation
  • Wait for the other node to pull and refresh the authenticated session page
  • Confirm the localStorage now contains:
{
  "np_reader_1_network_donor": {
    "https://node.com": {
      "1234567890": "once",
      "1234567891": "monthly"
    }
  }
}
  • Back in the Node that originated the order, cancel the subscription (make sure it's actually cancelled and not 'Pending Cancellation')
  • Wait for the other node to pull and refresh the authenticated session page
  • Confirm the localStorage now contains:
{
  "np_reader_1_network_donor": {
    "https://node.com": {
      "1234567890": "once",
      "1234567891": "monthly",
      "1234567892": "subscription_cancelled"
    }
  }
}