Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Seeding Report: Test Seeding Log Edited #204

Open
4 tasks
braughtg opened this issue Apr 11, 2023 · 3 comments · May be fixed by #217
Open
4 tasks

Seeding Report: Test Seeding Log Edited #204

braughtg opened this issue Apr 11, 2023 · 3 comments · May be fixed by #217
Assignees
Labels
testing Issue related to testing FarmData2 functionality

Comments

@braughtg
Copy link
Member

braughtg commented Apr 11, 2023

The Seeding Report allows the values within a row (i.e. a seeding log) to be edited by clicking the “Edit” button (i.e. the blue pencil button). When a row is being edited the “Edit” button changes to two buttons: “Save” and “Cancel”. The “Save” button (the green check mark) will save the changes to the database. The “Cancel” button (the brown X) discards any edits and does not change the database.

This test must confirm that when a row is being edited and the “Save” button is clicked that:

  • For Direct Seeding Logs (use Seeding Type = Direct Seedings)
    • - Any edits that can be made to a direct seeding log are reflected in the table.
    • - Any edits that can be made are reflected in the database.
  • For Tray Seeding Logs (use Seeding Type = Tray Seedings)
    • - Any edits that can made to a direct seeding log are reflected in the table.
    • - Any edits that can be made are reflected in the database.

Notes:

  • The test must use appropriate FarmOSAPI functions to:
    • Create new logs that will be edited by the test.
    • Retrieve logs from the database to ensure that they have (or have not) been modified.
    • Delete the new logs that were created.
    • If you find that you have scrambled the database you can always reset to the default sample database running the command setDB sample in a Terminal in the development environment.

Resources:

  • The examples in the dbtest sub-tab of the FD2 Example tab will be helpful. These should be studied and understood before beginning coding for this issue.
  • The source for the examples can be found in farmdat2/farmdata2_modules/fd2_example/dbtest.

Additional Information:
Some additional notes relevant to this issue:

  • The .spec.js file containing your test should be stored in an appropriate location and have a short but descriptive name. Use the locations and an naming from the "Good First issues" as examples.
  • The .spec.js file should include a comment at the top that describes what the file as a whole is testing.
  • The message for the describe should describe in a short phrase what the file is testing.
  • After logging in and visiting the desired page the beforeEach method should call cy.waitForPage(). This will ensure that the page is fully loaded (e.g. that all the Maps used by the page are loaded) before performing any tests.
  • It is not necessary to include a separate it for each of the things to be tested.
    • You should decide how to divide the things being tested into its so that each it tests a cohesive set of things.
    • The message for each it should describe in a short phrase what the it is testing.
  • The .spec.js files in the farmdata2/farmdata2_modules/fd2_example/ sub-tabs (e.g. ui, api) may provide some helpful examples.
  • Information about the data contained in the sample database can be found in the "The Sample Database" section of the docker/sampleDB/README.md file.
@braughtg braughtg added the testing Issue related to testing FarmData2 functionality label Apr 11, 2023
@EliasBerhe
Copy link

I would like to work on it

@sidlamsal
Copy link

Please assign this to me.

@RolandLocke
Copy link

Please assign this issue to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing Issue related to testing FarmData2 functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants