mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-13 12:33:29 +02:00
Chore: Better test of device name validity (#2187)
* improvement of devices test * try to fix flaky cypress test with cy.wait
This commit is contained in:
parent
a75aee9c22
commit
da5a50d643
2 changed files with 8 additions and 11 deletions
|
|
@ -4,19 +4,15 @@ describe('Test adding different devices', () => {
|
|||
Cypress.config('includeShadowDom', true)
|
||||
})
|
||||
|
||||
it('Should be a valid device name', () => {
|
||||
it('Validity of device name', () => {
|
||||
cy.get('#toggle_devices_list').click()
|
||||
cy.get('#btn_new_device').click()
|
||||
cy.get('#bitcoincore_device_card').click()
|
||||
cy.get('#submit-mnemonic').click()
|
||||
cy.get("#device_name").type("'invalid");
|
||||
cy.get('#submit-keys').click();
|
||||
cy.contains('Upload Keys')
|
||||
cy.get("#device_name").clear().type("valid");
|
||||
cy.get('#submit-keys').click();
|
||||
cy.contains('valid was added successfully!');
|
||||
cy.get('[data-cy="new-device-added-screen-close-btn"]').click()
|
||||
cy.get('#forget_device').click()
|
||||
cy.get('#trezor_device_card').click()
|
||||
cy.get("#device_name").type("'invalid")
|
||||
cy.get('#submit-keys').click()
|
||||
cy.get('#device_name').invoke('prop', 'validity').its('patternMismatch').should('be.true')
|
||||
cy.get("#device_name").clear().type("valid")
|
||||
cy.get('#device_name').invoke('prop', 'validity').its('patternMismatch').should('be.false')
|
||||
});
|
||||
|
||||
it('Filter devices', () => {
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ describe('Test the actions in UTXO list', () => {
|
|||
cy.get('#btn_transactions').click()
|
||||
cy.wait(1000)
|
||||
cy.get('[data-cy="utxo-list-btn"]').click()
|
||||
cy.wait(500)
|
||||
cy.get('@unsignedTxRow').should('have.attr', 'data-cy', 'unsigned-tx-row')
|
||||
// Check that only the checkbox of the unsigned UTXO are visible if it is selected
|
||||
cy.get('@unsignedTxRow').find('.select-tx-img').click( {position: 'top'} )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue