Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions e2e/history.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test('history filters applied jobs and reopens the exact old resume after reload
);
await drawer.getByRole('tab', { name: 'Resumes', exact: true }).click();
await expect(
drawer.getByText('2 saved resumes · Frontend Engineer · Example Co', { exact: true })
drawer.getByLabel('2 saved resumes for Frontend Engineer at Example Co')
).toBeVisible();
await drawer.getByRole('tab', { name: 'Details', exact: true }).click();
await drawer.getByLabel('Notes', { exact: true }).fill('Review-first UI check');
Expand All @@ -138,15 +138,13 @@ test('history filters applied jobs and reopens the exact old resume after reload
await history.getByRole('textbox', { name: 'Search jobs' }).fill('');

await expect(history).toBeVisible();
await history.getByRole('button', { name: 'Applied and later (1)' }).click();
await history.getByRole('button', { name: 'Applied jobs (1)' }).click();
await expect(history.getByRole('button', { name: 'Agents Engineer', exact: true })).toBeVisible();
await expect(history.getByRole('button', { name: 'Frontend Engineer', exact: true })).toHaveCount(
0
);
await history.getByRole('button', { name: 'All jobs (3)' }).click();
await history
.getByText('2 saved resumes · Frontend Engineer · Example Co', { exact: true })
.click();
await history.getByLabel('2 saved resumes for Frontend Engineer at Example Co').click();
const versionLink = history.locator('a[href*="version=version-old"]');
const downloadPromise = page.waitForEvent('download');
await history.getByRole('button', { name: 'Download Markdown', exact: true }).nth(1).click();
Expand Down
42 changes: 34 additions & 8 deletions e2e/mobile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,24 @@ async function expectNoHorizontalScroll(page: Page) {
}

test.describe('mobile (390px)', () => {
test('dashboard has no horizontal scroll and a working hamburger', async ({ page }) => {
await page.goto('/dashboard');
await expect(page.getByRole('link', { name: /create|new resume/i })).toBeVisible();
test('Jobs has visible primary links and an accessible workspace menu', async ({ page }) => {
await page.goto('/jobs');
const primary = page.getByRole('navigation', { name: 'Primary', exact: true });
await expect(primary.getByRole('link')).toHaveCount(3);
await expect(primary.getByRole('link', { name: 'Jobs', exact: true })).toHaveAttribute(
'aria-current',
'page'
);
await expectNoHorizontalScroll(page);

// Desktop nav links are hidden; the hamburger reveals them.
const hamburger = page.getByRole('button', { name: /open menu/i });
const hamburger = page.getByRole('button', { name: 'Toggle Sidebar' });
await expect(hamburger).toBeVisible();
await hamburger.click();
await expect(page.getByRole('link', { name: 'Pricing' })).toBeVisible();
const drawer = page.getByRole('dialog', { name: 'Workspace menu' });
await expect(drawer.getByRole('link', { name: 'History' })).toBeVisible();
await page.keyboard.press('Escape');
await expect(drawer).toBeHidden();
await expect(hamburger).toBeFocused();
});

test('pricing cards stack to a single column', async ({ page }) => {
Expand All @@ -34,15 +42,33 @@ test.describe('mobile (390px)', () => {
});

test('resume editor is usable at mobile width', async ({ page }) => {
await page.goto('/dashboard');
await page.getByRole('link', { name: /create|new resume/i }).click();
await page.goto('/resume-builder');
await page.evaluate(() => {
localStorage.setItem(
'rt-resumes',
JSON.stringify([
{
id: 'mobile-editor',
name: 'Mobile editor sample',
source: '# Alex Morgan\n\n## Experience\n- Wrote clear docs.\n',
created_at: 1,
updated_at: 1,
},
])
);
});
await page.goto('/editor/mobile-editor');

// CodeMirror editor mounts and is reachable.
await expect(page.locator('.cm-editor')).toBeVisible({ timeout: 10000 });
const editor = page.locator('.cm-content');
await editor.click();
await editor.pressSequentially('# Tailor flow mobile test');
await expect(editor).toContainText('Tailor flow mobile test');
await expect(editor).toBeFocused();
await page.getByRole('button', { name: 'Save', exact: true }).click();
await page.reload();
await expect(page.locator('.cm-content')).toContainText('Tailor flow mobile test');

await expectNoHorizontalScroll(page);
});
Expand Down
7 changes: 4 additions & 3 deletions e2e/public-performance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test('account menu becomes usable after a synthetic session loads its account-on
await page.getByRole('button', { name: 'Toggle Sidebar', exact: true }).click();
}
if (path === '/resume-builder') {
await expect(page.locator('[data-sidebar="sidebar"]')).toHaveCSS(
await expect(page.locator('[data-sidebar="sidebar"]').filter({ visible: true })).toHaveCSS(
'background-color',
'oklch(0.985 0 0)'
);
Expand Down Expand Up @@ -83,10 +83,11 @@ test('tools keeps all cards and loads the selected tool on navigation', async ({
prefetched.push(request.url());
});
await page.goto('/tools');
await expect(page.getByRole('link', { name: /Use tool/ })).toHaveCount(6);
const toolLinks = page.getByRole('main').locator('a[href^="/tools/"]');
await expect(toolLinks).toHaveCount(6);
await page.waitForLoadState('networkidle');
expect(prefetched).toEqual([]);
await page.getByRole('link', { name: /ATS Keyword Checker/ }).click();
await page.getByRole('main').locator('a[href="/tools/keywords"]').click();
await expect(page).toHaveURL(/\/tools\/keywords$/);
await expect(page.locator('textarea').first()).toBeVisible();
await expect(page.locator('textarea').nth(1)).toBeVisible();
Expand Down
31 changes: 31 additions & 0 deletions e2e/resume-builder.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
import { expect, test } from '@playwright/test';

test('the experience form is reachable by keyboard and restores focus when closed', async ({
page,
}) => {
await page.goto('/resume-builder/evidence');
const add = page.getByRole('button', { name: /add experience/i });
await add.focus();
await page.keyboard.press('Enter');
const form = page.getByRole('dialog', { name: 'Add experience' });
await expect(form).toBeVisible();
await page.keyboard.press('Escape');
await expect(form).toBeHidden();
await expect(add).toBeFocused();

await page.keyboard.press('Enter');
await form.getByLabel('Title', { exact: true }).fill('Launch checklist');
await form
.getByLabel('Your contribution and result')
.fill('Organized launch reviews for the product team.');
await form.getByRole('button', { name: 'Save', exact: true }).click();
await expect(page.getByRole('button', { name: /launch checklist/i })).toBeVisible();
await expect(add).toBeFocused();
});

test('Outline edits, pins and added projects survive reload and legacy links open the same workspace', async ({
page,
}, testInfo) => {
Expand All @@ -19,6 +42,14 @@ test('Outline edits, pins and added projects survive reload and legacy links ope
);
await page.reload();
await expect(page.getByRole('heading', { name: 'Resume Builder', exact: true })).toBeVisible();
if (testInfo.project.name === 'mobile') {
await page.getByRole('button', { name: 'Toggle Sidebar' }).click();
const menu = page.getByRole('dialog', { name: 'Workspace menu' });
await menu.getByRole('link', { name: 'Projects', exact: true }).click();
await expect(menu).toBeHidden();
await expect(page.locator('#section-2')).toBeFocused();
await page.goto('/resume-builder');
}
await page
.getByRole('button', { name: 'Edit achievement 1: Built React screens.', exact: true })
.click();
Expand Down
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@
"docs:check": "node scripts/check-docs.mjs",
"knip": "knip --no-exit-code --reporter symbols",
"knip:strict": "knip --reporter symbols",
"check:ui-library": "node scripts/check-ui-library.mjs",
"quality:unused": "node scripts/check-code-health.mjs unused",
"quality:complexity": "node scripts/check-code-health.mjs complexity",
"quality:duplication": "node scripts/check-code-health.mjs duplication",
"quality:cycles": "node scripts/check-code-health.mjs cycles",
"quality:dependencies": "node scripts/check-code-health.mjs dependencies",
"quality:suppressions": "node scripts/check-code-health.mjs suppressions",
"quality:hygiene": "node scripts/check-code-health.mjs hygiene",
"quality": "pnpm quality:cache-security && pnpm check && pnpm typecheck && pnpm test:coverage && pnpm docs:check && pnpm --filter @rolepatch/extension typecheck && pnpm quality:unused && pnpm quality:complexity && pnpm quality:duplication && pnpm quality:cycles && pnpm quality:dependencies && pnpm quality:suppressions && pnpm quality:hygiene",
"quality": "pnpm quality:cache-security && pnpm check && pnpm check:ui-library && pnpm typecheck && pnpm test:coverage && pnpm docs:check && pnpm --filter @rolepatch/extension typecheck && pnpm quality:unused && pnpm quality:complexity && pnpm quality:duplication && pnpm quality:cycles && pnpm quality:dependencies && pnpm quality:suppressions && pnpm quality:hygiene",
"resume:mcp": "node scripts/resume-mcp.mjs",
"quality:cache-security": "node scripts/check-http-cache-security.mjs && node --test scripts/http-cache-security.test.mjs"
},
"dependencies": {
"@saas-maker/ui": "github:sass-maker/ui-library#v0.1.18&path:/packages/ui",
"@ai-sdk/openai-compatible": "2.0.41",
"@better-auth/mcp": "1.7.7",
"@cloudflare/puppeteer": "^1.1.0",
Expand All @@ -82,20 +82,12 @@
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.43.6",
"@mozilla/readability": "^0.6.0",
"@radix-ui/react-avatar": "1.2.7",
"@radix-ui/react-dialog": "1.2.0",
"@radix-ui/react-dropdown-menu": "2.1.25",
"@radix-ui/react-label": "2.1.16",
"@radix-ui/react-separator": "1.1.16",
"@radix-ui/react-slot": "1.4.0",
"@radix-ui/react-tabs": "1.1.22",
"@radix-ui/react-tooltip": "1.3.0",
"@saas-maker/app-health": "https://github.com/sass-maker/app-health/releases/download/node-v0.4.0/saas-maker-app-health-0.4.0.tgz",
"@saas-maker/feedback": "^0.4.0",
"@saas-maker/ui": "github:sass-maker/ui-library#v0.1.36&path:/packages/ui",
"@sparticuz/chromium": "^147.0.2",
"ai": "6.0.168",
"better-auth": "1.7.7",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"codemirror": "^6.0.2",
"dodopayments": "^2.43.0",
Expand Down
Loading
Loading