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 1 commit
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
14 changes: 14 additions & 0 deletions docs/devGuide/development/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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="Solving merge conflicts in expected test files">
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved

1. Ensure the fork is latest
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
- Pull from upstream repo to fork
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
2. Ensure local master is in sync with fork master
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
- Pull from the fork master into local master
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
3. Checkout to PR branch
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
4. Merge local master into PR branch
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
- `git merge master`
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
5. Accept any change to conflicts in generated test files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could include examples of files/filetypes of generated functional test files!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @itsyme, thanks for the comment! I added a tooltip explaining the location of these expected files above (expected for functional and __snapshot__ for unit test)

lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
- It does not matter which change is accepted as it will be overridden in the following step
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved
6. Once the merge is done, run `npm run updatetest` to generate 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