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
30 lines
689 B
JavaScript
30 lines
689 B
JavaScript
export const CATEGORIES = {
|
|
funds: 'funds',
|
|
nfts: 'nfts',
|
|
static: 'static',
|
|
safeapps: 'safeapps',
|
|
recovery: 'recovery',
|
|
}
|
|
|
|
function loadSafesModule(categoryKey) {
|
|
const category = CATEGORIES[categoryKey]
|
|
if (!category) {
|
|
throw new Error(`Category key '${categoryKey}' is not recognized.`)
|
|
}
|
|
|
|
if (category === 'static') {
|
|
return import('../../fixtures/safes/static.js').then((module) => module.default)
|
|
}
|
|
|
|
return cy.fixture(`safes/${category}.json`).then((data) => {
|
|
return data
|
|
})
|
|
}
|
|
|
|
export function getSafes(categoryKey) {
|
|
return loadSafesModule(categoryKey).then((safes) => {
|
|
console.log(`Loaded ${categoryKey}:`, safes)
|
|
return safes
|
|
})
|
|
}
|