Skip to content

Commit 3e3d64d

Browse files
committed
fix(FR-2875,FR-2876): correct smoke tag-role pairings and ignore branch lockfiles
1 parent 279ab29 commit 3e3d64d

6 files changed

Lines changed: 17 additions & 25655 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,6 @@ e2e/.agent-output/
179179

180180

181181
e2e/recordings/
182+
183+
# ignore stale branch-suffixed pnpm lockfiles (see PR #7340)
184+
pnpm-lock.*-*.yaml

e2e/E2E-TEST-NAMING-GUIDELINES.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,12 @@ following:
442442
5. **No outbound dependencies.** Smoke runs on air-gapped hosts. Specs must
443443
not call `fetch('https://...')` for any host other than the WebUI endpoint
444444
itself.
445+
6. **Describe-level tags apply to every nested test.** The role tag must
446+
reflect the highest privilege any test inside the describe needs. If a
447+
describe mixes `loginAsAdmin` and `loginAsUser` calls, tag it
448+
`@smoke-admin` — admin credentials are the broader superset and the
449+
describe is only runnable in admin mode. Splitting into two describes is
450+
preferred when feasible; pragmatic tagging is acceptable for MVP.
445451

446452
### How to apply
447453

@@ -456,7 +462,7 @@ test.describe(
456462
() => { /* ... */ },
457463
);
458464

459-
// After — added @smoke and @smoke-user
465+
// After — added @smoke and @smoke-admin (beforeEach uses loginAsAdmin)
460466
test.describe(
461467
'Session Lifecycle Management',
462468
{
@@ -465,7 +471,7 @@ test.describe(
465471
'@session',
466472
'@functional',
467473
'@smoke',
468-
'@smoke-user',
474+
'@smoke-admin',
469475
],
470476
},
471477
() => { /* ... */ },
@@ -479,8 +485,8 @@ A spec without a `tag:` option needs one added — never strip existing tags.
479485
The initial smoke set covers the highest-signal flows:
480486

481487
- Login / authentication → `@smoke-any`
482-
- Dashboard render → `@smoke-any`
483-
- Session lifecycle (create → running → terminate) → `@smoke-user`
488+
- Dashboard render → `@smoke-admin` (describe mixes admin + user logins)
489+
- Session lifecycle (create → running → terminate) → `@smoke-admin` (uses `loginAsAdmin`)
484490
- VFolder basic CRUD → `@smoke-user`
485491
- Agent list (admin signal) → `@smoke-admin`
486492

e2e/dashboard/dashboard.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const WIDGET_TIMEOUT = 30_000;
1212
test.describe(
1313
'Dashboard Page',
1414
{
15-
tag: ['@regression', '@dashboard', '@functional', '@smoke', '@smoke-any'],
15+
tag: ['@regression', '@dashboard', '@functional', '@smoke', '@smoke-admin'],
1616
},
1717
() => {
1818
// -----------------------------------------------------------------------

e2e/session/session-lifecycle.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { test, expect } from '@playwright/test';
2626
test.describe(
2727
'Session Lifecycle Management',
2828
{
29-
tag: ['@critical', '@session', '@functional', '@smoke', '@smoke-user'],
29+
tag: ['@critical', '@session', '@functional', '@smoke', '@smoke-admin'],
3030
},
3131
() => {
3232
// Run tests sequentially to avoid resource exhaustion

packages/backend.ai-webui-smoke-cli/src/catalog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ export const SMOKE_CATALOG: ReadonlyArray<SmokeCategory> = [
2929
{
3030
category: 'dashboard',
3131
description: 'Dashboard widgets render after login.',
32-
tags: ['@smoke', '@smoke-any'],
32+
tags: ['@smoke', '@smoke-admin'],
3333
specs: ['e2e/dashboard/dashboard.spec.ts'],
3434
},
3535
{
3636
category: 'session',
3737
description:
3838
'Session lifecycle: create batch session, wait for RUNNING, terminate.',
39-
tags: ['@smoke', '@smoke-user'],
39+
tags: ['@smoke', '@smoke-admin'],
4040
specs: ['e2e/session/session-lifecycle.spec.ts'],
4141
},
4242
{

0 commit comments

Comments
 (0)