Testing and Migration Guide - liferesearchapp/life-research-members-portal GitHub Wiki

Testing and Migration Guide

Manual Testing Procedures

Manual testing has been an essential part of ensuring that our new multi-institute features work as intended. Follow these steps for comprehensive testing:

Navigation Bar Testing

Refer to the navigation bar which displays the main categories: Home, Members, Products, Partners, Grants, Events, Supervisions, Accounts, Institutes and My Profile depending on the account's permission level.

  • Registered: Home and My Profile.
  • Member: Home, Members, Products, Partners and My Profile.
  • Institute Admin: Home, Members, Products, Partners, Grants, Events, Supervisions, Accounts and My Profile.
  • Super Admin: Home, Accounts, Institutes and My Profile.
  • Institute and Super Admin: Members, Products, Partners, Grants, Events, Supervisions, Accounts, Institutes and My Profile.

Testing Steps for Institute Admins and Super Admins:

  1. Institute Creation:

    • Use a super admin account to create a new institute. This should automatically assign the super admin as an institute admin and member.
  2. Content Management:

    • Add at least one entry for each category: product, partner, grant, event, and supervision.
    • Perform edit operations on each entry and then delete them to ensure CRUD (Create, Read, Update, Delete) functionalities are intact.
  3. Cross-Institute Product Assignment:

    • Start by adding a product to one institute.
    • Edit the product to associate it with additional institutes.
    • Use the navigation bar to switch institutes and verify that the product appears under the correct institutes.
  4. Adding Members with Existing Accounts:

    • Access the All Accounts page (Accounts > All Accounts).
    • Select an account that is not a member of the currently selected institute (Member column set to "No").
    • Select "Add Institute" and add institute from list (Only institutes current account is the institute admin of should show).

Testing for Non-Admin and Institute Admin Roles:

  • Repeat the content management testing for users with non-admin and institute admin roles to ensure proper access control is maintained across different permission levels.

Migration Steps

For the migration process, we recommend manual execution of SQL queries based on the changes observed in schema.prisma.

Migration Strategy:

  1. Prepare SQL Queries:

    • Write SQL queries that reflect the schema changes. Avoid setting existing columns to nullable if possible, opting for @default values.
  2. Database Backup:

    • Before running the migration, ensure that you have a complete backup of the current database.
  3. Execute Queries:

    • Run the SQL queries manually, ensuring accuracy and integrity.