You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FarmData2 adds the BarnKit tab to the farmOS user interface.
This test must check that:
- The BarnKit tab contains sub-tabs for “Info”, “Seeding Report” and “Transplanting Report”
- The order of the tabs is “Info”, “Seeding Report” and then “Transplanting Report.”
- There are the correct number of sub-tabs (3 at this time).
Notes:
The spec.js for this test should be created in the cypress directory in the fd2_barn_kit directory.
Challenges:
The HTML for these tabs is generated by farmOS and thus will not have data-cy attributes, and you will not be able to add them. Thus, you will need to do some research to find an effective way to cy.get the HTML element for the tab. The resources below may be helpful.
Because, over time the UI may evolve and change (e.g. new tabs may be added) your tests should not rely on the specific ordering of the tabs in the UI. That is, you should be careful that your test would still pass if new tabs are added or the tabs are reordered. E.g. you should not rely on the BarnKit tab being the 3rd child of some other element.
Resources:
Cypress Locators: The ways that cy.get finds elements in the page. We have used data-cy attributes up to this point. But there are other types of locators.
Cypress Selector Playground: The selector playground is part of the Cypress application that can help with finding and testing locators that can be used with cy.get.
Browser DevTools Element Inspector: A tool built into the browser’s DevTools that can help you find the source code for a specific element in the page.
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.
These tests should utilize logs that are in the sample database. 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.
Original issue by braughtg Tuesday Apr 11, 2023 at 04:38 GMT
The text was updated successfully, but these errors were encountered:
FarmData2 adds the BarnKit tab to the farmOS user interface.
This test must check that:
Notes:
spec.js
for this test should be created in thecypress
directory in thefd2_barn_kit
directory.Challenges:
data-cy
attributes, and you will not be able to add them. Thus, you will need to do some research to find an effective way tocy.get
the HTML element for the tab. The resources below may be helpful.Resources:
cy.get
finds elements in the page. We have useddata-cy
attributes up to this point. But there are other types of locators.cy.get
.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:38 GMT
The text was updated successfully, but these errors were encountered: