Testing Digital Library
#Testing Digital Library
This script (aka recipe) tests the Landcare Tasmania Digital Library functionality.
The end to end digital library user flow is reasonably complicated. This documents the steps to test the flow end to end and at each step the things to check.
Overview
For testing this flow we are going to create:
- A test group admin user
- A test group
- A test group member
View Digital Library Signed Out
- Make sure you are logged out or are in an incognito window.
- Navigate to https://www.landcaretas.org.au/digital-library.
- You should be able to view digital library logged out.
- There should be a button “Sign in to share” which will take you to the sign up/log in page.
Digital Library Main Page - Filtering
Documents should be able to be filtered on the Digital Library page by:
- Title text (text field)
- Document type (button)
- Landcare Area
Documents should be able to be sorted by Newest or Alphabetically.
Create “Test Admin User” - the Group Admin user
In a new incognito window (or alternative browser):
- Go to https://www.landcaretas.org.au/digital-library.
- Click “Sign in to share” (or “Sign in” from the top nav bar).
- Landcare Tasmania - Log in to continue page: For a test user, it is best to sign in with a temporary email - to sign up with an email click “Don’t have an account? Sign up”.
- Create a Landcare Tasmania account page: Enter test email account. Note to help with testing: Gmail ignores all characters after + in an email, so a test user account can be [email protected] and emails will still be sent to [email protected].
- Check email and Activate account. (note, if testing in incognito, you will need to copy activation email link to your incognito window).
[Test Admin User] - Share a Public Document to Digital Library (not group)
- Navigate to /digital-library.
- Click the “Share a document” button.
- Fill out the form and click “Submit” button.
- Upon successful submit this document will be created as an unpublished post - where Landcare Tasmania admins can moderate and publish. Once status updated to “published” it will appear on the grid.
[Test Admin User] - Create “Test Group”
- Go to Get Involved → Start a new Group → Join as a Community Care Group.
- Choose Group name, Group photo, click Create Organisation.
Check:
- A new group profile in NB should be created.
- This group should have
org_type:grouptag. - Your test user #1 should have been given the tags
admin:ORG_ID,editor:ORG_ID,member:ORG_ID(new), andconnected:ORG_ID.
Tester Notes - if testing it is recommended to also:
- Hide this test group from the live directories by removing
directory:tags (if they have been added - this will be getting removed). - Record the group profile ID (aka
ORG_ID) for future tests.
[Test Admin User] - Share a Private Group Document to Digital Library
- In the members toolbox section for the new group there should be a button Share a group document. Click the button. (If you don’t see the button - your org is missing an
org_member:ORG_TYPEtag - add it and refresh your members toolbox). - You should be at the share-a-document page.
- The page title should be Upload a document submission for GROUP NAME.
Fill out the form:
- Title
- Summary
- Upload some test documents
- Change document date
- Change document author
- Pick filters
- Do not check Share this document publicly
- Check I give permission for Landcare Tasmania to use images and documents I upload
- Click Submit
Check:
- A new blog post should be created in the digital library blog https://landcaretas.nationbuilder.com/admin/sites/4/pages/30385/blog_posts.
- A new feedback message should be added to https://landcaretas.nationbuilder.com/admin/sites/4/pages/30386/activities.
- The blog post should be published.
- The blog post fields and tags should be set (see Landcare Docs for full description) [TODO- link].
[Test Admin User] - Check Digital Library Main Page
https://www.landcaretas.org.au/digital-library
- The document card should not appear for private group documents.
[Test Admin User] - Check Group Profile Page Logged In
- The document card should appear to the admin of the group.
[Logged Out/Incognito] - Check Group Profile Page Logged Out
- The document card should will be visible with a “Private 🔒” tag on it. Clicking it will launch a “Login to view” modal (if logged in - modal will say “Become a member to view”).
[Test Admin User] - Document Page
- Click on the document card in the group profile.
Check the document page:
- Title
- Summary
- Filters
- Uploaded Files
[Test Admin User] - Edit Group Document
- On the top right on the document page, there is a new cog icon.
- Click the cog icon, click “Edit”.
- A form will open allowing the user to edit all the document fields.
- Update the document fields.
- Click Submit.
- The document blog post should update with new values.
- A new feedback message indicating the document has been updated should appear in the share document submission page.
- If the document is public or has been changed to public it should be set to “unlisted” and will require moderation.
[Test Admin User] - Delete Group Document
- On the top right on the document page, there is a new cog icon.
- Click the cog icon, click “Delete”.
- Click confirm.
The delete action does not internally delete the blog post - it sets it to “hidden”. This is a safety feature in case the user makes a mistake or a bad actor has access to the users account.
Old posts marked “hidden” can be deleted at a later date by Landcare Admins.
[Test Admin User] - Share a Public Group Document to Digital Library
- Follow steps above to share a private group document.
- Check Share this document publicly.
- Click Submit.
Check:
- A new blog post should be created in the digital library blog https://landcaretas.nationbuilder.com/admin/sites/4/pages/30385/blog_posts.
- A new feedback message should be added to https://landcaretas.nationbuilder.com/admin/sites/4/pages/30386/activities.
- The blog post should NOT be published.
[Landcare Site Admin] - Moderate Posts
- Public submitted posts should not be automatically published.
- A Landcare Site Admin must review the post and manually publish the post if they are happy with it.
- Publish the test page.
[Test Admin User] - Check Digital Library Main Page
https://www.landcaretas.org.au/digital-library
- The document should appear in the main digital library page.
[Logged Out/Incognito] - Check Digital Library Main Page
- The document should appear to logged out users.
Create “Test Group Member” - new user to be group member
- Start in new incognito window (logged out).
- Follow steps above Create Test Admin User to create a new Test Group Member.
[Test Group Member] - Create a Public Document (Non Group)
- Navigate to /digital-library.
- Click the “Share a document” button.
- Fill out the form and click “Submit” button.
- Upon successful submit this document will be created as an unpublished post - where Landcare Tasmania admins can moderate and publish. Once status updated to “published” it will appear on the grid.
[Test Group Member] - Connect with Test Group
- Go to the test group profile page at https://www.landcaretas.org.au/ORG_ID (normally the group can be found in the map directory, but for testing it is not shown here).
- Click the Connect button.
Check:
- Test User #2 should have the tag
connected:ORG_ID.
[Test Group Member] - ORG Profile - private document
- If the org has a private document - you will see a locked “Private” document - clicking it should tell you to join the org as a member to view the document.
[Test Group Member] - No Member Toolbox Button
- The nav bar should not show the Members Toolbox button to users who are just connected to a group.
[Test Admin User] - Check Admin Connected Email Notification
- Check email for “Test Admin User”. They should have been sent a notification email “A new person has connected with your group, login to review their role“ with info about “Test Group Member” connecting.
- The email contains a link to the Members Toolbox to automatically open the members list admin tool.
- Important: this link expects the group admin to be the one logged into the site, so for testing, make sure you either log back in to the site as "Test Admin User" (or copy the link and paste it in the your incognito window where you are already logged in as Test Admin User).
- Click the link to automatically open the members tool. It should take you to the Members Toolbox, and scroll down to the members admin tool which is automatically opened.
[Test Admin User] - Members Tool - Promote new User to Member
- Make sure you are logged into the site as “Test Admin User”.
- If opening the members tool via the email link, it should open automatically, else scroll down to the “Organisation Members Administration” button and click to open the tool.
- The “Test Group Member” should be listed in the tool.
- This users should not have a “role” listed (they are just connected).
- There should be a “Make Member” button.
- Click the Make Member button.
- A Member role should appear.
- The buttons should change to “Make Editor” and “Remove Member”.
Check:
- The user “Test Group Member” should have the
member:ORG_IDtag.
[Test Group Member] - Members Toolbox Button shows
- Log back in as “Test Group Member”.
- The nav bar should show the Members Toolbox button to users who are “members” of a group (or above).
[Test Group Member] - ORG Profile - private document
- If the org has a private document - you will now be able to click in and view it.
[Test Group Member] - Members Toolbox
- Click on Members Toolbox in Nav Bar.
- The new Test Group should show in the Members Toolkit.
- There should be a button in the Test Group section: “Share a Group Document”.
[Test Group Member] - Share a Private Group Document to Digital Library
- Follow steps above Share a Private Group Document to Digital Library but this time as a group member rather than admin.
Check the same things:
- The document should not appear on the main digital library page.
- The document should not appear to logged out users on the group profile page.
- The document should appear to Test Group Member on the group profile page.
[Test Group Member] - Share a Public Group Document to Digital Library
- Follow the steps above Share a Public Group Document to Digital Library.
Check:
- The document blog post should not be published.
Once published by a Landcare admin:
- The document should appear in the digital libary.
- The document should appear on the group profile page to logged in and out users.