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
2 changes: 1 addition & 1 deletion packages/app/src/features/jobs/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function JobsList() {
<tbody>{query.data.items.map(job => <tr key={job.id} className={tableRowClasses}>
<td className={`whitespace-nowrap ${tableCellClasses}`}><Badge active={job.enabled}>{job.enabled ? "Enabled" : "Disabled"}</Badge></td>
<td className={`whitespace-nowrap ${tableCellClasses} font-mono tabular-nums ${job.runningCount > 0 ? "font-semibold text-factorize-700 dark:text-factorize-500" : "text-slate-600 dark:text-slate-400"}`}>{job.runningCount}/{job.concurrencyLimit}</td>
<td className={tableCellClasses}><Link to="/jobs/$jobId" params={{ jobId: job.id }} title={job.name} className="block truncate font-semibold outline-none after:absolute after:inset-0 focus-visible:after:rounded-sm focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-factorize-500">{job.name}</Link></td>
<td className={tableCellClasses}><Link to="/jobs/$jobId" params={{ jobId: job.id }} title={job.name} className="relative block truncate font-semibold outline-none after:absolute after:inset-0 focus-visible:after:rounded-sm focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-factorize-500">{job.name}</Link></td>
</tr>)}</tbody>
</table>
</div>}
Expand Down
20 changes: 20 additions & 0 deletions packages/app/test/jobs.browser.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@ for (const width of [1280, 390, 320]) for (const theme of ["light", "dark"]) tes
await page.getByRole("heading", { name: "Alpha running", exact: true }).waitFor();
await context.close();
});
test("mobile jobs list only navigates when a job title is tapped", async () => {
const { page, context } = await contextFor({ viewport: { width: 390, height: 844 } });
const jobs = [
{ ...summary, id: "security-checker", name: "Security Checker Dispatcher" },
{ ...summary, id: "release-build", name: "Release build" },
];
await page.route("**/api/v1/job-summaries?**", route => route.fulfill({ json: { items: jobs, nextCursor: null } }));
await page.goto(origin + "/jobs");
const table = page.getByRole("table", { name: "Jobs", exact: true });
await table.getByRole("link", { name: "Security Checker Dispatcher", exact: true }).waitFor();

await page.getByRole("heading", { name: "Jobs", exact: true }).click();
await table.locator("tbody tr").nth(1).locator("td").first().click();
assert.match(page.url(), /\/jobs(?:\?|$)/);

await table.getByRole("link", { name: "Release build", exact: true }).click();
await page.waitForURL("**/jobs/release-build");
assert.equal(page.url().endsWith("/jobs/release-build"), true);
await context.close();
});
test("jobs can sort running and title in both directions with accessible state", async () => {
const { page, context } = await contextFor();
const fixtures = [
Expand Down
Loading