Skip to content

Commit

Permalink
explain project conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaoVA committed Nov 22, 2024
1 parent a7f6435 commit 946fda8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions end2end/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,30 @@ npx playwright install
- GitHub Actions workflow? **N**
- Install browsers? **Y**

## Developing New Tests

Before developing new tests, please familiarize yourself with the following requirements.

### Synchronize your database

Before starting development, you must run the API tester ([How do I do this?](../README.md#running-tests)). This helps ensure that tests run consistently across all developer workstations.

### File Organization

Individual tests that can run in parallel must organized into files by their functional location. The functional location refers to the page in which the function occurs. For example, the Form Editor exists in the Admin Panel. Therefore the file would be named `adminPanelFormEditor` + file extension. Most tests should fall into this category.

Inter-dependent tests that exercise a series of features must be prefixed with `lifecycle`, and briefly describe its function. For example, `lifecycleSimpleTravel` implements a simple travel workflow, creates a record, applies approval actions, and builds a report.

Files must use camelCase. No spaces are permitted in filenames. Underscores should be used in lieu of spaces if needed.

### Naming Tests (Titles)

Tests Titles must briefly and plainly explain the component or feature it exercises. For example, if we're creating a test on the homepage to check the search box's ability to find a specific record in a certain way, the title can be `search [specific record] using [method]`. It's not necessary to explain that the test is for the homepage, because this is implicit in the filename. Titles must be formatted in plain language, no naming conventions such as CamelCase should be used for the whole title.

### Screenshots

Including screenshots within tests are highly recommended, but not currently required. Screenshots provide value when reviewing tests, as it can be immediately apparent in a screenshot if a test is functioning correctly.


## Useful commands

Expand Down

0 comments on commit 946fda8

Please sign in to comment.