Files
VaryaandGitHub e3a8bfcf92 fix(test): Cypress tests (#8155)
* chore: remove skipped / orphaned tests; fix: safe selector dropdown

* tests: fix spaces flow hanging when account has no spaces

* fix: failing assets regression test

* fix: uuid instead of legacy id for regression tests

* fix: Basic Flow tests: no overlapaping beamer; fix redirect when 1 space

* fix: add accounts manually test

* fix: simplify Add accounts manually test

* fix: Add Member test

* chore: remove obsolete rendering tests that are covered by unit tests for Spaces dashboard

* fix: more precise targeting for the Accounts list items
2026-06-24 10:53:57 +02:00

88 lines
3.6 KiB
JavaScript

import * as constants from '../../support/constants'
import * as dashboard from '../pages/dashboard.pages'
import * as createTx from '../pages/create_tx.pages'
import * as main from '../pages/main.page.js'
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js'
let staticSafes = []
const txData = ['Send', '-0.00002 ETH', '1/1']
const txaddOwner = ['addOwnerWithThreshold', '1/2']
const txMultiSendCall3 = ['Batch', '3 actions', '1/2']
const txMultiSendCall2 = ['Batch', '2 actions', '1/2']
describe('Dashboard tests', { defaultCommandTimeout: 60000 }, () => {
before(async () => {
staticSafes = await getSafes(CATEGORIES.static)
})
// intercept must be set up before visit so it catches the parallel queue request
beforeEach(() => {
cy.intercept('GET', constants.queuedEndpoint).as('getQueuedTransactions')
cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_2)
cy.wait('@getQueuedTransactions')
cy.get(dashboard.pendingTxWidget).should('be.visible')
})
it('Verify clicking on View All button directs to list of all queued txs', () => {
dashboard.clickOnViewAllBtn()
createTx.verifyNumberOfTransactions(2)
})
it('Verify clicking on any tx takes the user to Transactions > Queue tab', () => {
dashboard.clickOnTxByIndex(0)
dashboard.verifySingleTxItem(txData)
})
it('Verify there is empty tx string and image when there are no tx queued', () => {
cy.intercept('GET', constants.queuedEndpoint).as('getQueuedTransactions')
cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_14)
cy.wait('@getQueuedTransactions')
dashboard.verifyEmptyTxSection()
})
it('[SMOKE] Verify that the last created tx in conflicting tx is showed in the widget', () => {
cy.get(dashboard.pendingTxWidget, { timeout: 30000 }).should('be.visible')
main.verifyElementsCount(dashboard.pendingTxItem, 1)
dashboard.verifyDataInPendingTx(txData)
})
it('[SMOKE] Verify that tx are displayed correctly in Pending tx section', () => {
cy.intercept('GET', constants.queuedEndpoint).as('getQueuedTransactions')
cy.visit(constants.homeUrl + staticSafes.SEP_STATIC_SAFE_12)
cy.wait('@getQueuedTransactions')
dashboard.verifyTxItemInPendingTx(txMultiSendCall3)
dashboard.verifyTxItemInPendingTx(txaddOwner)
dashboard.verifyTxItemInPendingTx(txMultiSendCall2)
})
it('Verify that action required panel shows message count and expands when toggled', () => {
cy.visit(constants.homeUrl + staticSafes.MATIC_STATIC_SAFE_31)
dashboard.verifyActionRequiredPanelCount(1)
dashboard.expandActionRequiredPanel()
})
// Mastercopy warnings (Action Required panel) — see specs/002-cypress-banner-actioncard-migration
//we need 1.1.1 test save - deployment tbd
it('Verify that aligable for migration mastercopy shows Warning card with unsupported copy and Migrate CTA', () => {
cy.visit(constants.homeUrl + staticSafes.MATIC_STATIC_SAFE_31)
dashboard.verifyActionRequiredCard({
messages: [dashboard.unsupportedMastercopyTitle, dashboard.unsupportedMigratableContent],
actionTestId: dashboard.mastercopyActions.migrate,
})
dashboard.clickActionInPanel(dashboard.mastercopyActions.migrate)
dashboard.verifyMigrateSafeFlowOpened()
})
it('Verify that unsupported not migration shows Warning card with Get CLI CTA opening CLI docs in new tab', () => {
cy.visit(constants.homeUrl + staticSafes.MATIC_STATIC_SAFE_32)
dashboard.verifyActionRequiredCard({
messages: [dashboard.unsupportedMastercopyTitle, dashboard.unsupportedCliContent],
actionTestId: dashboard.mastercopyActions.getCli,
})
dashboard.verifyGetCliLinkInPanel()
})
})