Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tip on solving merge conflicts in functional tests #2261

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion docs/devGuide/development/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Our unit tests perform fast, stable, and comprehensive checks on important behav

Whether you are adding a new feature, updating existing features or fixing bugs, make sure to update the **source** test files (test sites, snapshots) to reflect the changes.

After which, you can update the **expected** test files with: `npm run updatetest`
After which, you can update the <tooltip content="These are located in `expected` folder in the test sites and `__snapshots__` folder for unit tests">**expected** test files</tooltip> with: `npm run updatetest`

<box type="warning" seamless>

Expand All @@ -190,6 +190,20 @@ After which, you can update the **expected** test files with: `npm run updatetes
as uncommitted changes due to the way they are generated. If you are not directly modifying those files in your PR, you should **discard those changes** and **do not commit** them.
</box>

<box type="tip" seamless header="Here are the steps to solve merge conflicts in expected test files:">

1. Ensure that your fork is synced with the upstream repository.
2. Ensure that the master branch of your local repository is in sync with the master branch of your fork.
Pull from the fork into your local repository as needed.
3. Checkout from your master branch to your PR branch.
- `git checkout [BRANCH NAME]`
4. Merge your master branch into your PR branch.
- `git merge master`
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
5. Accept all changes to any merge conflicts in the generated **expected** test files.
- It does not matter which changes are accepted, as they will be overridden in the following step.
6. Once your master branch has been successfully merged into your PR branch, run `npm run updatetest` to generate the latest test files.
</box>

##### Adding test site content

When adding new features, you should also add new site content into an existing test site or create a new test site to demonstrate the new feature. This is to ensure that your feature can be tested by building that test site.
Expand Down