Files
VaryaandGitHub 69b7318abe fix(tests): Adjust Cypress tests to the latest UI changes (#8248)
* fix: copilot tests: remove overlapping element

* fix: tx_history_4 tests: adjust tests to the latest UI

* fix: tx_history and tx_history_2 tests adjusted to the new ui

* refactor: replace  the data-fragile Cypress E2E with unit tests for the "Safe App tx shows icon + name" behavior

* refactor: adjust Proposers test to the latest UI changes

* refactor: adjust batch_tx tests to the latest ui changes

* refactor: adjust safe creation tests to the latest ui changes

* refactor: adjust tx creation tests to the latest ui changes

* refactor: adjust multichain setup tests to the latest ui changes

* fix: correct string text in the Proposers test

* fix: swap link as per FF

* fix: multichain creation (add a login step; block overlapping beamer)

* chore: bring back the swap prod link

* fix: relay test: use sepolia instead of polygon

* fix: proposers test assertion

* feat: harden the CF tests assertions to distinct newly created safes from existing in the space

* fix: add missing login step to the Multichain Create Safe Flow tests

* feat: add a page function to use the old UI

* chore: remove obsolete healthcheck Cypress tests; adjust comments

* fix: harden the token tests (get token name + value separately from a cell instead of full row); compare both

* fix: adjust swap test with a blocked recipient to the cow widget changes

* refactor: replace browser permission e2e tests with unit / component tests

* fix: recovery tests: bypass Spaces login by setting a classic UI session storage key

* fix: bring back the Custom Recipient logic for swap tests

* fix: flaky multichain network tests
2026-07-08 12:35:54 +02:00

82 lines
3.0 KiB
JavaScript

import * as constants from '../../support/constants.js'
import * as createTx from '../pages/create_tx.pages.js'
import * as data from '../../fixtures/txhistory_data_data.json'
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js'
import * as address_book from '../pages/address_book.page.js'
let staticSafes = []
const typeReceive = data.type.receive
const typeGeneral = data.type.general
const safe = 'eth:0x8675B754342754A30A2AeF474D114d8460bca19b'
const dai =
'&id=transfer_0x8675B754342754A30A2AeF474D114d8460bca19b_e715646c00d8c513b16de213dbdcfea16f58aa1294306fdd5866a4d1fab643e4794'
const nft =
'&id=transfer_0x8675B754342754A30A2AeF474D114d8460bca19b_e3873b1a1310fd4acd00249456b9700ea7fbe1e61261c3efd08a288abf8756d0b138'
const eth =
'&id=transfer_0x8675B754342754A30A2AeF474D114d8460bca19b_idc6b8280a40b5979908bc7a116b38ac6b7ae22feea09fbc1dc1373421ff4f250'
describe('Incoming tx history details tests', () => {
before(async () => {
staticSafes = await getSafes(CATEGORIES.static)
})
it('Verify Incoming details ERC20', () => {
cy.visit(constants.transactionUrl + safe + dai)
createTx.verifySummaryByName(
typeReceive.summaryTxInfoDAI,
null,
[typeReceive.summaryTitle, typeGeneral.statusOk],
typeReceive.altImage,
typeReceive.altImageDAI,
)
createTx.verifyExpandedDetails([typeReceive.GPv2Settlement, typeReceive.GPv2SettlementAddress])
createTx.verifyTxHashCopied(typeReceive.txHashDAIFull)
createTx.verifyNumberOfExternalLinks(2)
})
it('Verify Incoming details ERC721', () => {
cy.visit(constants.transactionUrl + safe + nft)
createTx.verifySummaryByName(
typeReceive.summaryTxInfoNFT,
null,
[typeReceive.summaryTitle, typeGeneral.statusOk],
typeReceive.altImage,
typeReceive.altTokenNFT,
)
createTx.verifyExpandedDetails([
//typeReceive.Proxy, - the check for contract name is hidden for
typeReceive.ProxyAddress,
])
createTx.verifyTxHashCopied(typeReceive.nftHashFull)
createTx.verifyNumberOfExternalLinks(2)
})
it('Verify Incoming details Native token', () => {
cy.visit(constants.transactionUrl + safe + eth)
createTx.verifySummaryByName(
typeReceive.summaryTxInfoETH_2,
null,
[typeReceive.summaryTitle, typeGeneral.statusOk],
typeReceive.altImage,
typeReceive.altToken,
)
createTx.verifyExpandedDetails([typeReceive.senderAddressEth])
createTx.verifyTxHashCopied(typeReceive.txHashEthFull)
createTx.verifyNumberOfExternalLinks(2)
})
it('Verify add to the address book for the sender in the incoming tx', () => {
const senderName = 'Sender100'
cy.visit(constants.transactionUrl + safe + eth)
address_book.clickOnMoreActionsBtn()
address_book.clickOnAddToAddressBookBtn()
address_book.typeInName(senderName)
address_book.clickOnSaveEntryBtn()
cy.visit(constants.addressBookUrl + safe)
cy.get('body').should('be.visible')
cy.contains(senderName)
})
})