Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Enable and cleanup the signupPass dom test #203

Merged
merged 4 commits into from
Jan 3, 2019
Merged

Enable and cleanup the signupPass dom test #203

merged 4 commits into from
Jan 3, 2019

Conversation

ethanfrey
Copy link
Contributor

This should allow adolfo's first dom test

Checks first box in #121

@ethanfrey ethanfrey requested a review from apanizo January 3, 2019 15:25
@apanizo
Copy link
Contributor

apanizo commented Jan 3, 2019

Travis automatic deployment:
https://pr203-69_wallet-demo_iov.surge.sh

Storybook book automatic deployment:
https://storybook_pr203-69_wallet-demo_iov.surge.sh

@apanizo
Copy link
Contributor

apanizo commented Jan 3, 2019

Travis automatic deployment:
https://pr203-226_wallet-demo_iov.surge.sh

Storybook book automatic deployment:
https://storybook_pr203-226_wallet-demo_iov.surge.sh

Copy link
Contributor

@apanizo apanizo left a comment

Choose a reason for hiding this comment

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

Added a couple of messages but not found any blocker, feel free to merge. I have added two commits, let me know if something comes up.

@@ -115,3 +115,10 @@ async function watchAccountAndTransactions(

return account; // resolved when first account is loaded
}

export function shutdownSequence(_: any, getState: () => RootState): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

@ethanfrey Why this first argument?

Copy link
Contributor

Choose a reason for hiding this comment

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

Unless I am wrong I would do:

export function shutdownSequence(state: RootState): void {
...

and just call it like: shutdownSequence(store.getState())

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left this here, so it can be called like a thunk (eg. dispatch(shutdownSequence) will work). Outside of tests, we rarely have access to the state

Copy link
Contributor

Choose a reason for hiding this comment

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

👍


export function shutdownSequence(_: any, getState: () => RootState): void {
const connections = getConnections(getState());
for (const conn of Object.values(connections)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What about:

Object.values(connections).map(conn => conn.disconnect())

?

Copy link
Contributor

Choose a reason for hiding this comment

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

or maybe even better forEach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that with forEach

beforeEach(() => {
store = aNewStore();
});
afterEach(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Much nicer... I like this 👍

@ethanfrey
Copy link
Contributor Author

Only got a verbal approval from Adolfo on slack, so I have to use my super-cow-powers to perform an illegal merge.

@apanizo
Copy link
Contributor

apanizo commented Jan 3, 2019

Travis automatic deployment:
https://pr203-292_wallet-demo_iov.surge.sh

Storybook book automatic deployment:
https://storybook_pr203-292_wallet-demo_iov.surge.sh

@apanizo apanizo merged commit 7e7563d into master Jan 3, 2019
@apanizo apanizo deleted the fix-bns-tests branch January 3, 2019 17:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants