-
Notifications
You must be signed in to change notification settings - Fork 42
Seeding Report: Test Cancel Seeding Log Edit #40
Comments
TeamNO has got this one :) |
Hello @braughtg @wpgoble , Thanks, |
@megantriplett I believe you can write a cypress test which uses an async call to connect to the database. In that case you can ping the database for results and see if things changed. Since you are working on FarmOS you might be able to pull their API commands in order to grab the pages that are printed to the table, and then test to see if there is a difference. Check out this link for connecting a cypress test to a database. |
@megantriplett @wpgoble For these tests I think that |
@wpgoble |
Your |
@broughtg This didn't work:
But this did:
Do you know why this is? |
When the click on save and the call to The solution of splitting this into two A more complete solution would use an |
The Seeding Report allows the values within a seeding log (i.e. a row) 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. 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.
Notes:
setDB sample
in a Terminal in the development environment.Resources:
farmdat2/farmdata2_modules/fd2_example/dbtest
.Additional Information:
Some additional notes relevant to this issue:
.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..spec.js
file should include a comment at the top that describes what the file as a whole is testing.describe
should describe in a short phrase what the file is testing.beforeEach
method should callcy.waitForPage()
. This will ensure that the page is fully loaded (e.g. that all theMaps
used by the page are loaded) before performing any tests.it
for each of the things to be tested.it
s so that eachit
tests a cohesive set of things.it
should describe in a short phrase what theit
is testing..spec.js
files in thefarmdata2/farmdata2_modules/fd2_example/
sub-tabs (e.g.ui
,api
) may provide some helpful examples.docker/sampleDB/README.md
file.Original issue by braughtg
Tuesday Apr 11, 2023 at 04:39 GMT
The text was updated successfully, but these errors were encountered: