Skip to content

IDE Setup

Aaron Mauchley edited this page Jan 31, 2023 · 18 revisions

Setting up your development environment

This project is developed in Visual Studio Code. Other IDEs (Integrated Development Environments) should work also.

Plugins

The following VSCode plugins are recommended with the Nala Project and by default will ask to install them if needed in VSCode:

Playwright Visual Studio Extension

Playwright integrates easily with Visual Studio via the extension. Follow the instructions here to set it up. Outside of the extension/plugin integrations, all other setup steps follow the same standards for JavaScript and Node.js development within the out-of-the-box VSCode IDE provisions.

Cloning the git repo to your local:

  1. Create a new feature branch on the nala repository https://github.com/adobecom/nala after cloning the project from the “main” branch. Feature branch naming should start with your first initial and last name and then the branch name under that directory. If your name's initial and last name has already been taken, use your GitHub username instead. For example, "lsmith/featureBranchName". This will allow for many contributors that may have a similar branch name for a test on their consuming application.

    a. Go to the original “main” branch of the nala repository and copy the HTTPS or SSH link as shown in the screenshot below.

    Screenshot 2023-01-25 at 8 08 22 PM

    b. Go to the terminal and run the following command. Please make sure to use the $ cd command to go to the folder where you want to clone the repo.

    $ git clone <copied link from above>

    c. From the same terminal window, navigate to the /nala directory and run the following command to create a new feature branch.

    $ git branch <branch name>

    d. Switch to the newly created branch off of "main" by running the following command.

    $ git checkout <branch name>

  2. Follow the README.md instructions provided from the code repository root directory and install Nala.

Raising a PR (pull request):

Whenever you want to merge some code from your feature branch to the main repo, please raise a PR and get it reviewed before merging. All PRs require at least two reviews/approvals. Here are the steps to raise a PR:

  1. Check in your code to your feature branch.

To add/update/delete a file in git, run the following command

$ git add <your file name>

Note: You can get the exact file name to be entered here by executing the $ git status command and it will give you the names of all the files changed.

  1. After this, commit your code with a comment

$ git commit -m "<comment>"

  1. Then run the push command

$ git push

  1. Now go to your feature branch and click on the "Pull Request" tab and click on the "New Pull Request" button on the right. You will see the comparison between the files you have changed and if there is any conflict in merging it with the main branch. Please make sure before raising a PR that there are no conflicts. Once you verify this, click on the "Create Pull Request" button.

Your PR is raised now, and you can add reviewers to it.

Best Practices for raising PR:

  1. Please add a clear description of the PR, with a brief summary of what the test does, for example, its test cases.

  2. Make different branches from the “main” branch for separate Jira tickets. Each PR should be associated with a Jira ticket, and the ticket link should be added to the PR summary or description.

  3. Add the "@run-nala" label to the PR and add a new label that is associated with the feature spec file name tag for your test, i.e., "@marquee". This will allow the Nala automation to run against your PR for reviewers to see your test pass/fail within the CI workflow. Adding just the "@run-nala" label will run all test suites within the Nala repository against your PR, if you want to just run your test against your PR you must add both the "@run-nala" label and your newly added test tag label as described above. See the below screenshot for reference:

Screenshot 2023-01-25 at 4 06 35 PM