-
Notifications
You must be signed in to change notification settings - Fork 1
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 origination operation page #1285
Conversation
8bd28c6
to
ba41993
Compare
ba41993
to
e0b3caa
Compare
import { executeOperations, makeToolkit } from "../../../utils/tezos"; | ||
import { SuccessStep } from "../SuccessStep"; | ||
|
||
const user = userEvent.setup(); |
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.
it's better to do inside the tests according to this
expect(screen.getByText(prettyTezAmount(fee))).toBeVisible(); | ||
}); | ||
|
||
it("uses correct network", 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.
I think it's enough to check that when you click the button executeOperations
gets the correct payload, and the WalletClient
too.
this test was written in another component just to make sure that the network selection works correctly, no need to copy it here
<AccordionIcon /> | ||
</AccordionButton> | ||
<AccordionPanel overflowY="auto" maxHeight="300px"> | ||
<JsValueWrap value={(operation.operations[0] as ContractOrigination).code} /> |
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.
just do
const {code, storage} = operation.operations[0] as ContractOrigination
above
e0b3caa
to
8a60fd2
Compare
Coverage report
Test suite run success1402 tests passing in 183 suites. Report generated by 🧪jest coverage report action from e168d7a |
8a60fd2
to
6ba0dee
Compare
6ba0dee
to
567431d
Compare
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.
LGTM - great job Oleg!
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.
nit: the rest of the modals has "Page" suffix - should we maybe rename them to be consistent?
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.
Thanks for adding the tests 🥇
|
||
it("passes correct payload to sign handler", async () => { | ||
const user = userEvent.setup(); | ||
const testToolkit = "testToolkit" as unknown as TezosToolkit; |
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.
Is it possible to avoid casting to unknown here somehow?
c3ea845
to
da4c206
Compare
da4c206
to
e168d7a
Compare
Proposed changes
Task link
Types of changes
Steps to reproduce
Screenshots
Add the screenshots of how the app used to look like and how it looks now
Checklist