mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* tests(web):safe-shield * fix(tests)update-check-inTwapIntegration * feat(tests)safeshieldVerifyEmptyState * tests:SafeShieldTreatAnalysisTests * tests:addRiskTest&TestId * tests:RiskCheckUpdate * tests:cleanPageObject * fix(tests)refactorStaticSafeList * fix(tests)ReUseMainFunctions * fix(tests)addDataTestId * fix(tests)removeComments * fix(tests)smallFixes
23 lines
680 B
JavaScript
23 lines
680 B
JavaScript
import { INFO_MODAL_KEY } from '../e2e/safe-apps/constants'
|
|
import safes from '../fixtures/safes/static.js'
|
|
|
|
const allowedApps = ['https://safe-test-app.com']
|
|
|
|
Cypress.Commands.add('visitSafeApp', (appUrl) => {
|
|
cy.on('window:before:load', (window) => {
|
|
window.localStorage.setItem(
|
|
INFO_MODAL_KEY,
|
|
JSON.stringify({
|
|
11155111: { consentsAccepted: true, warningCheckedCustomApps: allowedApps },
|
|
}),
|
|
)
|
|
})
|
|
|
|
cy.visit(`/apps/open?safe=${safes.SEP_STATIC_SAFE_2}&appUrl=${encodeURIComponent(appUrl)}`, {
|
|
failOnStatusCode: false,
|
|
onBeforeLoad: (win) => {
|
|
win.addEventListener('message', cy.stub().as('safeAppsMessage'))
|
|
},
|
|
})
|
|
})
|