Compare commits

...

2 commits

Author SHA1 Message Date
Alexandre Brandizzi
f11e8a5d13
fix(ci): replace ambiguous check names (#141)
Some checks are pending
Frontend checks / Build and test (push) Waiting to run
Frontend checks / governance (push) Waiting to run
Frontend checks / Visual regression (push) Waiting to run
Deploy / deploy (push) Waiting to run
* fix(ci): replace ambiguous check names

* fix(ci): clarify visual regression check

* chore(ci): refresh protected checks

* docs(ci): clarify compatibility removal

* fix(ci): add exact-head recovery trigger

* ci: remove legacy check name

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
2026-08-26 13:17:14 -04:00
Alexandre Brandizzi
338cc17b8a
fix(vendors): remove duplicate company heading (#139)
* fix(vendors): remove duplicate company heading

* test(vendors): align detail baseline with CI

---------

Co-authored-by: Codex Review Integration <codex-review@local.invalid>
Co-authored-by: Adam Moussa <166072409+amoussa1229@users.noreply.github.com>
2026-08-26 16:45:06 +00:00
4 changed files with 37 additions and 4 deletions

View file

@ -1,16 +1,18 @@
name: CI
name: Frontend checks
on:
pull_request:
branches: [main, dev]
push:
branches: [main, dev]
workflow_dispatch: {}
permissions:
contents: read
jobs:
ci:
build-and-test:
name: Build and test
# Org reusable workflow (Node 24): format check, lint, build, unit tests.
uses: Sea-Haven-Industries/.github/.github/workflows/ci-typescript-frontend.yaml@main
with:
@ -28,9 +30,10 @@ 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.before }}
GOVERNANCE_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event_name == 'push' && github.event.before || 'origin/dev' }}
steps:
- uses: actions/checkout@v4
with:
@ -43,6 +46,7 @@ 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: 117 KiB

After

Width:  |  Height:  |  Size: 115 KiB

View file

@ -195,7 +195,6 @@ 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,6 +313,36 @@ 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 }]),