Compare commits

..

No commits in common. "f11e8a5d13b96982413f646c47de39a881267dfd" and "c29ec6b5d0e2c7a5f74d1d922a09a6cdea4db763" have entirely different histories.

4 changed files with 4 additions and 37 deletions

View file

@ -1,18 +1,16 @@
name: Frontend checks
name: CI
on:
pull_request:
branches: [main, dev]
push:
branches: [main, dev]
workflow_dispatch: {}
permissions:
contents: read
jobs:
build-and-test:
name: Build and test
ci:
# Org reusable workflow (Node 24): format check, lint, build, unit tests.
uses: Sea-Haven-Industries/.github/.github/workflows/ci-typescript-frontend.yaml@main
with:
@ -30,10 +28,9 @@ jobs:
# GOVERNANCE_BASE points the changed-file gate at the right diff:
# PR -> the PR target branch (origin/<base_ref>)
# push-> the previous commit on the branch (github.event.before)
# manual -> dev, for exact-head recovery runs
runs-on: ubuntu-latest
env:
GOVERNANCE_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event_name == 'push' && github.event.before || 'origin/dev' }}
GOVERNANCE_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before }}
steps:
- uses: actions/checkout@v4
with:
@ -46,7 +43,6 @@ jobs:
- run: npm run verify
visual-regression:
name: Visual regression
runs-on: ubuntu-latest
container: mcr.microsoft.com/playwright:v1.61.1-noble
steps:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 117 KiB

View file

@ -195,6 +195,7 @@ function DrawerBody({
return (
<Stack spacing={3} className="flex-1 overflow-y-auto" sx={{ p: 2.5 }}>
<Box>
<SectionTitle>Company</SectionTitle>
<CompanySection roster={roster} />
</Box>
<Divider />

View file

@ -313,36 +313,6 @@ describe("VendorDetailDrawer design parity", () => {
expect(screen.getAllByText("Gateway Plumbing").length).toBeGreaterThan(0);
});
it("shows exactly one Company label above the company value in view mode", () => {
useVendorCompanyRoster.mockReturnValue(
rosterWith([{ id: 1, contactName: "Adam", phone: "", isActive: true, totalJobs: 5 }]),
);
renderWithProviders(<VendorDetailDrawer open={true} vendor={vendor} onClose={vi.fn()} />, {
route: "/vendors",
withAuth: false,
});
expect(screen.getAllByText("Company")).toHaveLength(1);
expect(screen.getAllByText("Gateway Plumbing").length).toBeGreaterThan(0);
});
it("keeps the Notes section heading when notes exist", () => {
const roster = rosterWith([
{ id: 1, contactName: "Adam", phone: "", isActive: true, totalJobs: 5 },
]);
roster.data.notes = "Preferred after-hours vendor";
useVendorCompanyRoster.mockReturnValue(roster);
renderWithProviders(<VendorDetailDrawer open={true} vendor={vendor} onClose={vi.fn()} />, {
route: "/vendors",
withAuth: false,
});
expect(screen.getByText("Notes")).toBeInTheDocument();
expect(screen.getByText("Preferred after-hours vendor")).toBeInTheDocument();
});
it("labels the Google Maps field below Address even when no URL is stored", () => {
useVendorCompanyRoster.mockReturnValue(
rosterWith([{ id: 1, contactName: "Adam", phone: "", isActive: true, totalJobs: 5 }]),