feat: media duplicate purge, part 3 of 3: the SPA (Settings "Media cleanup" card, PurgeDuplicatesDialog, Media Duplicates toolbar button)
This commit is contained in:
1 parent
1a55a39425
commit
2303b12377
26 files changed
+3856
-83
No files matched your search
@@ -32,6 +32,8 @@ import {
|
||||
updateSucceeded,
|
||||
verifying,
|
||||
visibleButtonLabels,
|
||||
DEFAULT_PURGE_SETTINGS,
|
||||
PURGE_SETTINGS_PATH,
|
||||
} from './updateTestKit'
|
||||
|
||||
vi.mock('@/composables/useApi', async (importOriginal) => {
|
||||
@@ -135,6 +137,9 @@ async function mountSettings(options: MountOptions) {
|
||||
}
|
||||
const handler = handlers[path]
|
||||
if (!handler) {
|
||||
if (path === PURGE_SETTINGS_PATH) {
|
||||
return Promise.resolve(DEFAULT_PURGE_SETTINGS)
|
||||
}
|
||||
throw new Error(`Unexpected request: ${path}`)
|
||||
}
|
||||
return handler()
|
||||
@@ -262,6 +267,9 @@ function silenceStatusReads() {
|
||||
if (path === STATUS_PATH) {
|
||||
return Promise.reject(new NetworkError())
|
||||
}
|
||||
if (path === PURGE_SETTINGS_PATH) {
|
||||
return Promise.resolve(DEFAULT_PURGE_SETTINGS)
|
||||
}
|
||||
throw new Error(`Unexpected request: ${path}`)
|
||||
})
|
||||
}
|
||||
@@ -650,6 +658,9 @@ describe('Settings, the overlay ends when the site answers', () => {
|
||||
if (path === STATUS_PATH) {
|
||||
return answers()
|
||||
}
|
||||
if (path === PURGE_SETTINGS_PATH) {
|
||||
return Promise.resolve(DEFAULT_PURGE_SETTINGS)
|
||||
}
|
||||
throw new Error(`Unexpected request: ${path}`)
|
||||
})
|
||||
siteUp = healthy
|
||||
|
||||
Reference in new issue
Block a user