Skip to content

Commit

Permalink
Feature: Node manager (#1146)
Browse files Browse the repository at this point in the history
* Move managers to managers folder

* Add node manager

* Fix internal node setup

* Remove old bitcoin core settings page

* Migrate old specter versions

* Fix unit tests

* Fix cypress tests

* Fix cypress tests

* Fixes

* Fixes

* Fixes

* Fix

* Fix

* Fix Cypress

* some documentation

* sorting imports and logger.error for testing tor

* get logs from tor in doubt

Co-authored-by: Kim Neunert <[email protected]>
  • Loading branch information
ben-kaufman and k9ert authored May 11, 2021
1 parent d858d07 commit 7ac1f2b
Show file tree
Hide file tree
Showing 46 changed files with 1,673 additions and 3,054 deletions.
8 changes: 5 additions & 3 deletions cypress/integration/spec_empty_specter_home.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ describe('Completely empty specter-home', () => {
cy.viewport(1200,660)
cy.visit('/')
cy.contains('Welcome to Specter Desktop')
cy.get('#node-switch-icon').click()
cy.get('[href="/nodes/node/default/"]').first().click()
cy.contains('Bitcoin Core')
cy.get('[href="/settings/"] > img').click()
cy.contains('Bitcoin JSON-RPC')
cy.get('[href="/settings/general"]').click()
cy.contains('Backup and Restore')
cy.get('[href="/settings/auth"]').click()
cy.contains('Authentication:')
Expand All @@ -29,7 +30,8 @@ describe('Completely empty specter-home', () => {
it('Configures the node in Specter', () => {
cy.viewport(1200,660)
cy.visit('/')
cy.get('[href="/settings/"] > img').click()
cy.get('#node-switch-icon').click()
cy.get('[href="/nodes/node/default/"]').first().click()
cy.get('#datadir-container').then(($datadir) => {
cy.log($datadir)
if (!Cypress.dom.isVisible($datadir)) {
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/spec_setup_tor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Setup Tor and test connection', () => {

cy.wait(60000)
cy.get('#tor-status-text').contains('Status: Running')
cy.get('[value="test_tor"]').click()
cy.get('[value="test_tor"]').click({ timeout: 60000 })
cy.contains('Tor requests test completed successfully!')
cy.get('[value="stoptor"]').click()
cy.get('#tor-status-text').contains('Status: Down')
Expand Down
14 changes: 4 additions & 10 deletions cypress/integration/spec_setup_wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ describe('Setup wizard', () => {
cy.contains('Configure your node')
cy.get('#quicksync-switch').click()
cy.get('#setup-bitcoind-dir-button').click()
cy.wait(3000)
cy.contains('Starting up Bitcoin Core...')
cy.wait(60000)
cy.contains('Setup Completed Successfully!')
cy.contains('Setup Completed Successfully!', { timeout: 60000 })
cy.get('#finish-setup-btn').click()
cy.contains('Connect Specter with Bitcoin Core node.')

cy.get('[href="/settings/"]').click()
cy.get('#active-node').click()
cy.get('#active-node-settings-btn').click()
cy.contains('Built in Bitcoin Node Status: Running')
cy.get('[value="stopbitcoind"]').click()
cy.contains('Built in Bitcoin Node Status: Down')
Expand All @@ -33,10 +31,6 @@ describe('Setup wizard', () => {
cy.contains('Built in Bitcoin Node Status: Running')
cy.get('[name="remove_datadir"]').click()
cy.get('[value="uninstall_bitcoind"]').click()
cy.contains('Specter can help you get started with your own Bitcoin Core node by setting it all up for you.')
cy.get('#external_node_view_btn').click()
cy.get('[value="useexternal"]').click()


cy.visit('/settings/tor')
cy.get('[value="starttor"]').click()
Expand All @@ -45,7 +39,7 @@ describe('Setup wizard', () => {
cy.get('#tor-status-text').contains('Status: Down')
cy.get('[value="starttor"]').click()
cy.get('#tor-status-text').contains('Status: Running')
cy.get('[value="test_tor"]').click()
cy.get('[value="test_tor"]').click({ timeout: 60000 })
cy.contains('Tor requests test completed successfully!')
cy.get('[value="uninstalltor"]').click()
cy.get('#setup-tor-button').click()
Expand Down
1 change: 1 addition & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = (on, config) => {
var rimraf = require("rimraf");
rimraf.sync(specter_home);
fs.mkdirSync(specter_home);
fs.mkdirSync(specter_home+"/nodes");
fs.mkdirSync(specter_home+"/devices");
fs.mkdirSync(specter_home+"/wallets");
return null
Expand Down
Loading

0 comments on commit 7ac1f2b

Please sign in to comment.