mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
Verify private-auth help through production rendering
Match the Docs sanitizer's class-free code blocks and the frontend build's Tailwind working directory. The first browser attempt stopped at the obsolete language-class selector; retain it rather than treating it as a page pass. Contract-Neutral: Browser fixture correction only; shipped guide bytes and runtime contracts are unchanged. Change-source: pulse-maintainer
This commit is contained in:
@@ -9,6 +9,9 @@ const { chromium, webkit } = require('playwright');
|
||||
const root = path.resolve('frontend-modern');
|
||||
const artifacts = path.join(root, 'node_modules', 'private-auth-help-browser');
|
||||
fs.mkdirSync(artifacts, { recursive: true });
|
||||
// Tailwind resolves its config/content from cwd, as the normal npm build
|
||||
// does. The tool is still invoked from the assigned repository root.
|
||||
process.chdir(root);
|
||||
const { createServer } = await import(path.join(root, 'node_modules/vite/dist/node/index.js'));
|
||||
const server = await createServer({
|
||||
root, configFile: path.join(root, 'vite.config.ts'),
|
||||
@@ -45,7 +48,8 @@ const { chromium, webkit } = require('playwright');
|
||||
'does not scrub its original value', 'this new-container example is not an upgrade procedure'])
|
||||
assert.ok(text.includes(phrase), phrase);
|
||||
assert.ok(!text.includes('secret123'));
|
||||
const shell = await page.locator('pre code.language-bash').allTextContents();
|
||||
// The production Docs sanitizer removes Markdown language classes.
|
||||
const shell = await page.locator('pre code').allTextContents();
|
||||
assert.ok(shell.some((block) => block.includes('--env-file "$HOME/.config/pulse/docker-auth.env"')));
|
||||
assert.ok(shell.every((block) => !/-e\s+PULSE_AUTH_(PASS|USER)=/.test(block)));
|
||||
const firstLogin = page.getByRole('link', { name: 'First login', exact: true });
|
||||
|
||||
Reference in New Issue
Block a user