Thank you for your interest in contributing to the project. We are looking forward to your first Merge Request!
Here are some guidelines to make contribution as smooth as possible for you and the maintainers.
- Create an issue or add comments to an existing one. We use issues to keep the conversations organized and easy to find.
- Create a fork. Once the issue is created, click the Create Issue Fork button. Then follow the instructions at Creating issue forks. Commit your new test to the fork then create a merge request so we can look at the test together.
- Study the existing tests. Look at how the existing tests accomplish their goals and use similar techniques.
- Use the helper functions. There are lots of helper functions in atk_commands.js and atk_utility.js. If the current helper function does only 80% of what you need, it may make sense to include an upgrade to the function with your new test so that everyone benefits from the new functionality. (And it may not. Communicate with the module maintainers if you are unsure.)
- Test your test. And be sure to note in the issue which version of Drupal you tested against—especially the major version (Drupal 10.3, Drupal 11.1, etc.).
- Ask for a test ID. Every test has its own ID within a block of IDs reserved for tests of a certain category, such as "Log in and Registration" or "Media." In your issue, ask a maintainer for the ID to use if the test is for a new category. Otherwise, you can add one to the last ID in a category when simply adding a test to an existing set of tests.
- Use "atk_setup back." Development of tests usually happens in <project root>/tests or similar. When your changes are done, use "atk_setup back" to copy the tests from that location back to the repo that typically you will have cloned into <project root>/web/modules/contrib/automated_testing_kit.