Files
8bfc31027e tests(e2e): restore popup settle time and fix smoke test failures (#7525)
* fix(e2e): restore popup settle time and fix NFT click reliability

The previous cy.wait removal in closeOutreachPopup, acceptCookies2, and
closeSecurityNotice replaced delays with cy.get('body', { timeout })
which resolves immediately since body always exists, removing the settle
time needed for async popups to render before the conditional jQuery
check. This caused spending_limits tests to fail. Pin ubuntu-24.04 in
the smoke workflow to prevent Cypress Cloud parallel-group-params-mismatch
from differing runner OS versions. Add scrollIntoView and force click
for the inactive NFT icon inside a Tooltip wrapper.

* chore(ci): disable Cypress Cloud recording and split specs manually

Cypress Cloud parallel mode fails with parallel-group-params-mismatch
when GitHub runners have different Ubuntu minor versions (24.04.3 vs
24.04.4). Pinning ubuntu-24.04 doesn't help since both versions exist
under that label.

Disable recording to bypass the cross-machine validation and split
specs across containers using modular arithmetic so each container
runs a unique subset (~4 specs each).

* fix(e2e): revert cy.wait removals that caused test failures

Revert the Cypress page object changes from 47762e16c that replaced
cy.wait() calls with cy.get('body', { timeout }) patterns. The
replacement didn't work because body always exists immediately, removing
the settle time needed for async UI elements (popups, modals, animations)
to render before conditional jQuery checks.

This restores the original cy.wait() calls in: main.page.js,
address_book.page.js, assets.pages.js, dashboard.pages.js,
load_safe.pages.js, sidebar.pages.js, address_book.cy.js, and
load_safe.cy.js.

* fix(e2e): fix test selectors conflicting with keepMounted CaptchaModal

The CaptchaModal uses keepMounted on its ModalDialog, which means
data-testid="modal-title" (with text "Security check") is always
present in the DOM even when the modal is closed. This breaks:

- spending_limits: cy.get(modalTitle).should('have.text', 'New transaction')
  finds the CaptchaModal's title first and fails the text check.
  Fix: use cy.contains(modalTitle, text) to match on both selector and text.

- nfts: cy.get(modalTitle).should('not.exist') fails because the
  CaptchaModal's title always exists in the DOM.
  Fix: use should('not.be.visible') instead of should('not.exist').

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-03-25 14:37:13 +01:00

28 lines
980 B
JavaScript

import * as constants from '../../support/constants'
import * as addressBook from '../../e2e/pages/address_book.page'
import * as main from '../../e2e/pages/main.page'
import * as ls from '../../support/localstorage_data.js'
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js'
let staticSafes = []
describe('[SMOKE] Address book tests', () => {
before(async () => {
staticSafes = await getSafes(CATEGORIES.static)
})
beforeEach(() => {
cy.intercept('GET', constants.transactionHistoryEndpoint).as('History')
cy.visit(constants.addressBookUrl + staticSafes.SEP_STATIC_SAFE_4)
cy.wait('@History', { timeout: 20000 })
})
it('[SMOKE] Verify empty name is not allowed when editing', () => {
main.addToLocalStorage(constants.localStorageKeys.SAFE_v2__addressBook, ls.addressBookData.sepoliaAddress1)
cy.wait(1000)
cy.reload()
addressBook.clickOnEditEntryBtn()
addressBook.verifyEmptyOwnerNameNotAllowed()
})
})