mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* 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]>
56 lines
1.9 KiB
JavaScript
56 lines
1.9 KiB
JavaScript
import * as constants from '../../support/constants'
|
|
import * as main from '../pages/main.page'
|
|
import * as safe from '../pages/load_safe.pages'
|
|
import * as createwallet from '../pages/create_wallet.pages'
|
|
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js'
|
|
|
|
let staticSafes = []
|
|
|
|
const testSafeName = 'Test safe name'
|
|
|
|
describe('[SMOKE] Load Safe tests', { defaultCommandTimeout: 30000 }, () => {
|
|
before(async () => {
|
|
staticSafes = await getSafes(CATEGORIES.static)
|
|
})
|
|
|
|
beforeEach(() => {
|
|
cy.visit(constants.loadNewSafeSepoliaUrl)
|
|
})
|
|
|
|
it('[SMOKE] Verify only valid Safe name can be accepted', () => {
|
|
// alias the address input label
|
|
cy.get('input[name="address"]').parent().prev('label').as('addressLabel')
|
|
|
|
createwallet.verifyDefaultWalletName(createwallet.defaultSepoliaPlaceholder)
|
|
safe.verifyIncorrectAddressErrorMessage()
|
|
safe.inputNameAndAddress(testSafeName, staticSafes.SEP_STATIC_SAFE_4)
|
|
|
|
safe.verifyAddressInputValue(staticSafes.SEP_STATIC_SAFE_4)
|
|
safe.verifyNextButtonStatus('be.enabled')
|
|
})
|
|
|
|
it('[SMOKE] Verify names cannot have more than 50 characters', () => {
|
|
// Wait due to re-render issues of the element
|
|
cy.wait(5000)
|
|
safe.inputName(main.generateRandomString(51))
|
|
safe.verifyNameLengthErrorMessage()
|
|
})
|
|
|
|
it('[SMOKE] Verify ENS name is translated to a valid address', () => {
|
|
safe.inputAddress(constants.ENS_TEST_SEPOLIA)
|
|
safe.verifyAddressInputValue(staticSafes.SEP_STATIC_SAFE_6)
|
|
safe.verifyNextButtonStatus('be.enabled')
|
|
})
|
|
|
|
it('[SMOKE] Verify safe name has a default name', () => {
|
|
createwallet.verifyDefaultWalletName(createwallet.defaultSepoliaPlaceholder)
|
|
cy.reload()
|
|
createwallet.verifyDefaultWalletName(createwallet.defaultSepoliaPlaceholder)
|
|
})
|
|
|
|
it('[SMOKE] Verify non-smart contract address is not allowed in safe address', () => {
|
|
safe.inputAddress(constants.DEFAULT_OWNER_ADDRESS)
|
|
safe.verifyAddressError()
|
|
})
|
|
})
|