-
Notifications
You must be signed in to change notification settings - Fork 243
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
Chore: Refactor_wallet_manager #1667
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
dc6d921
remove unused params for update-method
daeaf5b
wallets_update_list shouldn't be an attribute
179682e
param, docs and error_handling
261ec80
docs and propertize failed_wallets and error_management
ac88d5b
keep storing all wallets in wallet_manager
dc48ea5
adding first draft of a session-test
66474eb
Merge branch 'update_cypreass' into refactor_wallet_manager
e2e579d
updating cypress
199703f
refine spec_mustiuser
f4dbf8e
Merge branch 'master' into refactor_wallet_manager
d86c4df
Merge branch 'master' into refactor_wallet_manager
9b7f550
Merge branch 'master' of github.com:cryptoadvance/specter-desktop int…
e91b4cb
deactivate cypress-test
afcb0ec
Merge branch 'master' into refactor_wallet_manager
6c00650
changes in doc string of _update
moneymanolis 47ea161
Merge branch 'master' into refactor_wallet_manager
moneymanolis 6daace6
Merge branch 'master' into refactor_wallet_manager
063d6c1
Merge branch 'master' into refactor_wallet_manager
4e153d3
proper description
68027fc
Merge branch 'refactor_wallet_manager' of github.com:k9ert/specter-de…
b0f112d
Merge branch 'master' into refactor_wallet_manager
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
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
describe('Test the app with multiple users', () => { | ||
// This test is currently still deactivated due to: | ||
// See https://github.com/cypress-io/cypress/issues/21138 | ||
if (Cypress.env("CI")) { | ||
const login = (name,password) => { | ||
if (!password) { | ||
password = name+"pass" | ||
} | ||
cy.session([name, password], () => { | ||
cy.visit('/auth/login') | ||
cy.get('#username').type(name) | ||
cy.get('#password').type(password) | ||
cy.get('#login-btn').click() | ||
cy.url().should('contain', '/welcome/about') | ||
}, | ||
{ | ||
validate() { | ||
cy.visit("/welcome/about") | ||
cy.url().should('contain', '/welcome/about') | ||
} | ||
} | ||
) | ||
} | ||
|
||
before(() => { | ||
Cypress.config('experimentalSessionSupport',true) | ||
cy.viewport(1200,660) | ||
cy.visit('/') | ||
cy.get('body').then(($body) => { | ||
if ($body.text().includes('Login to Specter')) { | ||
cy.get('#username').type("admin") | ||
cy.get('#password').type("admin") | ||
cy.get('#login-btn').click() | ||
} | ||
}) | ||
cy.get('[href="/settings/"] > .svg-white').click() | ||
cy.get('[href="/settings/auth"]').click() | ||
cy.get('select').select("usernamepassword") | ||
cy.get('#submit-btn').click() | ||
login("admin","admin") | ||
|
||
cy.get('body').then(($body) => { | ||
if (! $body.text().includes('user1')) { | ||
cy.visit("/settings/auth") | ||
cy.get('#generateregistrationlink > .btn').click({timeout:60000}) | ||
cy.get('message-box').then(($msgbox) => { | ||
//expect($msgbox.text()).to.match(/New user link generated (expires in 1 hour):.*/) | ||
let matches = $msgbox.text().match(/http:\/\/.*/) | ||
cy.log(matches) | ||
cy.visit(matches[0]) | ||
cy.get('[placeholder="Username"]').type("user1") | ||
cy.get('[placeholder="Password"]').type("user1pass") | ||
cy.get('.row > .btn').click() | ||
//cy.wait(500) | ||
cy.get('message-box').contains("You have registered successfully") | ||
|
||
}) | ||
} | ||
if (! $body.text().includes('user2')) { | ||
cy.visit("/settings/auth") | ||
cy.get('#generateregistrationlink > .btn').click({timeout:60000}) | ||
cy.get('message-box').then(($msgbox) => { | ||
cy.log($msgbox) | ||
cy.log($msgbox.text()) | ||
//expect($msgbox.text()).to.match(/New user link generated (expires in 1 hour):.*/) | ||
let matches = $msgbox.text().match(/http:\/\/.*/) | ||
cy.log(matches) | ||
cy.visit(matches[0]) | ||
cy.get('[placeholder="Username"]').type("user2") | ||
cy.get('[placeholder="Password"]').type("user2pass") | ||
cy.get('.row > .btn').click() | ||
//cy.wait(500) | ||
cy.get('message-box').contains("You have registered successfully") | ||
|
||
}) | ||
} | ||
cy.get('[href="/auth/logout"] > .svg-white').click() | ||
}) | ||
|
||
|
||
}) | ||
|
||
it('First Session Login', () => { | ||
|
||
cy.visit("/") | ||
login("user1") | ||
cy.visit("/welcome") | ||
|
||
|
||
|
||
}) | ||
} | ||
}) |
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.
Perhaps I am overlooking sth. but where is the name variable set?
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 defining a function and the name is the parameter here. It's initialized with the arguments at call time, e.g. in line 39.