Skip to content

Commit

Permalink
Merge pull request dickinson-comp190#47 from phong260702/FormatRoleName
Browse files Browse the repository at this point in the history
fixing the syntax for manager, worker, and guess to be similar to admin
  • Loading branch information
braughtg authored Nov 16, 2022
2 parents 1d827dd + a800285 commit 2bc8ab0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions farmdata2_modules/fd2_tabs/fd2_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ As mentioned, each of the tabs in the FarmData2 interface are created by Drupal

A FarmData2 module named `xyz` would include a folder within `farmdata2_modules/fd2_tabs` named `xyz`. That folder will contain at least the following files and directories, where `xyz`, `abc` and `pqr` are simply place holders and should be replaced with module specific names.
- `fd2_xyz.info`: Defines the module `xyz` so that it is recognized by Drupal.
- `fd2_xyz.module`: Contains the PHP implementation of the `xyz` module. This code determines where and when the tab is visible based on the user's role (e.g. `admin`, _manager_, _worker_ or _guest_). It also defines the sub-tabs and their content.
- `fd2_xyz.module`: Contains the PHP implementation of the `xyz` module. This code determines where and when the tab is visible based on the user's role (e.g. `admin`, `manager`, `worker` or `guest`). It also defines the sub-tabs and their content.
- `abc.html`: The content for a sub-tab `abc` within the `xyz` module (e.g. `info.html`, `ex1.html`).
- `abc.spec.js`: A test file containing end-to-end tests for the `abc.html` page. The end-to-end tests are written using the Cypress testing tools (more info below). If multiple test files are used for the `abc.html` file, they should be named `abc.pqr.spec.js` where `pqr` clarifies the testing performed by the file. Multiple additional . and names can be used as necessary, but the filename of the test must end with `.spec.js` in order to be recognized by the FarmData2 Cypress configuration.
- `cypress`: A directory containing additional module level end-to-end tests for the `xyz` module. These are tests that are important for the module but that are not associated with a specific sub-tab (i.e. `html` file). These test files must also be named `*.spec.js` to be recognized by the FarmData2 Cypress configuration.
Expand Down Expand Up @@ -215,4 +215,4 @@ Resources and references for writing Cypress tests for Vue Components can be fou
The Cypress test runner (discussed above) also provides support for running Vue Component tests in the same Docker container. The Vue Component tests are run from the `farmdata2_modules` directory using the command:
- `./test_runner.bash ct`

As noted above if this is the first time the Cypress test runner is launched it will take a number of minutes. Subsequent launches will be much faster.
As noted above if this is the first time the Cypress test runner is launched it will take a number of minutes. Subsequent launches will be much faster.

0 comments on commit 2bc8ab0

Please sign in to comment.