This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
FD2 Tabs: Test that Main FD2 Tabs Exist #37
Labels
testing
Issue related to testing FarmData2 functionality
FarmData2 adds tabs to the farmOS user interface. The tabs that are added depend upon the user that is logged in.
This test must check that:
Notes:
spec.js
for this test should be created in a directory namedcypress
in thefarmdata2_modules
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:36 GMT
The text was updated successfully, but these errors were encountered: