-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
docs: consolidate wallet docs #1684
docs: consolidate wallet docs #1684
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petertonysmith94 Thanks for helping us with this. We appreciate it 👍
@@ -152,196 +141,6 @@ describe('Doc Examples', () => { | |||
expect(arrayify(assetId)).toEqual(arrayify(Address.fromB256(assetId).toB256())); | |||
}); | |||
|
|||
test('it can work with wallets', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petertonysmith94, we do want to move all code snippets to the doc-snippets directory when it is possible.
However, we cannot remove these e2e test cases from here, as they were most likely added for a specific reason.
When moving these code snippets, we need to write new, specific tests that validate only the required steps to ensure that the code snippet is working.
Therefore, in many cases, when migrating a code snippet, many test cases can be simplified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Torres-ssf, that all sounds reasonable!
I will reinstate the fuel-gauge
package tests now.
In terms of test simplification, did you have any pointers/guidelines for this process?
From what is there now, I assume that will be generally keeping small, organised, with descriptive test file-name, and having single purpose. Happy to continue with this for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petertonysmith94 The conventions that we use for code snippet tests are:
1 - Placing them inside apps/docs-snippets
2 - Naming the test file with the same name as the doc page.
3 - Design the test case based on what the code snippets are intended to show.
4- If the code snippet is from a Sway project, it needs to come from one of the projects within app/docs-snippets/test/fixtures/forc-projects/
or a new one created on the same dir.
For instance, on the Address section, this specific snippet was created to show how to instantiate a wallet from a public key.
Closed in favour of #1885 |
relates: #1505
Changes made
fuel-gauge
overdocs-snippets
.