LF-3019 Test Plan

https://lite-farm.atlassian.net/browse/LF-3019

Area / scope to test

Front end

Back end

Model

Notes

Area / scope to test

Front end

Back end

Model

Notes

Requirement specific constraints

  • Testing as per Jira ticket

  • Testing cascading effects

  • Create an API request to test if the user is able to delete a crop plan where all the tasks are planned or completed

  • Create an API request to test if the user can firstly DELETE a crop plan and then Complete the same crop plan ( PATCH request )

  • Create an API request to ensure the user is not able to PATCH the Assignee or Date once the Crop plan was already deleted

  • Create an API request to ensure that the user is not able to Delete the crop plan if at least one task associated with this crop plan was abandoned or completed.

  • In the Database ensure that all the information is displayed correctly, once the user deletes the crop plan

 

Role based constraints

  • Only the following roles see the “Delete crop plan” link: FO / FM / EO

  • Ensure that the user is not able to open the deletion link if he uses the account of FW

  • Ensure that VIA API tool the user is not able to delete the crop plan if the user _ id is the FW account

N/A

Does role determine what a user can see or do? Is this enforced uniformly across the front end and back end?

User preferences constraints

  • Ensure that the certification status doesn’t play role , try to delete the crop plan using the farm that is searching for certification and with the farm that is not searching for certification.

  • Ensure that the information is displayed in the user prefered language or the “Missing” Tag should exist.

N/A

N/A

Is this impacted by user or farm preferences such as language, system of measure, certification status?

Numerical input constraints

N/A

N/A

N/A

Do we appropriately handle negative, very small, very large, or 0 as inputs?

Text input constraints

N/A

N/A

N/A

Do we appropriately handle blank, very small, and very large inputs? Is there a strict format (such as email) that must be followed?

Date based constraints

N/A

N/A

N/A

Are there logical restrictions on what dates can be input? Should a use be able to complete something in the future for example.

Date based assumptions

N/A

N/A

N/A

Are we making valid assumptions about what dates should be allowed?

Timezone driven interactions

N/A

N/A

N/A

If timezones play a role in the data, are they being displayed or converted appropriately?

Interaction / transitioning UI based constraints

Per UI, user must…

 

…see the following :

  • Trash can icon and link: “Delete crop plan”

    • Only shown per “Impact of Role” section guidance above

    • Only shown if the crop plan’s status is not “Completed” or “Abandoned”

    • Once clicked, view one of the following (hereafter “ineligible delete view”): …

      • if the crop plan has any completed or abandoned tasks:

 

Hazard icon and title: “Can’t delete crop plan”

  • Body: “Do you want to abandon the crop plan instead?”

  • Primary action: “Abandon”

  • Secondary action: “Cancel” … if the crop plan has no completed or abandoned tasks (hereafter “eligible delete view”): Red border

 

Trash can icon and title: “Delete crop plan?”

  • Body: “This crop plan and all its' tasks will be removed from your farm. If you would like to keep a record of this crop plan, click “Abandon” instead.”

  • Primary action: “Confirm deletion”

  • Secondary action: “Cancel”

… be able to see the following transitions:

  • Upon clicking “Delete crop plan” link: If the crop plan has any completed or abandoned tasks, smoothly transition to the ineligible delete view

  • If the crop plan has no completed or abandoned tasks, smoothly transition to the eligible delete view

  • Upon clicking “Cancel” from either delete view, smoothly transition back to the default view

 

… be able to perform the following actions:

  • From the default view:

    • Click “Delete crop plan” to …

      • If the crop plan has any completed or abandoned tasks, smoothly transition to the ineligible delete view

      • If the crop plan has no completed or abandoned tasks, smoothly transition to the eligible delete view

  • From the ineligible delete view:

    • Click “Abandon crop plan” to…

      • Navigate to tha abandon crop plan flow for this crop plan

    • Click “Cancel” to smoothly transition back to the default view From the eligible delete view:

  • Click “Confirm deletion” to…

    • Patch the crop plan and all it’s dependent tasks to have Deleted = TRUE

    • On success …

      • Return the user to the varietal from which the crop plan was deleted and display a success banner

      • If any of the tasks belonging to the crop plan had been assigned: Notify the assignee

    • Otherwise, display the appropriate error message as a snack bar and remain on this screen

  • Click “Cancel” to smoothly transition back to the default view

N/A

N/A

Is the UI transitioning appropriately? Is the API providing da

Flow based constraints

  • Ensure that the user is able to go back and then forth , and all the information would be saved.

N/A

N/A

Is state being preserved appropriately in a flow? If I go back and then forth, is it maintained? Is state invalidated when it should be?

Synchronous / asynchronous constraints

N/A

N/A

N/A

Is the interaction synchronous, asynchronous, or does it support both? Can you simulate both if so?

Time-out / low bandwidth constraints

N/A

N/A

N/A

Does the feature fail gracefully under no bandwidth / low bandwidth environments?

Data transformation correctness

N/A

N/A

N/A

Are values appropriately updated when units change? Is it WYSIWYG?

Outcome correctness

N/A

N/A

N/A

When inputting known inputs with expected outputs - do you get the results you expect? Have you tested several “cases” of this?

Switching farms

N/A

N/A

N/A

Does this feature respond well to switching farms (and returning)?

Notification constraints

  • Ensure that the notification would be created to the assignee once the crop plan tasks were deleted.

N/A

N/A

Should a notification be marshalled based on this action?

Cascading effects

  • Ensure that deleted crop plans (and their dependent tasks) are not displayed or included in calculations on at least the following locations:

    • An attempt to access the management plan by plan_id route should direct to the deleted record splash screen

    • Exports under Record D or either Record I:

      • Record D: If the task would have caused the plan to be included in an export that it otherwise shouldn’t be

      • Either Record I: If the deleted task was a cleaning or soil amendment task that would have been included in the export, ensure it does not

  • Accessing the deleted management plan by route id should direct to splash screen, not crash app

N/A

N/A

Are there logical places

Integration constrains

N/A

N/A

N/A

Do we need to ensure state is consistent between LiteFarm and the external service? What failure cases do we need to handle? How do we report back the outcome to the user or external service?

Concurrency

Concurrency tests: After one user has deleted the management plan, another user doing the following should lead to an error, not crash the app:

  • Adding a task to the management plan

  • Completing the management plan

  • Abandoning the management plan

N/A

N/A

How do changes made to records affect other users on the farm? e.g. What happens when a record is soft deleted while another user is viewing said record?