updating cycle close request feature to get approval from national dashboard instead auto from system

This commit is contained in:
Alberto-Audrix committed 2026-09-09 14:18:39 +07:00
1 parent 3a868cf1db
commit e4dbfd0252
31 files changed
+1322 -182

No files matched your search

+4 -6
View File
@@ -188,18 +188,17 @@ describe('SettingsPage settings forms', () => {
expect(screen.queryByLabelText(/^Siklus$/i)).not.toBeInTheDocument();
expect(screen.queryByLabelText(/Total hari/i)).not.toBeInTheDocument();
expect(screen.queryByLabelText(/Selesai/i)).not.toBeInTheDocument();
fireEvent.change(screen.getByLabelText(/Mulai/i), { target: { value: '2026-08-01' } });
fireEvent.change(screen.getByLabelText(/Selesai/i), { target: { value: '2026-09-04' } });
fireEvent.click(screen.getByRole('button', { name: 'Tambah siklus' }));
await waitFor(() => expect(createCycleMock).toHaveBeenCalledTimes(1));
expect(createCycleMock).toHaveBeenCalledWith({
kandang: 11,
total_days: 35,
total_days: 1,
current_day: 1,
start_date: '2026-08-01',
end_date: '2026-09-04',
chick_in_weight: 35,
doc_in_count: 20000,
});
@@ -219,7 +218,7 @@ describe('SettingsPage settings forms', () => {
current_day: 1,
visible_through_date: '2026-08-18',
start_date: '2026-08-01',
end_date: '2026-09-04',
end_date: null,
chick_in_weight: 35,
doc_in_count: 20000,
feed_initial_balance: 0,
@@ -239,9 +238,8 @@ describe('SettingsPage settings forms', () => {
await waitFor(() => expect(updateCycleMock).toHaveBeenCalledTimes(1));
expect(updateCycleMock).toHaveBeenCalledWith(22, {
kandang: 11,
total_days: 35,
total_days: 1,
start_date: '2026-08-01',
end_date: '2026-09-04',
chick_in_weight: 38,
doc_in_count: 18000,
});