fix: Update log fuel buttons
All checks were successful
Deploy to Staging / Build Images (push) Successful in 3m34s
Deploy to Staging / Deploy to Staging (push) Successful in 52s
Deploy to Staging / Verify Staging (push) Successful in 8s
Deploy to Staging / Notify Staging Ready (push) Successful in 8s
Deploy to Staging / Notify Staging Failure (push) Has been skipped

This commit is contained in:
Eric Gullickson
2026-02-15 19:53:36 -06:00
parent 9177a38414
commit 856a305c9d
4 changed files with 12 additions and 1382 deletions

View File

@@ -1,11 +1,11 @@
/**
* @ai-summary Compact action bar for dashboard with Add Vehicle and Log Fuel buttons
* @ai-summary Compact action bar for dashboard with Add Vehicle and Add Fuel Log buttons
*/
import React from 'react';
import Button from '@mui/material/Button';
import Add from '@mui/icons-material/Add';
import LocalGasStation from '@mui/icons-material/LocalGasStation';
interface ActionBarProps {
onAddVehicle: () => void;
@@ -25,13 +25,13 @@ export const ActionBar: React.FC<ActionBarProps> = ({ onAddVehicle, onLogFuel })
Add Vehicle
</Button>
<Button
variant="outlined"
variant="contained"
size="small"
startIcon={<LocalGasStation />}
startIcon={<Add />}
onClick={onLogFuel}
sx={{ minHeight: 44 }}
>
Log Fuel
Add Fuel Log
</Button>
</div>
);

View File

@@ -9,7 +9,7 @@ describe('ActionBar', () => {
render(<ActionBar onAddVehicle={onAddVehicle} onLogFuel={onLogFuel} />);
expect(screen.getByText('Add Vehicle')).toBeInTheDocument();
expect(screen.getByText('Log Fuel')).toBeInTheDocument();
expect(screen.getByText('Add Fuel Log')).toBeInTheDocument();
});
it('calls onAddVehicle when Add Vehicle button clicked', () => {
@@ -24,13 +24,13 @@ describe('ActionBar', () => {
expect(onAddVehicle).toHaveBeenCalledTimes(1);
});
it('calls onLogFuel when Log Fuel button clicked', () => {
it('calls onLogFuel when Add Fuel Log button clicked', () => {
const onAddVehicle = jest.fn();
const onLogFuel = jest.fn();
render(<ActionBar onAddVehicle={onAddVehicle} onLogFuel={onLogFuel} />);
const logFuelButton = screen.getByText('Log Fuel');
const logFuelButton = screen.getByText('Add Fuel Log');
fireEvent.click(logFuelButton);
expect(onLogFuel).toHaveBeenCalledTimes(1);