Files
Liliya SorokaandGitHub 0fec2d04ca tests(web):add safe-shield e2e tests -structure and threat analysis
* 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
2025-11-25 14:46:52 +01:00

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'))
},
})
})