Add Makefile, package.json, and initial configuration for VitePress and Slidev integration
- Introduced a Makefile for streamlined commands related to building, running, and managing presentations. - Created package.json to define project metadata, dependencies, and scripts for development and testing. - Added .gitignore entries to exclude build artifacts and temporary files from version control. - Included playwright.config.mjs for end-to-end testing setup with Playwright. - Added README.md for project documentation, outlining setup instructions and development guidelines.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// @ts-check
|
||||
import { readFileSync } from 'fs'
|
||||
import { join as pathJoin } from 'path'
|
||||
import { test, expect } from '@playwright/test'
|
||||
|
||||
const presJson = pathJoin(process.cwd(), 'portal', '.vitepress', 'data', 'presentations.json')
|
||||
const SLUGS = JSON.parse(readFileSync(presJson, 'utf8')).map((p) => p.slug)
|
||||
|
||||
const ROUTES = ['/', '/presentations/', ...SLUGS.map((s) => `/presentations/${s}/`)]
|
||||
|
||||
test.describe('HTTP / routes statiques', () => {
|
||||
for (const route of ROUTES) {
|
||||
test(`GET ${route} → 200`, async ({ request }) => {
|
||||
const res = await request.get(route)
|
||||
expect(res.ok(), await res.text()).toBeTruthy()
|
||||
})
|
||||
}
|
||||
|
||||
test('GET slides decks → 200', async ({ request }) => {
|
||||
for (const slug of SLUGS) {
|
||||
const res = await request.get(`/slides/${slug}/1`)
|
||||
expect(res.ok(), `slides ${slug}: ${await res.text()}`).toBeTruthy()
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user