Compare commits

..

1 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
cbb5ddca0a Initial plan 2026-03-04 04:55:04 +00:00
3 changed files with 12 additions and 24 deletions

View File

@@ -55,6 +55,11 @@ jobs:
npm install
npx playwright install --with-deps chromium
- name: Generate fixtures
run: |
node tests/e2e/scripts/generate-fixtures.mjs
python3 tests/e2e/scripts/generate-office-fixtures.py
- name: Start fixture server
run: |
cd tests/e2e/fixtures

View File

@@ -24,9 +24,8 @@ if (!fs.existsSync(zipPath)) {
fs.writeFileSync(path.join(zipWork, 'inner.txt'), 'kkFileView zip inner file');
try {
execFileSync('zip', ['-X', '-q', '-r', zipPath, 'inner.txt'], { cwd: zipWork });
} catch (err) {
console.error('Failed to create sample.zip fixture. Ensure "zip" is installed and available in PATH.');
throw err instanceof Error ? err : new Error(String(err));
} catch {
// fallback: keep going if zip is not available locally
}
}

View File

@@ -13,28 +13,12 @@ async function openPreview(request: any, fileUrl: string) {
test.beforeAll(async () => {
const api = await playwrightRequest.newContext();
const required = [
'sample.txt',
'sample.md',
'sample.json',
'sample.xml',
'sample.csv',
'sample.html',
'sample.png',
'sample.docx',
'sample.xlsx',
'sample.pptx',
'sample.zip',
];
try {
for (const name of required) {
const resp = await api.get(`${fixtureBase}/${name}`);
expect(resp.ok(), `fixture missing or unavailable: ${name}`).toBeTruthy();
}
} finally {
await api.dispose();
const required = ['sample.txt', 'sample.docx', 'sample.xlsx', 'sample.pptx', 'sample.zip'];
for (const name of required) {
const resp = await api.get(`${fixtureBase}/${name}`);
expect(resp.ok(), `fixture missing or unavailable: ${name}`).toBeTruthy();
}
await api.dispose();
});
test('01 home/index reachable', async ({ request }) => {