Skip to content

Commit 31c6092

Browse files
HuanCheng65claude
andcommitted
feat(web/admin): add breadcrumb to queue view, wrap in AdminShell
Replaces the old page-shell header with AdminShell sidebar wrapper, adds breadcrumb nav (← Labs / {labId} / Queue), adds a Refresh button, and removes the old admin-queue-view__header CSS. Updates both AdminQueueView.test.ts and ProfileView.test.ts to provide a router context (required by AdminShell's RouterLink/useRouter usage). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 66f438a commit 31c6092

3 files changed

Lines changed: 209 additions & 187 deletions

File tree

apps/web/src/views/AdminQueueView.test.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { afterEach, describe, expect, it, vi } from 'vitest';
22
import { createApp, nextTick } from 'vue';
3+
import { createMemoryHistory, createRouter } from 'vue-router';
34
import AdminQueueView from './AdminQueueView.vue';
45

56
async function flush() {
@@ -18,10 +19,22 @@ function jsonResponse(payload: unknown, status = 200) {
1819
}
1920

2021
async function mountQueue(url = '/admin/labs/sorting/queue') {
22+
const router = createRouter({
23+
history: createMemoryHistory(),
24+
routes: [
25+
{ path: '/admin/login', name: 'admin-login', component: { template: '<div>login</div>' } },
26+
{ path: '/admin/labs', name: 'admin-labs', component: { template: '<div>labs</div>' } },
27+
{ path: '/admin/labs/:labID/queue', name: 'admin-queue', component: AdminQueueView }
28+
]
29+
});
30+
await router.push(url);
31+
await router.isReady();
32+
window.history.pushState({}, '', url);
33+
2134
const el = document.createElement('div');
2235
document.body.appendChild(el);
23-
window.history.pushState({}, '', url);
2436
const app = createApp(AdminQueueView);
37+
app.use(router);
2538
app.mount(el);
2639
await flush();
2740
return {

0 commit comments

Comments
 (0)