Refactor dashboard and upload flows
Remove dead admin UI code, redesign dashboard followers/following and upload experiences, and add schema audit tooling with repair migrations for forum and upload drift.
This commit is contained in:
@@ -48,7 +48,7 @@ function installAxiosStubs({ statusValue = 'ready', initError = null, holdChunk
|
||||
return Promise.resolve({ data: { processing_state: statusValue, status: statusValue } })
|
||||
}
|
||||
|
||||
if (url === '/api/uploads/session-1/publish') {
|
||||
if (/^\/api\/uploads\/[^/]+\/publish$/.test(url)) {
|
||||
return Promise.resolve({ data: { success: true, status: 'published' } })
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ async function completeStep1ToReady() {
|
||||
|
||||
describe('UploadWizard step flow', () => {
|
||||
let originalImage
|
||||
let originalScrollTo
|
||||
let originalScrollIntoView
|
||||
let consoleErrorSpy
|
||||
|
||||
@@ -122,7 +123,9 @@ describe('UploadWizard step flow', () => {
|
||||
window.URL.revokeObjectURL = vi.fn()
|
||||
|
||||
originalImage = global.Image
|
||||
originalScrollTo = window.scrollTo
|
||||
originalScrollIntoView = Element.prototype.scrollIntoView
|
||||
window.scrollTo = vi.fn()
|
||||
Element.prototype.scrollIntoView = vi.fn()
|
||||
consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation((...args) => {
|
||||
const text = args.map((arg) => String(arg)).join(' ')
|
||||
@@ -143,6 +146,7 @@ describe('UploadWizard step flow', () => {
|
||||
|
||||
afterEach(() => {
|
||||
global.Image = originalImage
|
||||
window.scrollTo = originalScrollTo
|
||||
Element.prototype.scrollIntoView = originalScrollIntoView
|
||||
consoleErrorSpy?.mockRestore()
|
||||
cleanup()
|
||||
|
||||
Reference in New Issue
Block a user