Use data-cy to select txid + cursor pointer/title

This commit is contained in:
moneymanolis 2023-01-25 09:40:17 +01:00
parent 76e0ad7b3a
commit b922ac12f9
2 changed files with 4 additions and 3 deletions

View file

@ -35,8 +35,8 @@ describe('Test sending transactions', () => {
it('Open up transaction details', () => {
cy.selectWallet("Test Hot Wallet 1")
cy.get('#btn_transactions').click()
// Click on the txid of the (hopefully) only send tx
cy.get('tbody.tx-tbody').find('tr').find('.svg-send').parent().parent().parent().find('#column-txid').find('.explorer-link').click()
// Click on the first txid with category "send"
cy.get('[data-cy="tx-category-send"]').click()
// Input
cy.get('.tx-data-info').contains('Value: 20 tBTC')
// Output

View file

@ -100,7 +100,7 @@
</div>
<img class="frozen-img hidden svg-white" data-style="vertical-align: middle; height: 28px;" src="{{ url_for('static', filename='img/snowflake.svg') }}"/>
</td>
<td id="column-txid" class="tx scroll optional txid">
<td id="column-txid" class="tx scroll optional txid cursor-pointer" title="Open transaction details">
<span class="explorer-link"></span>
</td>
<td id="column-label" class="tx optional address" style="display: flex; align-items: center;"></td>
@ -183,6 +183,7 @@
// Set category image
this.category.src = this.getCategoryImg(this.tx.category, this.tx.confirmations > 0);
this.category.classList.add('svg-' + this.tx.category)
this.txid.setAttribute('data-cy', `tx-category-${this.tx.category}`)
// TODO:
// Setup tx popup for mobile