This commit is contained in:
Georges-Antoine Assi
2026-07-26 14:14:07 -04:00
parent 9e5582230d
commit cd48aa761f
4 changed files with 4 additions and 12 deletions
+1 -6
View File
@@ -1,11 +1,6 @@
import { defineConfig, devices } from "@playwright/test";
// End-to-end suite. Unlike the Vitest specs (which live beside the code under
// `src/**`), these drive a REAL running RomM instance: the app on
// E2E_BASE_URL, a live backend, and the fixture users seeded by
// `.github/scripts/seed_e2e_users.py`. They are deliberately kept out of `src/`
// and `test/` so Vitest's globs never pick them up.
//
// End-to-end suite.
// uv run python .github/scripts/seed_e2e_users.py # once, from the repo root
// npm run test:e2e
export default defineConfig({
@@ -80,8 +80,7 @@ const canRefresh = useCan("rom.refresh");
const canDownload = useCan("rom.download");
const hasDeleteGrant = useCan("rom.delete");
const canEditRom = useCan("rom.edit");
// Bulk delete hits `POST /roms/delete`, which gates on ROMS_WRITE; a bare
// DELETE grant projects to no scope, so both are required.
// Bulk delete hits `POST /roms/delete`, which gates on ROMS_WRITE
const canDelete = computed(() => hasDeleteGrant.value && canEditRom.value);
// `favorite` is the favourite collection — used to compute "are all
@@ -40,8 +40,7 @@ const platformsStore = storePlatforms();
const galleryRoms = storeGalleryRoms();
const canEdit = useCan("platform.edit");
const hasDeleteGrant = useCan("platform.delete");
// `DELETE /platforms/{id}` gates on PLATFORMS_WRITE; a bare DELETE grant
// projects to no scope, so both are required.
// `DELETE /platforms/{id}` gates on PLATFORMS_WRITE
const canDelete = computed(() => hasDeleteGrant.value && canEdit.value);
// ── Details edit form ──────────────────────────────────────────
@@ -70,8 +70,7 @@ const romsStore = storeRoms();
const canUpload = useCan("rom.upload");
const hasDeleteGrant = useCan("rom.delete");
// `DELETE /roms/{id}/files/{file_id}` gates on ROMS_WRITE; a bare DELETE grant
// projects to no scope, so both are required.
// `DELETE /roms/{id}/files/{file_id}` gates on ROMS_WRITE
const canDelete = computed(() => hasDeleteGrant.value && canUpload.value);
function errorMessage(err: unknown): string {