This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Chain-selection from UI #4859
Merged
Merged
Chain-selection from UI #4859
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
49ee31a
First little bits for chain-selection.
gavofyork bc7ca7e
Provide RPCs and get settings through to user defaults.
gavofyork de821eb
Hasty stash.
gavofyork eb09caa
Fix updater accidentally redownloading.
gavofyork 477c173
Finish up.
gavofyork 4c81f8b
Add JS tests.
gavofyork ec5987b
Hypervisor should never run a binary modified before itself.
gavofyork 379bb06
Style.
gavofyork 6a1209c
Help tweak.
gavofyork bfdbecb
Fix test compile.
gavofyork 3793c90
Merge remote-tracking branch 'origin/master' into ui-chain-select
gavofyork 2608f80
Fix JS test
gavofyork 08f4b5e
Build fix for tests.
gavofyork 81021c9
Revert default chain name
gavofyork 94f26a1
Another test
gavofyork 1d1c055
Use spec name via client.
gavofyork b07dc72
Fix mock up.
gavofyork cdc6a39
whitespace
gavofyork c3c0d4f
whitespace
gavofyork c8441bc
remove exit/restart endpoints.
gavofyork c0e2061
Merge branch 'ui-chain-select' of github.com:ethcore/parity into ui-c…
gavofyork 338cf86
Merge remote-tracking branch 'origin/master' into ui-chain-select
gavofyork File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,10 +38,12 @@ describe('views/Settings/Parity', () => { | |
beforeEach(() => { | ||
render(); | ||
sinon.spy(instance.store, 'loadMode'); | ||
sinon.spy(instance.store, 'loadChain'); | ||
}); | ||
|
||
afterEach(() => { | ||
instance.store.loadMode.restore(); | ||
instance.store.loadChain.restore(); | ||
}); | ||
|
||
it('renders defaults', () => { | ||
|
@@ -56,6 +58,10 @@ describe('views/Settings/Parity', () => { | |
it('loads the mode in the store', () => { | ||
expect(instance.store.loadMode).to.have.been.called; | ||
}); | ||
|
||
it('loads the chain in the store', () => { | ||
expect(instance.store.loadChain).to.have.been.called; | ||
}); | ||
}); | ||
|
||
describe('components', () => { | ||
|
@@ -94,5 +100,26 @@ describe('views/Settings/Parity', () => { | |
expect(instance.store.changeMode).to.have.been.calledWith('dark'); | ||
}); | ||
}); | ||
describe('chain selector', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blank line before. |
||
let select; | ||
|
||
beforeEach(() => { | ||
select = component.find('Select[id="parityChainSelect"]'); | ||
sinon.spy(instance.store, 'changeChain'); | ||
}); | ||
|
||
afterEach(() => { | ||
instance.store.changeChain.restore(); | ||
}); | ||
|
||
it('renders a chain selector', () => { | ||
expect(select).to.have.length(1); | ||
}); | ||
|
||
it('changes the chain on the store when changed', () => { | ||
select.simulate('change', { target: { value: 'dark' } }); | ||
expect(instance.store.changeChain).to.have.been.calledWith('dark'); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Where is this called from? Why not just implement
Drop
?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.
exit
andrestart
are not yet called from anywhere, however, they seem like useful public api to have; i plan on implementing a UI endpoints for them to all the user to kill or restart parity easily.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 don't see how it belongs in
Client
, whose role is just to manage and provide blockchain data. Hypervisor stuff being at a higher level would make it a lot simpler to manage different kinds of clients, parity-as-a-library, non-hypervised instances, etc.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.
will remove for the present PR.
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 guess we might want to look into an alternative "hypervisor" IPC endpoint that could host such calls, however in the context of the present PR that would be too much extra baggage.