cypress tests: comments and little improvements

This commit is contained in:
moneymanolis 2023-01-20 10:40:25 +01:00
parent e1654d906f
commit 23e06ca343
5 changed files with 108 additions and 184 deletions

View file

@ -7,7 +7,11 @@ describe('Connecting nodes', () => {
cy.visit('/')
cy.viewport(1200,660)
})
// Important!
// If you have a bitcoin.conf at the default data dir location this can create awkwardness.
// Either move your bitcoin.conf or use the exact RPC credentials that Cypress does
it('Connect with Bitcoin Core node', () => {
// Starting from the welcome page
cy.get('[data-cy="core-connection-btn"]').click()

View file

@ -11,7 +11,7 @@ describe('Ghost machine', () => {
cy.addWallet('Ghost wallet', 'segwit', 'funded', 'btc', 'singlesig', 'DIY ghost')
}
else {
cy.addWallet('Ghost wallet', 'segwit', 'funded', 'btc', 'singlesig', 'DIY ghost')
cy.addWallet('Ghost wallet', 'segwit', 'funded', 'btc', 'singlesig', 'DIY ghost')
}
})
})

View file

@ -11,7 +11,7 @@ describe('Test the UI related to a blockchain rescan', () => {
})
it('Go to the rescan section from a fresh wallet', () => {
// Create a completely fresh wallet which is not receiving funds from the continous mining
// Create a completely fresh wallet without any funds
cy.addDevice('Trezor hold', 'Trezor', 'hold_accident')
cy.addWallet('Fresh wallet', 'segwit', false, 'btc', 'singlesig', 'Trezor hold')
cy.get('#btn_transactions').click()

View file

@ -31,7 +31,7 @@ Cypress.Commands.add("addDevice", (name, device_type, mnemonic) => {
if ($body.text().includes(name)) {
cy.get('#toggle_devices_list').click()
cy.contains(name).click()
cy.get('#forget_device').click()
return
}
cy.get('#side-content').click()
if (!cy.get('#btn_new_device').isVisible) {
@ -156,9 +156,7 @@ Cypress.Commands.add("addWallet", (walletName, walletType, funded, nodeType, key
if ($body.text().includes(walletName)) {
cy.get('#toggle_wallets_list').click()
cy.contains(walletName).click()
cy.get('#btn_settings').click()
cy.get('#advanced_settings_tab_btn').click()
cy.get('#delete_wallet').click()
return
}
cy.get('#side-content').click()
cy.get('#btn_new_wallet').click()
@ -215,7 +213,7 @@ Cypress.Commands.add("deleteWallet", (name) => {
})
Cypress.Commands.add("selectWallet", (name) => {
cy.get('body').then(($body) => {
cy.get('body').then(() => {
cy.contains(name).click( {force: true} )
})
})

View file

@ -1026,14 +1026,14 @@ select {
margin: 0px;
}
.m-4 {
margin: 1rem;
}
.m-auto {
margin: auto;
}
.m-4 {
margin: 1rem;
}
.my-2 {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
@ -1044,6 +1044,31 @@ select {
margin-bottom: 2.5rem;
}
.-mx-4 {
margin-left: -1rem;
margin-right: -1rem;
}
.my-\[2px\] {
margin-top: 2px;
margin-bottom: 2px;
}
.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.mx-4 {
margin-left: 1rem;
margin-right: 1rem;
}
.my-1 {
margin-top: 0.25rem;
margin-bottom: 0.25rem;
}
.my-3 {
margin-top: 0.75rem;
margin-bottom: 0.75rem;
@ -1064,34 +1089,8 @@ select {
margin-right: -0.75rem;
}
.my-1 {
margin-top: 0.25rem;
margin-bottom: 0.25rem;
}
.mx-2 {
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.mx-4 {
margin-left: 1rem;
margin-right: 1rem;
}
.my-20 {
margin-top: 5rem;
margin-bottom: 5rem;
}
.-mx-4 {
margin-left: -1rem;
margin-right: -1rem;
}
.my-\[2px\] {
margin-top: 2px;
margin-bottom: 2px;
.mb-3 {
margin-bottom: 0.75rem;
}
.mb-2 {
@ -1114,10 +1113,6 @@ select {
margin-top: 0.75rem;
}
.mb-3 {
margin-bottom: 0.75rem;
}
.mb-5 {
margin-bottom: 1.25rem;
}
@ -1134,6 +1129,26 @@ select {
margin-top: 2.5rem;
}
.mt-8 {
margin-top: 2rem;
}
.mb-8 {
margin-bottom: 2rem;
}
.-mt-\[2px\] {
margin-top: -2px;
}
.mr-1 {
margin-right: 0.25rem;
}
.ml-4 {
margin-left: 1rem;
}
.mr-4 {
margin-right: 1rem;
}
@ -1142,22 +1157,10 @@ select {
margin-bottom: 1rem;
}
.ml-4 {
margin-left: 1rem;
}
.ml-6 {
margin-left: 1.5rem;
}
.mb-8 {
margin-bottom: 2rem;
}
.mt-8 {
margin-top: 2rem;
}
.mr-3 {
margin-right: 0.75rem;
}
@ -1198,30 +1201,6 @@ select {
margin-bottom: 3rem;
}
.mt-40 {
margin-top: 10rem;
}
.mt-80 {
margin-top: 20rem;
}
.-mt-1 {
margin-top: -0.25rem;
}
.-mt-\[2px\] {
margin-top: -2px;
}
.mr-1 {
margin-right: 0.25rem;
}
.mt-0 {
margin-top: 0px;
}
.block {
display: block;
}
@ -1298,6 +1277,10 @@ select {
height: 2.25rem;
}
.h-10 {
height: 2.5rem;
}
.h-7 {
height: 1.75rem;
}
@ -1306,34 +1289,22 @@ select {
height: 2.75rem;
}
.h-10 {
height: 2.5rem;
}
.h-12 {
height: 3rem;
}
.max-h-screen {
max-height: 100vh;
}
.max-h-\[40px\] {
max-height: 40px;
}
.max-h-screen {
max-height: 100vh;
}
.min-h-\[64px\] {
min-height: 64px;
}
.min-h-\[0px\] {
min-height: 0px;
}
.min-h-\[0\] {
min-height: 0;
}
.w-screen {
width: 100vw;
}
@ -1362,14 +1333,6 @@ select {
width: 344px;
}
.w-4 {
width: 1rem;
}
.w-7 {
width: 1.75rem;
}
.w-6 {
width: 1.5rem;
}
@ -1378,6 +1341,14 @@ select {
width: 1.25rem;
}
.w-4 {
width: 1rem;
}
.w-7 {
width: 1.75rem;
}
.w-\[calc\(680px\/2\)\] {
width: calc(680px / 2);
}
@ -1402,14 +1373,6 @@ select {
width: 2.25rem;
}
.w-16 {
width: 4rem;
}
.w-3 {
width: 0.75rem;
}
.min-w-\[300px\] {
min-width: 300px;
}
@ -1418,26 +1381,18 @@ select {
min-width: 0px;
}
.max-w-prose {
max-width: 65ch;
}
.max-w-\[700px\] {
max-width: 700px;
}
.max-w-\[80px\] {
max-width: 80px;
}
.max-w-\[60px\] {
max-width: 60px;
}
.max-w-\[40px\] {
max-width: 40px;
}
.max-w-prose {
max-width: 65ch;
}
.flex-shrink-0 {
flex-shrink: 0;
}
@ -1591,10 +1546,6 @@ select {
margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}
.self-start {
align-self: flex-start;
}
.self-end {
align-self: flex-end;
}
@ -1603,14 +1554,6 @@ select {
align-self: center;
}
.justify-self-start {
justify-self: start;
}
.justify-self-center {
justify-self: center;
}
.overflow-auto {
overflow: auto;
}
@ -1713,14 +1656,18 @@ select {
background-color: rgb(15 16 21 / var(--tw-bg-opacity));
}
.bg-accent {
--tw-bg-opacity: 1;
background-color: rgb(46 92 255 / var(--tw-bg-opacity));
}
.bg-dark-800 {
--tw-bg-opacity: 1;
background-color: rgb(20 21 26 / var(--tw-bg-opacity));
}
.bg-accent {
--tw-bg-opacity: 1;
background-color: rgb(46 92 255 / var(--tw-bg-opacity));
.bg-white\/10 {
background-color: rgb(255 255 255 / 0.1);
}
.bg-dark-700 {
@ -1761,14 +1708,6 @@ select {
background-color: rgb(20 21 26 / 0.7);
}
.bg-white\/80 {
background-color: rgb(255 255 255 / 0.8);
}
.bg-white\/10 {
background-color: rgb(255 255 255 / 0.1);
}
.fill-current {
fill: currentColor;
}
@ -1789,10 +1728,6 @@ select {
padding: 1.25rem;
}
.p-2 {
padding: 0.5rem;
}
.px-\[calc\(\(100\%-700px\)\/2\)\] {
padding-left: calc((100% - 700px) / 2);
padding-right: calc((100% - 700px) / 2);
@ -1823,14 +1758,9 @@ select {
padding-right: 0.75rem;
}
.py-3 {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
}
.py-5 {
padding-top: 1.25rem;
padding-bottom: 1.25rem;
.px-1\.5 {
padding-left: 0.375rem;
padding-right: 0.375rem;
}
.px-1 {
@ -1838,9 +1768,14 @@ select {
padding-right: 0.25rem;
}
.px-1\.5 {
padding-left: 0.375rem;
padding-right: 0.375rem;
.py-5 {
padding-top: 1.25rem;
padding-bottom: 1.25rem;
}
.py-3 {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
}
.pr-1 {
@ -1851,6 +1786,10 @@ select {
padding-bottom: 1.5rem;
}
.pr-3 {
padding-right: 0.75rem;
}
.pt-3 {
padding-top: 0.75rem;
}
@ -1859,10 +1798,6 @@ select {
padding-left: 0.25rem;
}
.pr-3 {
padding-right: 0.75rem;
}
.pb-4 {
padding-bottom: 1rem;
}
@ -1906,11 +1841,6 @@ select {
line-height: 1.5rem;
}
.text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
.font-medium {
font-weight: 500;
}
@ -1931,14 +1861,6 @@ select {
line-height: 1rem;
}
.leading-10 {
line-height: 2.5rem;
}
.leading-9 {
line-height: 2.25rem;
}
.text-white {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
@ -1959,6 +1881,11 @@ select {
color: rgb(194 65 12 / var(--tw-text-opacity));
}
.text-dark-100 {
--tw-text-opacity: 1;
color: rgb(207 207 208 / var(--tw-text-opacity));
}
.text-link {
--tw-text-opacity: 1;
color: rgb(41 151 255 / var(--tw-text-opacity));
@ -1974,11 +1901,6 @@ select {
color: rgb(46 92 255 / var(--tw-text-opacity));
}
.text-dark-100 {
--tw-text-opacity: 1;
color: rgb(207 207 208 / var(--tw-text-opacity));
}
.underline {
text-decoration-line: underline;
}