mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* chore: reduce repetitive tests; remove tests for unreachable pages * chore: merge all tests for Settings tabs into one file to avoid setup repetition * feat: add a test for the collapsed sidebar * feat: fix earn, stake, bridge, swap tests * fix: Welcome page tests * fix: NFTs and Positions tests * fix: spaces tests setup with a real space instead of mocks * feat: spaces dashboard tests * feat: new visual tests for Spaces Settings, Secutiry Hub and Activity Log * chore: removed unused mock files * feat: add tests for Spaces AB, Members and Safe Accounts in Spaces * chore: update `COVERAGE.md` for visual regression tests
52 lines
1.9 KiB
JavaScript
52 lines
1.9 KiB
JavaScript
import * as constants from '../../support/constants.js'
|
|
import * as main from '../pages/main.page.js'
|
|
import { getSafes, CATEGORIES } from '../../support/safes/safesHandler.js'
|
|
import { mockVisualTestApis } from '../../support/visual-mocks.js'
|
|
|
|
let staticSafes = []
|
|
|
|
const settingsSuite = (title, tests) => {
|
|
describe(title, { defaultCommandTimeout: 60000, ...constants.VISUAL_VIEWPORT }, () => {
|
|
before(async () => {
|
|
staticSafes = await getSafes(CATEGORIES.static)
|
|
})
|
|
|
|
beforeEach(() => {
|
|
mockVisualTestApis()
|
|
})
|
|
|
|
tests()
|
|
})
|
|
}
|
|
|
|
const screenshotSettingsPage = (label, url) => {
|
|
it(label, () => {
|
|
cy.visit(url + staticSafes.SEP_STATIC_SAFE_4)
|
|
main.awaitVisualStability()
|
|
})
|
|
}
|
|
|
|
settingsSuite('[VISUAL] Settings pages screenshots', () => {
|
|
screenshotSettingsPage('[VISUAL] Screenshot setup page', constants.setupUrl)
|
|
screenshotSettingsPage('[VISUAL] Screenshot appearance settings page', constants.appearanceSettingsUrl)
|
|
screenshotSettingsPage('[VISUAL] Screenshot modules page', constants.modulesUrl)
|
|
screenshotSettingsPage('[VISUAL] Screenshot notifications settings page', constants.notificationsUrl)
|
|
})
|
|
|
|
settingsSuite('[VISUAL] Cookie settings screenshots', () => {
|
|
screenshotSettingsPage('[VISUAL] Screenshot cookie preferences page', constants.cookiesUrl)
|
|
})
|
|
|
|
settingsSuite('[VISUAL] Data and Security settings screenshots', () => {
|
|
screenshotSettingsPage('[VISUAL] Screenshot data settings page', constants.dataSettingsUrl)
|
|
screenshotSettingsPage('[VISUAL] Screenshot security settings page', constants.securityUrl)
|
|
})
|
|
|
|
settingsSuite('[VISUAL] Safe Apps settings screenshots', () => {
|
|
screenshotSettingsPage('[VISUAL] Screenshot Safe Apps permissions settings page', constants.safeAppsSettingsUrl)
|
|
})
|
|
|
|
settingsSuite('[VISUAL] Environment variables settings screenshots', () => {
|
|
screenshotSettingsPage('[VISUAL] Screenshot environment variables settings page', constants.envVariablesUrl)
|
|
})
|