chore: remove duplicate copies of the site, download center and installers (WS-C)
The landing page, download pages, invite page, assetlinks and installers existed in two or three places; only site/ and the Forgejo feed are served. - apps/api-server/wwwroot: delete the stale site build, download/invite pages, .well-known copy, legacy static admin and 1.0.0 binaries. The API no longer serves static files (UseStaticFiles/fallbacks and the apk/zip blocker removed); the Next admin is the only admin UI. - Delete 19 tracked installers/packages (~568 MiB) under site/public/releases, apps/web/public/releases and wwwroot/releases; .gitignore blocks them. - apps/web: delete the download/releases pages, desktop-release.ts, the download.html and assetlinks copies, and the accept-invite page (invites are only issued to the site's /accept-invite/). e2e specs call the /app base path and check the /download redirect instead. - scripts: delete the retired release/NAS site scripts, drop the web target from sync-version, and check assetlinks in site/public only. - Delete the unused Dockerfile.admin (apps/admin/Dockerfile is used). Policy: docs/REFACTOR_POLICY.md Wave 3, W3-5 and W3-6.
This commit is contained in:
parent
b6fe588a7c
commit
cd9d199dbf
53 changed files with 43 additions and 3278 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { test, expect } from '@playwright/test';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { SITE_URLS } from '@d3ro/core/web-urls';
|
||||
|
||||
const SCREENSHOT_DIR = path.resolve('C:/Users/encep/.gemini/antigravity/brain/bbff18a3-721d-4c43-989f-1d6964e15be7/screenshots');
|
||||
|
||||
|
|
@ -21,9 +22,9 @@ test.describe.serial('Extreme Red Team - Cycle 4: Web Console & Public Surfaces'
|
|||
});
|
||||
});
|
||||
|
||||
test('RT-14: Web Public Hub - /login, /download, /releases & /accept-invite', async ({ page }) => {
|
||||
test('RT-14: Web Public Hub - /login and the /download redirect to the landing site', async ({ page }) => {
|
||||
// 1. Test /login
|
||||
await page.goto('/login');
|
||||
await page.goto('/app/login');
|
||||
await page.waitForLoadState('domcontentloaded');
|
||||
|
||||
await expect(page.getByText(/D3RO[- ]VOICE/i)).toBeVisible({ timeout: 10000 });
|
||||
|
|
@ -35,49 +36,10 @@ test.describe.serial('Extreme Red Team - Cycle 4: Web Console & Public Surfaces'
|
|||
path: path.join(SCREENSHOT_DIR, 'rt14_01_web_login.png'),
|
||||
});
|
||||
|
||||
// 2. Test /download
|
||||
await page.goto('/download');
|
||||
await page.waitForLoadState('domcontentloaded');
|
||||
|
||||
await expect(page.getByText(/OFFICIAL STABLE RELEASE|D3RO Voice Desktop 1.1.0/i).first()).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.getByText(/Windows|macOS/i).first()).toBeVisible();
|
||||
|
||||
const primaryDownloadBtn = page.getByRole('link', { name: /Download for Windows/i });
|
||||
await expect(primaryDownloadBtn).toBeVisible();
|
||||
await expect(primaryDownloadBtn).toHaveAttribute('href', '/releases/1.1.0/D3RO-Voice-Setup-1.1.0-x64.exe');
|
||||
await expect(primaryDownloadBtn).toHaveAttribute('download', 'D3RO-Voice-Setup-1.1.0-x64.exe');
|
||||
|
||||
const cardDownloadBtn = page.getByRole('link', { name: /Download Setup \(\.exe\)/i });
|
||||
await expect(cardDownloadBtn).toBeVisible();
|
||||
await expect(cardDownloadBtn).toHaveAttribute('href', '/releases/1.1.0/D3RO-Voice-Setup-1.1.0-x64.exe');
|
||||
|
||||
// Verify static release asset HTTP availability
|
||||
const releaseHead = await page.request.head('/releases/1.1.0/D3RO-Voice-Setup-1.1.0-x64.exe');
|
||||
expect(releaseHead.status()).toBe(200);
|
||||
expect(Number(releaseHead.headers()['content-length'])).toBeGreaterThan(100000000);
|
||||
|
||||
// Screenshot download
|
||||
await page.screenshot({
|
||||
path: path.join(SCREENSHOT_DIR, 'rt14_02_web_download.png'),
|
||||
});
|
||||
|
||||
// 3. Test /releases
|
||||
await page.goto('/releases');
|
||||
await page.waitForLoadState('domcontentloaded');
|
||||
|
||||
await expect(page.getByText(/OFFICIAL STABLE RELEASE|D3RO Voice Desktop 1.1.0/i).first()).toBeVisible({ timeout: 10000 });
|
||||
await expect(page.getByRole('link', { name: /Download for Windows/i })).toBeVisible();
|
||||
|
||||
// Screenshot releases
|
||||
await page.screenshot({
|
||||
path: path.join(SCREENSHOT_DIR, 'rt14_03_web_releases.png'),
|
||||
});
|
||||
|
||||
// 4. Test /accept-invite
|
||||
await page.goto('/accept-invite?token=red-team-bogus-token');
|
||||
await page.waitForLoadState('domcontentloaded');
|
||||
|
||||
await expect(page.getByText(/TEAM INVITE|초대/i).first()).toBeVisible({ timeout: 10000 });
|
||||
// 2. /download lives only on the landing site; the web app just redirects there.
|
||||
const downloadRes = await page.request.get('/app/download', { maxRedirects: 0 });
|
||||
expect([307, 308]).toContain(downloadRes.status());
|
||||
expect(downloadRes.headers()['location']).toBe(SITE_URLS.download);
|
||||
|
||||
expect(uncaughtExceptions).toEqual([]);
|
||||
});
|
||||
|
|
@ -98,7 +60,7 @@ test.describe.serial('Extreme Red Team - Cycle 4: Web Console & Public Surfaces'
|
|||
];
|
||||
|
||||
for (const route of protectedRoutes) {
|
||||
await page.goto(route);
|
||||
await page.goto(`/app${route}`);
|
||||
await page.waitForURL(/\/login/, { timeout: 10000 });
|
||||
expect(page.url()).toContain('/login');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue