Dan Albert
374759df0f
Test most of WaypointMarker.
...
Unlike the other map tests which heavily rely on mocks, this one uses
React refs to inspect the constructed leaflet objects. The DOM itself
doesn't appear to contain anything worth testing against (react-leaflet
rendering doesn't work like typical React rendering).
This required some infrastructure changes:
1. Forwarded ref from WaypointMarker to Marker so the test can observe
it. Added a mergeRefs helper (and its own tests) to make that easier.
2. Switched from identity-obj-proxy to jest-transform-stub, because the
former doesn't produce a useable image for imports, and we need
usable images for leaflet to be able to render.
This doesn't yet test drag and drop behavior since that requires mocking
the backend, and this commit is already complicated enough. That'll be
next.
2023-06-27 22:41:33 -07:00
Dan Albert
f1e9abd157
Test SupplyRoute.
2023-06-27 00:28:07 -07:00
Dan Albert
eeacc79cb6
Add test for SplitLines.
2023-06-26 23:53:38 -07:00
Dan Albert
cf985d3d37
Test NavMeshLayer.
2023-06-16 22:18:46 -07:00
Dan Albert
1044a1f45f
Test FrontLinesLayer.
2023-06-16 22:05:12 -07:00
Dan Albert
09417322e7
Partial tests for FrontLine.
...
We need to mock the backend to usefully test the contextmenu handler.
I'd like to finish all the low hanging fruit before going for that.
2023-06-16 21:39:50 -07:00
Dan Albert
136a9b5f02
Test FlightPlansLayer.
2023-06-16 11:18:16 -07:00
Dan Albert
02f22d4930
Test CullingExclusionZones.
2023-06-16 10:35:31 -07:00
Dan Albert
b1af6dfbe1
Test ControlPointsLayer.
2023-06-15 22:50:39 -07:00
Dan Albert
647d1f57f9
Add tests for CombatLayer.
2023-06-15 22:50:39 -07:00
Dan Albert
3c8d0b023e
Test Combat.
2023-06-15 22:24:37 -07:00
Dan Albert
adceb3a224
Add tests for AirDefenseRangeLayer.
2023-06-15 21:58:05 -07:00
Dan Albert
380d6551be
Add tests for AircraftLayer.
2023-06-06 07:08:57 +00:00
Dan Albert
a7d2eca209
Add a test for the Aircraft component.
...
Leaflet (or maybe react-leaflet?) isn't very testable, so we can really
only test that mocks were called with the right props for the leaflet
components we expect, but that's still better than nothing.
2023-05-04 01:18:45 -07:00
Dan Albert
57a4a7c282
Test typescript and collect coverage.
...
We don't actually have any tests yet :(
2023-05-03 23:18:15 -07:00
dependabot[bot]
38d18ba767
Bump webpack from 5.69.1 to 5.76.1 in /client
...
Bumps [webpack](https://github.com/webpack/webpack ) from 5.69.1 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v5.69.1...v5.76.1 )
---
updated-dependencies:
- dependency-name: webpack
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 11:36:12 -07:00
dependabot[bot]
c07f343d0e
Bump @sideway/formula from 3.0.0 to 3.0.1 in /client
...
Bumps [@sideway/formula](https://github.com/sideway/formula ) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sideway/formula/releases )
- [Commits](https://github.com/sideway/formula/compare/v3.0.0...v3.0.1 )
---
updated-dependencies:
- dependency-name: "@sideway/formula"
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-02-08 20:06:27 -08:00
dependabot[bot]
1462bedd97
Bump http-cache-semantics from 4.1.0 to 4.1.1 in /client
...
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics ) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases )
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1 )
---
updated-dependencies:
- dependency-name: http-cache-semantics
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 17:08:17 -08:00
dependabot[bot]
31c59e7380
Bump json5 from 1.0.1 to 1.0.2 in /client
...
Bumps [json5](https://github.com/json5/json5 ) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases )
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md )
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2 )
---
updated-dependencies:
- dependency-name: json5
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-01-07 21:25:21 -08:00
dependabot[bot]
c8ada1ac46
Bump loader-utils from 1.4.1 to 1.4.2 in /client
...
Bumps [loader-utils](https://github.com/webpack/loader-utils ) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases )
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md )
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2 )
---
updated-dependencies:
- dependency-name: loader-utils
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 17:48:50 -08:00
dependabot[bot]
9785cf9fe6
Bump minimatch and recursive-readdir in /client
...
Bumps [minimatch](https://github.com/isaacs/minimatch ) and [recursive-readdir](https://github.com/jergason/recursive-readdir ). These dependencies needed to be updated together.
Updates `minimatch` from 3.0.4 to 3.1.2
- [Release notes](https://github.com/isaacs/minimatch/releases )
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2 )
Updates `recursive-readdir` from 2.2.2 to 2.2.3
- [Release notes](https://github.com/jergason/recursive-readdir/releases )
- [Changelog](https://github.com/jergason/recursive-readdir/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jergason/recursive-readdir/commits/v2.2.3 )
---
updated-dependencies:
- dependency-name: minimatch
dependency-type: indirect
- dependency-name: recursive-readdir
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 23:01:50 -08:00
dependabot[bot]
fdac9e99e1
Bump loader-utils from 1.4.0 to 1.4.1 in /client
...
Bumps [loader-utils](https://github.com/webpack/loader-utils ) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases )
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md )
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1 )
---
updated-dependencies:
- dependency-name: loader-utils
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-10 22:43:17 -08:00
Dan Albert
eee0039add
Key the PrimaryMarker with destination presence.
...
This is how React recommend dealing with derived state that needs to be
reset:
https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html
The problem is that the new turn will give the component new props, but
new props will not cause the state to be reset. We can either do that
manually (which React recommends only for the cases where it is
absolutely necessary:
https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops ),
or by forcing the component to be replaced by using a key.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2388 .
2022-10-09 16:25:35 -07:00
Dan Albert
c9d49f6f40
Split up the ControlPoint.tsx monolith.
...
This is in need of some serious refactoring so that
https://github.com/dcs-liberation/dcs_liberation/issues/2388 can be
fixed.
2022-10-09 16:25:35 -07:00
Dan Albert
0f5e35a2eb
Factor out control point location event behavior.
2022-10-09 16:25:35 -07:00
Dan Albert
979851aac9
Document primary/secondary CP marker behavior.
2022-10-09 16:25:35 -07:00
Dan Albert
3a2eb182f9
Fix the react app initialization.
...
ReactDOM.render is deprecated and using it forces react 17 behavior.
2022-10-09 16:25:35 -07:00
Dan Albert
c835cda5b6
Update NPM dependencies.
...
New versions of react and leaflet, along with a lot of other packages.
I'm hoping that the newest react-leaflet might let use solve the carrier
drag and drop issues in a less hacky way, since that's the cause of
https://github.com/dcs-liberation/dcs_liberation/issues/2388 .
2022-10-07 13:33:53 -07:00
Dan Albert
6295f3fd71
Fix the react test.
...
It's still a useless test, but now it passes.
2022-10-07 13:33:53 -07:00
Dan Albert
84d0a40547
Ignore vscode tasks file in client.
2022-10-07 13:33:53 -07:00
Dan Albert
36ef1479a6
Update caniuse-lite.
...
Complains when tests are run.
2022-10-07 13:33:53 -07:00
Dan Albert
67dcc6e7f5
Double the front line thickness.
...
Make it easier to click on.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2437 .
2022-09-28 11:03:50 -07:00
Dan Albert
edd162c3d2
Add missing type annotation.
...
Caught by newer versions of typescript.
2022-09-27 22:07:58 -07:00
Dan Albert
cc5c625a99
Fix rendering of join permissible zones.
...
The zones themselves are supposed to be unstroked because we only want
to stroke the boundaries of the zone that are preferred.
2022-09-09 15:12:19 -07:00
Dan Albert
eb3d2ef049
Ignore user vscode settings in the client.
2022-09-07 14:24:13 -07:00
Dan Albert
080782e011
Support polygons with holes in the API.
...
We don't have any of these yet because our landmaps suck, but we'll need
holes in the sea zones to mask islands correctly.
2022-09-07 14:22:26 -07:00
Dan Albert
643d1be6d7
Fix inclusion/exclusion zone reversal in UI.
2022-09-03 14:13:07 -07:00
dependabot[bot]
16b03ec90e
Bump terser from 5.11.0 to 5.14.2 in /client ( #2333 )
...
Bumps [terser](https://github.com/terser/terser ) from 5.11.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases )
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md )
- [Commits](https://github.com/terser/terser/commits )
---
updated-dependencies:
- dependency-name: terser
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 23:33:51 +02:00
Raffson
7355162d80
Fix combat updates in the front-end.
...
`setCombat` was never called, so old combats were never cleared on turn
end, game load, or unload.
https://github.com/dcs-liberation/dcs_liberation/issues/2253
2022-07-06 13:36:15 -07:00
Raffson
9823f7b96f
Push full navmesh/threatzone info in the event stream.
...
https://github.com/dcs-liberation/dcs_liberation/issues/2253
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-07-06 13:27:06 -07:00
Raffson
a20b95bb26
Push full TGO information in the event stream.
...
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-07-06 12:41:58 -07:00
Raffson
27dff95df5
Handle IADS updates properly.
...
This adds the missing events in the backend, and handles them properly in the front end.
2022-06-29 18:58:49 -07:00
Raffson
61488627a4
Push full control point information in the event stream.
...
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:17:08 -07:00
Raffson
da90a40bc4
Push full front line information in the event stream.
...
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:13:10 -07:00
Raffson
d578e763c0
Push full flight information in the event stream.
...
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:09:51 -07:00
Raffson
289545e777
Push full unculled zone information in the event stream.
...
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 21:09:07 +00:00
Raffson
76bc0fde33
Fix filter definitions for TGO layers.
...
https://github.com/dcs-liberation/dcs_liberation/issues/2253
2022-06-22 01:57:36 -07:00
dependabot[bot]
8f0d071afb
Bump electron from 17.1.0 to 17.2.0 in /client
...
Bumps [electron](https://github.com/electron/electron ) from 17.1.0 to 17.2.0.
- [Release notes](https://github.com/electron/electron/releases )
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md )
- [Commits](https://github.com/electron/electron/compare/v17.1.0...v17.2.0 )
---
updated-dependencies:
- dependency-name: electron
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 16:28:14 -07:00
Raffson
30bdcfac29
Fix eslint warning in CI
2022-06-16 09:38:29 -07:00
Raffson
ad7032064d
Add culling exclusion zones display to the new map.
...
https://github.com/dcs-liberation/dcs_liberation/issues/2158
2022-06-14 18:57:04 -07:00