mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 16:33:16 +00:00
chore(ci): give the server test typecheck room, format new client files
The server's src and tests together are past 570,000 lines and the test typecheck needs about 4.3 GB, over Node's default heap; it now gets 8 GB like the test jobs. Forty new client files are formatted, and the react-hooks/refs baseline drops by the one warning a split hook removed.
This commit is contained in:
@@ -236,9 +236,7 @@ export default function TourActivityDialog({
|
||||
variant="primary"
|
||||
data-testid="tour-activity-confirm"
|
||||
disabled={!assignment.ready || state.busy || importing}
|
||||
icon={
|
||||
state.busy ? <Loader2 size={14} className="animate-spin" /> : <Link2 size={14} strokeWidth={2} />
|
||||
}
|
||||
icon={state.busy ? <Loader2 size={14} className="animate-spin" /> : <Link2 size={14} strokeWidth={2} />}
|
||||
onClick={confirm}
|
||||
>
|
||||
{t('tours.activity.confirm')}
|
||||
|
||||
@@ -120,7 +120,17 @@ describe('TourActivitySection (ACT-01)', () => {
|
||||
expect(current.askRemove).toHaveBeenCalledWith(current.activities?.[0]);
|
||||
|
||||
hook.state = state({ assigning: {}, removing: activity() });
|
||||
rerender(<TourActivitySection tripId={1} tour={tour} days={days} assignments={assignments} canEdit plan={plan} planColor="plan-paint" />);
|
||||
rerender(
|
||||
<TourActivitySection
|
||||
tripId={1}
|
||||
tour={tour}
|
||||
days={days}
|
||||
assignments={assignments}
|
||||
canEdit
|
||||
plan={plan}
|
||||
planColor="plan-paint"
|
||||
/>
|
||||
);
|
||||
expect(screen.getByTestId('tour-activity-dialog')).toBeInTheDocument();
|
||||
expect(screen.getByText('tours.activity.removeTitle')).toBeInTheDocument();
|
||||
});
|
||||
@@ -193,6 +203,9 @@ describe('TourActivitySection (ACT-01)', () => {
|
||||
expect(screen.queryByRole('button', { name: /tours.activity.compare.(show|hide)/ })).toBeNull();
|
||||
|
||||
act(() => useTourActivityCompareStore.getState().setMapAvailable(true));
|
||||
expect(screen.getByRole('button', { name: /tours.activity.compare.show/ })).toHaveAttribute('aria-pressed', 'false');
|
||||
expect(screen.getByRole('button', { name: /tours.activity.compare.show/ })).toHaveAttribute(
|
||||
'aria-pressed',
|
||||
'false'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -117,7 +117,9 @@ describe('useActivityCompareMap (ACT-02)', () => {
|
||||
});
|
||||
|
||||
it('FE-ACT-COMPARE-MAP-006: tells the store whether it can compare, and ends a comparison where it no longer can or is gone', () => {
|
||||
const { rerender, unmount } = renderHook((props: typeof input) => useActivityCompareMap(props), { initialProps: input });
|
||||
const { rerender, unmount } = renderHook((props: typeof input) => useActivityCompareMap(props), {
|
||||
initialProps: input,
|
||||
});
|
||||
expect(useTourActivityCompareStore.getState().mapAvailable).toBe(true);
|
||||
act(() => useTourActivityCompareStore.getState().show({ tourPlaceId: 7, trackPlaceId: 20 }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user