fix(web): address review feedback

This commit is contained in:
Adam Moussa 2026-09-25 16:45:14 -04:00
parent 36d9fcdc6c
commit ebdee0292c
No known key found for this signature in database
3 changed files with 6 additions and 4 deletions

View file

@ -8,6 +8,7 @@ test.describe("Invoice Processing filters (AP-43)", () => {
const before = await grid.locator(".MuiDataGrid-row").count(); const before = await grid.locator(".MuiDataGrid-row").count();
expect(before).toBeGreaterThan(0); expect(before).toBeGreaterThan(0);
await expect(page.getByTestId("action-filter").getByPlaceholder("Search")).toBeVisible();
await page.getByTestId("action-filter").click(); await page.getByTestId("action-filter").click();
await page.getByRole("option", { name: "Approve invoice" }).click(); await page.getByRole("option", { name: "Approve invoice" }).click();
await expect(page.getByTestId("filter-toggle").locator(".MuiBadge-badge")).toHaveText("1"); await expect(page.getByTestId("filter-toggle").locator(".MuiBadge-badge")).toHaveText("1");
@ -15,5 +16,6 @@ test.describe("Invoice Processing filters (AP-43)", () => {
await page.getByTestId("vendor-filter").fill("Harbor"); await page.getByTestId("vendor-filter").fill("Harbor");
await expect(page.getByTestId("filter-toggle").locator(".MuiBadge-badge")).toHaveText("2"); await expect(page.getByTestId("filter-toggle").locator(".MuiBadge-badge")).toHaveText("2");
await expect(grid.locator(".MuiDataGrid-row")).toHaveCount(1); await expect(grid.locator(".MuiDataGrid-row")).toHaveCount(1);
await expect(page.getByTestId("attention-banner")).toContainText("1 invoices require approval");
}); });
}); });

View file

@ -118,7 +118,7 @@ export function DashboardGrids() {
const selectedCount = countSelectedRows( const selectedCount = countSelectedRows(
selection, selection,
filteredApproved.map((invoice) => invoice.id), approvedRows.map((invoice) => invoice.id),
); );
const processRowUpdate = async (newRow: MockInvoice, oldRow: MockInvoice) => { const processRowUpdate = async (newRow: MockInvoice, oldRow: MockInvoice) => {
@ -218,7 +218,7 @@ export function DashboardGrids() {
</Box> </Box>
<Box sx={{ bgcolor: "background.paper", p: 2 }}> <Box sx={{ bgcolor: "background.paper", p: 2 }}>
{attentionRows.length > 0 && tab === "attention" ? ( {filteredAttention.length > 0 && tab === "attention" ? (
<Typography <Typography
component="button" component="button"
type="button" type="button"
@ -235,7 +235,7 @@ export function DashboardGrids() {
textAlign: "left", textAlign: "left",
}} }}
> >
{attentionRows.length} invoices require approval. Show invoices ready to approve. {filteredAttention.length} invoices require approval. Show invoices ready to approve.
</Typography> </Typography>
) : null} ) : null}

View file

@ -52,7 +52,7 @@ export function InvoiceFilterToolbar({
renderInput={(params) => ( renderInput={(params) => (
<TextField <TextField
{...params} {...params}
placeholder="Action" placeholder="Search"
label={undefined} label={undefined}
InputLabelProps={{ shrink: false }} InputLabelProps={{ shrink: false }}
/> />